mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 22:10:32 +00:00
Merge topic 'cxx-checks-tolerate-more-warnings'
2254b72061
C++ feature checks: Filter out warnings caused by local configuration
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2019
This commit is contained in:
commit
ddff7aebbc
@ -19,6 +19,9 @@ function(cm_check_cxx_feature name)
|
||||
string(REGEX REPLACE " +0 Warning\\(s\\)" "" 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.
|
||||
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}")
|
||||
# If using the feature causes warnings, treat it as broken/unavailable.
|
||||
if(check_output MATCHES "[Ww]arning")
|
||||
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
|
||||
|
Loading…
Reference in New Issue
Block a user