diff options
-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 0000000000..73e6ee6e02 --- /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 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 |