diff options
author | Walter Gray <chrysalisx@gmail.com> | 2017-06-06 05:43:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-06 12:55:43 (GMT) |
commit | f4ce396254eff94446df92f9900dc501fad65ad8 (patch) | |
tree | 8a60b58fad8781b62818f2e80f500b17516d2b70 /Source/Checks/cm_cxx_features.cmake | |
parent | d025faf436c86ee9cc033fbb324a9bc2c18757fa (diff) | |
download | CMake-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.cmake | 2 |
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}) |