summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCompilerABI.cmake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-10-04 09:09:21 +0300
committerRaul Tambre <raul@tambre.ee>2020-10-04 09:09:21 +0300
commit079ea66468a6ffe0b02c3d6622bc0230fdf455b0 (patch)
tree8780b1dd70cfcd63d8b560474eb915740ed9ea91 /Modules/CMakeDetermineCompilerABI.cmake
parent3ae3b352d1b67ec2ca8bce0a74a74381d05b9f04 (diff)
downloadcmake-079ea66468a6ffe0b02c3d6622bc0230fdf455b0.tar.gz
CMakeDetermineCompilerABI: Handle NVCC-style -Werror flags
NVCC doesn't require an equals sign for its -Werror flags. Fixes #21265.
Diffstat (limited to 'Modules/CMakeDetermineCompilerABI.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 50d5cd1887..7e5b3751ba 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -33,7 +33,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
__TestCompiler_setTryCompileTargetType()
# Avoid failing ABI detection on warnings.
- string(REGEX REPLACE "(^| )-Werror(=[^ ]*)?( |$)" " " CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
+ 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