Merge topic 'cxx-checks-tolerate-sprintf-warning'

2ca89b5a69 C++ feature checks: Filter out libstdc++ sprintf warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2643
This commit is contained in:
Brad King
2018-11-26 12:50:38 +00:00
committed by Kitware Robot
+2
View File
@@ -22,6 +22,8 @@ function(cm_check_cxx_feature name)
# 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}")
# Filter out other warnings unrelated to feature checks.
string(REGEX REPLACE "[^\n]*warning:[^\n]*sprintf\\(\\) is often misused, please use snprintf[^\n]*" "" check_output "${check_output}")
# Filter out xcodebuild warnings.
string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.