mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 11:49:55 -06:00
CMakeDetermineCompilerABI: Handle NVCC-style -Werror flags
NVCC doesn't require an equals sign for its -Werror flags. Fixes #21265.
This commit is contained in:
4
Help/release/dev/cuda-nvcc-werror-abi.rst
Normal file
4
Help/release/dev/cuda-nvcc-werror-abi.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
cuda-nvcc-werror-abi
|
||||
--------------------
|
||||
|
||||
* Compiler ABI detection now handles NVCC-style ``-Werror`` flags.
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user