summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx_features.cmake
diff options
context:
space:
mode:
authorWalter Gray <chrysalisx@gmail.com>2017-06-06 05:43:36 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-06 12:55:43 (GMT)
commitf4ce396254eff94446df92f9900dc501fad65ad8 (patch)
tree8a60b58fad8781b62818f2e80f500b17516d2b70 /Source/Checks/cm_cxx_features.cmake
parentd025faf436c86ee9cc033fbb324a9bc2c18757fa (diff)
downloadCMake-f4ce396254eff94446df92f9900dc501fad65ad8.zip
CMake-f4ce396254eff94446df92f9900dc501fad65ad8.tar.gz
CMake-f4ce396254eff94446df92f9900dc501fad65ad8.tar.bz2
C++ feature checks: Do not match "0 Warning(s)" as a warning
The change in commit v3.9.0-rc1~6^2~1 (C++ feature checks: check output for '[Ww]arning', 2017-06-03) accidentally matches `0 Warning(s)` in the output and always thinks a warning exists, thus failing all checks in Visual Studio builds. Fixes: #16942
Diffstat (limited to 'Source/Checks/cm_cxx_features.cmake')
-rw-r--r--Source/Checks/cm_cxx_features.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index c3835c3..c9a19af 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -15,7 +15,7 @@ function(cm_check_cxx_feature name)
OUTPUT_VARIABLE OUTPUT
)
# If using the feature causes warnings, treat it as broken/unavailable.
- if(OUTPUT MATCHES "[Ww]arning")
+ if(OUTPUT MATCHES "[Ww]arning" AND NOT OUTPUT MATCHES "0 Warning")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
endif()
if(CMake_HAVE_CXX_${FEATURE})