diff options
author | Roffild <roffild@hotmail.com> | 2023-03-02 14:45:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-02 15:25:16 (GMT) |
commit | 442170a5e777d75ca3e6d388e3999055398d4734 (patch) | |
tree | 3dabc79159ee6546a6e1a060511d0dae5b91720d /Source | |
parent | b32949d47e8558d7b5a644472160ea3f9a59cb70 (diff) | |
download | CMake-442170a5e777d75ca3e6d388e3999055398d4734.zip CMake-442170a5e777d75ca3e6d388e3999055398d4734.tar.gz CMake-442170a5e777d75ca3e6d388e3999055398d4734.tar.bz2 |
cm_cxx_features: Ignore MSVC command-line warnings (Dxxxx)
The Dxxxx warning range is for command-line warnings [1]. These are
incidental and should not affect the result of the feature check.
[1] https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/command-line-errors-d8000-through-d9999
Diffstat (limited to 'Source')
-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 73e7ef2..f5b7587 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -38,6 +38,8 @@ function(cm_check_cxx_feature name) 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 MSVC output that looks like a command-line warning. + string(REGEX REPLACE "[^\n]*warning D[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. |