diff options
author | Sung, Po Han <bernies@synology.com> | 2024-03-28 02:58:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-03-28 17:16:40 (GMT) |
commit | 06c99ce73bded55232dad5e7db85bc4740cb45fb (patch) | |
tree | aa40e86090ca5af7feb4d9b986d9a986615508c2 /Modules | |
parent | e60281e9687d5192bb4f804d0194ad4d3a4a619e (diff) | |
download | CMake-06c99ce73bded55232dad5e7db85bc4740cb45fb.zip CMake-06c99ce73bded55232dad5e7db85bc4740cb45fb.tar.gz CMake-06c99ce73bded55232dad5e7db85bc4740cb45fb.tar.bz2 |
CheckSymbolExists: Avoid removing the flag after -Werror
In commit 1ab7c3cd28 (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 commit cec6f98018 (CMakeDetermineCompilerABI:
Avoid removing the flag after -Werror, 2023-05-29, v3.26.5~4^2).
Apply the fix to CheckSymbolExists too.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckSymbolExists.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 931ed4a..90f91dd 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -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() |