summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx_features.cmake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-03-07 11:27:17 (GMT)
committerBrad King <brad.king@kitware.com>2020-03-09 13:17:41 (GMT)
commit6ebc6cec41c16a94fd233e2b7317293e3fce7a64 (patch)
treeb78bf4e8f0ad439b9971969e06f1df4988b20342 /Source/Checks/cm_cxx_features.cmake
parentd1cb554c99c73e1486fbf4e09125337a7c0e9ea3 (diff)
downloadCMake-6ebc6cec41c16a94fd233e2b7317293e3fce7a64.zip
CMake-6ebc6cec41c16a94fd233e2b7317293e3fce7a64.tar.gz
CMake-6ebc6cec41c16a94fd233e2b7317293e3fce7a64.tar.bz2
cm_cxx_features: Filter out CUDA installation warnings
Clang always outputs these if it doesn't recognize the installed CUDA version. They don't affect compiling C++. Fixes #20434.
Diffstat (limited to 'Source/Checks/cm_cxx_features.cmake')
-rw-r--r--Source/Checks/cm_cxx_features.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 3b00dfb..c16286c 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -32,6 +32,8 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}")
# Filter out ld warnings.
string(REGEX REPLACE "[^\n]*ld: warning: [^\n]*" "" check_output "${check_output}")
+ # Filter out CUDA installation warnings.
+ string(REGEX REPLACE "[^\n]*clang: warning: Unknown CUDA version[^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)