Added new DISABLE_STRIP flag to CMakeLists.txt.

This commit is contained in:
casey langen 2020-05-24 13:25:06 -07:00
parent 6972a1df47
commit c5e1ed8220

View File

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