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()