mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03: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:
@@ -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