diff options
-rw-r--r-- | common.cmake | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/common.cmake b/common.cmake index 5c55b74..c67f983 100644 --- a/common.cmake +++ b/common.cmake @@ -174,19 +174,17 @@ function(_cc_strip_symbols_gcc target) # target_link_libraries: #target_link_libraries("${target}" PRIVATE -s) - set_property(TARGET "${target}" APPEND_STRING PROPERTY LINK_FLAGS " -s") + set_property(TARGET "${target}" APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " -s") + set_property(TARGET "${target}" APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " -s") endfunction() function(_cc_strip_symbols target) get_target_property(target_type "${target}" TYPE) get_target_property(aliased "${target}" ALIASED_TARGET) if(NOT target_type STREQUAL "INTERFACE_LIBRARY" AND NOT aliased) - set(release_build $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>) - if(release_build) - message(STATUS "common.cmake: ${target}: Stripping symbols for release configurations") - if(is_gcc) - _cc_strip_symbols_gcc("${target}") - endif() + message(STATUS "common.cmake: ${target}: Stripping symbols for release configurations") + if(is_gcc) + _cc_strip_symbols_gcc("${target}") endif() endif() endfunction() |