Merge topic 'fix-vs2017-featuredetect'

f4ce3962 C++ feature checks: Do not match "0 Warning(s)" as a warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !930
This commit is contained in:
Brad King 2017-06-07 13:59:08 +00:00 committed by Kitware Robot
commit 5b1d0aeffe

View File

@ -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})