mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06:00
cm_cxx_features: Ignore Clang unused-argument warnings
Filter out `-Wunused-command-line-argument` warnings from Clang (that
can be caused by user-specified flags) so that they do not break our
checks for C++ feature availability.
This extends commit 71b65abca2 (C++ feature checks: Filter out warnings
caused by user flags, 2017-09-19, v3.10.0-rc1~90^2).
This commit is contained in:
@@ -43,7 +43,7 @@ function(cm_check_cxx_feature name)
|
||||
# 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}")
|
||||
string(REGEX REPLACE "[^\n]*warning:[^\n]*-W(invalid|unused)-command-line-argument[^\n]*" "" check_output "${check_output}")
|
||||
# Filter out warnings caused by local configuration.
|
||||
string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}")
|
||||
string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")
|
||||
|
||||
Reference in New Issue
Block a user