mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
CheckSymbolExists: Avoid removing the flag after -Werror
In commit1ab7c3cd28(CheckSymbolExists: Work around GCC failure with -pedantic-errors option, 2021-10-22, v3.23.0-rc1~498^2) we used the same code that was fixed by commitcec6f98018(CMakeDetermineCompilerABI: Avoid removing the flag after -Werror, 2023-05-29, v3.26.5~4^2). Apply the fix to CheckSymbolExists too.
This commit is contained in:
@@ -76,7 +76,7 @@ endmacro()
|
||||
|
||||
macro(__CHECK_SYMBOL_EXISTS_FILTER_FLAGS LANG)
|
||||
set(__CMAKE_${LANG}_FLAGS_SAVED "${CMAKE_${LANG}_FLAGS}")
|
||||
string(REGEX REPLACE "(^| )-Werror([= ][^ ]*)?( |$)" " " CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS}")
|
||||
string(REGEX REPLACE "(^| )-Werror([= ][^-][^ ]*)?( |$)" " " CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS}")
|
||||
string(REGEX REPLACE "(^| )-pedantic-errors( |$)" " " CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS}")
|
||||
endmacro()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user