mirror of
https://github.com/reactos/CMake.git
synced 2025-03-02 08:55:41 +00:00
C++ feature checks: Prepare for multiple check output filters
This commit is contained in:
parent
4547d9a830
commit
eb3abf8b2b
@ -14,8 +14,9 @@ function(cm_check_cxx_feature name)
|
||||
CMAKE_FLAGS ${maybe_cxx_standard}
|
||||
OUTPUT_VARIABLE OUTPUT
|
||||
)
|
||||
set(check_output "${OUTPUT}")
|
||||
# Filter out MSBuild output that looks like a warning.
|
||||
string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${OUTPUT}")
|
||||
string(REGEX REPLACE " +0 Warning\\(s\\)" "" 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…
x
Reference in New Issue
Block a user