summaryrefslogtreecommitdiffstats
path: root/Source/Checks
diff options
context:
space:
mode:
authorAnonymous Maarten <anonymous.maarten@gmail.com>2020-10-05 16:35:21 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-08 13:24:02 (GMT)
commitb756ec8a46761188e3a6b00aba06fd997a3cdf3a (patch)
tree2ca58f0d24151f55fbbfebf2b49c689a28258e78 /Source/Checks
parentb1898bf97570b2887f7398105231ff72adb1564d (diff)
downloadCMake-b756ec8a46761188e3a6b00aba06fd997a3cdf3a.zip
CMake-b756ec8a46761188e3a6b00aba06fd997a3cdf3a.tar.gz
CMake-b756ec8a46761188e3a6b00aba06fd997a3cdf3a.tar.bz2
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
Diffstat (limited to 'Source/Checks')
-rw-r--r--Source/Checks/cm_cxx_features.cmake2
1 files changed, 2 insertions, 0 deletions
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.