From f4ce396254eff94446df92f9900dc501fad65ad8 Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Mon, 5 Jun 2017 22:43:36 -0700 Subject: 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 --- Source/Checks/cm_cxx_features.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- cgit v0.12