diff options
Diffstat (limited to 'Source/Checks/cm_cxx_features.cmake')
-rw-r--r-- | Source/Checks/cm_cxx_features.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index ab80f5b..2c39cbe 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -14,8 +14,11 @@ function(cm_check_cxx_feature name) CMAKE_FLAGS ${maybe_cxx_standard} OUTPUT_VARIABLE OUTPUT ) + set(check_output "${OUTPUT}") # Filter out MSBuild output that looks like a warning. - string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${OUTPUT}") + string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${check_output}") + # Filter out warnings caused by user flags. + string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}") # If using the feature causes warnings, treat it as broken/unavailable. if(check_output MATCHES "[Ww]arning") set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE) |