From: Benjamin Drung Date: Thu, 22 Sep 2022 23:20:54 +0000 (+0200) Subject: Do not strip debug info for CMAKE_BUILD_TYPE=RelWithDebInfo X-Git-Tag: archive/raspbian/3.6.3+dfsg-1+rpi1~1^2^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d7c477742c29cd4c3020532cf41d74dc057e77be;p=audacity.git Do not strip debug info for CMAKE_BUILD_TYPE=RelWithDebInfo If `CMAKE_BUILD_TYPE` is set to `RelWithDebInfo` the debug information should not be stripped. Currently `strip -x` is called when `RelWithDebInfo` is set. A useless `echo` is called when `Debug` is set. Skip `strip -x` when `CMAKE_BUILD_TYPE` is set to `Debug` or `RelWithDebInfo`. Forwarded: https://github.com/audacity/audacity/pull/3672 Signed-off-by: Benjamin Drung Gbp-Pq: Name Do-not-strip-debug-info-for-CMAKE_BUILD_TYPE-RelWithDebIn.patch --- diff --git a/cmake-proxies/cmake-modules/AudacityFunctions.cmake b/cmake-proxies/cmake-modules/AudacityFunctions.cmake index a8f144f9..6234fc78 100644 --- a/cmake-proxies/cmake-modules/AudacityFunctions.cmake +++ b/cmake-proxies/cmake-modules/AudacityFunctions.cmake @@ -482,11 +482,11 @@ function( audacity_module_fn NAME SOURCES IMPORT_TARGETS target_link_options( ${TARGET} PRIVATE ${LOPTS} ) target_link_libraries( ${TARGET} PUBLIC ${LIBRARIES} ) - if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" ) + if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT CMAKE_BUILD_TYPE MATCHES "Debug|RelWithDebInfo" ) add_custom_command( TARGET "${TARGET}" POST_BUILD - COMMAND $,echo,strip> -x $ + COMMAND strip -x $ ) endif()