mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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
This commit is contained in:
committed by
Brad King
parent
b1898bf975
commit
b756ec8a46
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user