summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-04 13:29:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-04 13:29:30 (GMT)
commit37af0fac54878414c1d9c1d1b0c286c21a82d8d4 (patch)
tree4077232f1ddd98d5e4222242f2dad4e0075db566 /Modules
parent8b6b78363377faf61b19811d743499c5ba63b7bc (diff)
parentd5895f50c30d9d0d329d23013baf7986d62e00f1 (diff)
downloadCMake-37af0fac54878414c1d9c1d1b0c286c21a82d8d4.zip
CMake-37af0fac54878414c1d9c1d1b0c286c21a82d8d4.tar.gz
CMake-37af0fac54878414c1d9c1d1b0c286c21a82d8d4.tar.bz2
Merge topic 'compiler-abi-no-Werror'
d5895f50c3 CMakeDetermineCompilerABI: Avoid failing on warnings with -Werror Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4316
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 99447e4..e1b3c52 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -32,6 +32,9 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
endif()
__TestCompiler_setTryCompileTargetType()
+ # Avoid failing ABI detection on warnings.
+ string(REGEX REPLACE "(^| )-Werror(=[^ ]*)?( |$)" " " CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
+
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables
# and set them to "C" that way GCC's "search starts here" text is in
# English and we can grok it.