diff options
author | Brad King <brad.king@kitware.com> | 2017-06-08 13:23:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-08 13:23:05 (GMT) |
commit | 43dae6459797ccebc53956050ac058a933b60078 (patch) | |
tree | 2d100b38295f5da1773e7bf7a974953e7feba02a /Source | |
parent | 010b50fda71feaff3abec4d13910f4a4bd1f13b0 (diff) | |
parent | f44d9bcc8f09c3a135fa0feb82e9d71c475eb196 (diff) | |
download | CMake-43dae6459797ccebc53956050ac058a933b60078.zip CMake-43dae6459797ccebc53956050ac058a933b60078.tar.gz CMake-43dae6459797ccebc53956050ac058a933b60078.tar.bz2 |
Merge branch 'improve-msvc-feature-checks' into release-3.9
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Checks/cm_cxx_features.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index c9a19af..3b08025 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -14,8 +14,10 @@ function(cm_check_cxx_feature name) CMAKE_FLAGS ${maybe_cxx_standard} OUTPUT_VARIABLE OUTPUT ) + # Filter out MSBuild output that looks like a warning. + string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${OUTPUT}") # If using the feature causes warnings, treat it as broken/unavailable. - if(OUTPUT MATCHES "[Ww]arning" AND NOT OUTPUT MATCHES "0 Warning") + if(check_output MATCHES "[Ww]arning") set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE) endif() if(CMake_HAVE_CXX_${FEATURE}) |