mirror of
https://github.com/reactos/CMake.git
synced 2025-02-03 02:24:13 +00:00
C++ feature checks: Do not match "0 Warning(s)" as a warning
The change in commit v3.9.0-rc1~6^2~1 (C++ feature checks: check output for '[Ww]arning', 2017-06-03) accidentally matches `0 Warning(s)` in the output and always thinks a warning exists, thus failing all checks in Visual Studio builds. Fixes: #16942
This commit is contained in:
parent
d025faf436
commit
f4ce396254
@ -15,7 +15,7 @@ function(cm_check_cxx_feature name)
|
||||
OUTPUT_VARIABLE OUTPUT
|
||||
)
|
||||
# If using the feature causes warnings, treat it as broken/unavailable.
|
||||
if(OUTPUT MATCHES "[Ww]arning")
|
||||
if(OUTPUT MATCHES "[Ww]arning" AND NOT OUTPUT MATCHES "0 Warning")
|
||||
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
|
||||
endif()
|
||||
if(CMake_HAVE_CXX_${FEATURE})
|
||||
|
Loading…
x
Reference in New Issue
Block a user