diff options
author | Brad King <brad.king@kitware.com> | 2020-10-05 12:54:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-05 12:54:50 (GMT) |
commit | d25c38374c4b2aeed92c9e0dcccbb51c36add406 (patch) | |
tree | 005cd85c6549ac682eaed48b4ef44191abb19c21 | |
parent | a0964cbe63d0e9c2308a8b5d76e523341fb145e1 (diff) | |
parent | 079ea66468a6ffe0b02c3d6622bc0230fdf455b0 (diff) | |
download | CMake-d25c38374c4b2aeed92c9e0dcccbb51c36add406.zip CMake-d25c38374c4b2aeed92c9e0dcccbb51c36add406.tar.gz CMake-d25c38374c4b2aeed92c9e0dcccbb51c36add406.tar.bz2 |
Merge topic 'cuda_nvcc_abi_werror'
079ea66468 CMakeDetermineCompilerABI: Handle NVCC-style -Werror flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Seth R Johnson <johnsonsr@ornl.gov>
Merge-request: !5318
-rw-r--r-- | Help/release/dev/cuda-nvcc-werror-abi.rst | 4 | ||||
-rw-r--r-- | Modules/CMakeDetermineCompilerABI.cmake | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Help/release/dev/cuda-nvcc-werror-abi.rst b/Help/release/dev/cuda-nvcc-werror-abi.rst new file mode 100644 index 0000000..73e6ee6 --- /dev/null +++ b/Help/release/dev/cuda-nvcc-werror-abi.rst @@ -0,0 +1,4 @@ +cuda-nvcc-werror-abi +-------------------- + +* Compiler ABI detection now handles NVCC-style ``-Werror`` flags. diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index 50d5cd1..7e5b375 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 |