diff options
author | Anonymous Maarten <anonymous.maarten@gmail.com> | 2020-10-05 16:35:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-08 13:24:02 (GMT) |
commit | b756ec8a46761188e3a6b00aba06fd997a3cdf3a (patch) | |
tree | 2ca58f0d24151f55fbbfebf2b49c689a28258e78 /Source/Checks/cm_cxx_features.cmake | |
parent | b1898bf97570b2887f7398105231ff72adb1564d (diff) | |
download | CMake-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/cm_cxx_features.cmake')
-rw-r--r-- | Source/Checks/cm_cxx_features.cmake | 2 |
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. |