Debian Codegraph @

cmake/3rdparty/extra-cmake-modules/0003-ECMEnableSanitizers.cmake-fix-no-undefined-flag-replacement.patch

raw
1 diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
2 index 8d95c69e3ad..5145d2ffd71 100644
3 --- a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
4 +++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake
5 @@ -179,8 +179,8 @@ if (ECM_ENABLE_SANITIZERS)
6 link_libraries("${linker_flags}")
7 endif()
8 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
9 - string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
10 - string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
11 + string(REGEX REPLACE "( |^)-Wl,--no-undefined( |$)" " " CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
12 + string(REGEX REPLACE "( |^)-Wl,--no-undefined( |$)" " " CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
13 endif ()
14 endforeach()
15 else()