From bc128d11d951962375b09a2be1681982808c8963 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 23 Aug 2020 23:48:05 +0700 Subject: [PATCH] Add strip for clang. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5e5d9af..dff77ee5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,3 +209,7 @@ if (WIN32) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/bin/WinRing0/WinRing0x64.sys" $) endif() + +if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release) + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_PROJECT_NAME}) +endif()