From b756ec8a46761188e3a6b00aba06fd997a3cdf3a Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 5 Oct 2020 18:35:21 +0200 Subject: cm_cxx_features: Filter out MSBXXXX warnings When building CMake in `%TMP%` on Windows, MSBuild issues warnings. Filter those out to avoid breaking C++ feature checks. Fixes: #21270 --- Source/Checks/cm_cxx_features.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 5c1593d..663d89a 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -36,6 +36,8 @@ function(cm_check_cxx_feature name) set(check_output "${OUTPUT}") # Filter out MSBuild output that looks like a warning. string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${check_output}") + # Filter out MSBuild output that looks like a warning. + string(REGEX REPLACE "[^\n]*warning MSB[0-9][0-9][0-9][0-9][^\n]*" "" 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}") # Filter out warnings caused by local configuration. -- cgit v0.12