From c5e1ed8220674c0db8bd10ac02a70d49cec84c2a Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 24 May 2020 13:25:06 -0700 Subject: [PATCH] Added new `DISABLE_STRIP` flag to CMakeLists.txt. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3e026662..54cbb2429 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -373,6 +373,10 @@ add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .) # strip binaries in release mode if (CMAKE_BUILD_TYPE MATCHES Release) - message(STATUS "stripping binaries...") - add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_SOURCE_DIR}/strip-nix.sh") + if ((NOT DEFINED DISABLE_STRIP) OR (NOT ${DISABLE_STRIP} MATCHES "true")) + message(STATUS "[build] binary stripping enabled") + add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_SOURCE_DIR}/strip-nix.sh") + else() + message(STATUS "[build] DISABLE_STRIP=true, *NOT* stripping binaries.") + endif() endif()