Revert "tools/cmake: Update to 3.14.0"
[openwrt/staging/pepe2k.git] / tools / cmake / patches / 150-C-feature-checks-Match-warnings-more-strictly.patch
1 From 4ca5a815f2dfe9e1116cc2ccd5ddb56d0d00d12e Mon Sep 17 00:00:00 2001
2 From: Brad King <brad.king@kitware.com>
3 Date: Thu, 7 Mar 2019 14:55:54 -0500
4 Subject: [PATCH] C++ feature checks: Match warnings more strictly
5
6 Require the word "warning" to appear at the start of a line, after
7 whitespace, or after a `:`. This is the same that CTest launchers use
8 to match warnings. It avoids matching "warning" inside file paths.
9
10 Fixes: #19019
11 ---
12 Source/Checks/cm_cxx_features.cmake | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 --- a/Source/Checks/cm_cxx_features.cmake
16 +++ b/Source/Checks/cm_cxx_features.cmake
17 @@ -25,7 +25,7 @@ function(cm_check_cxx_feature name)
18 # Filter out xcodebuild warnings.
19 string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}")
20 # If using the feature causes warnings, treat it as broken/unavailable.
21 - if(check_output MATCHES "[Ww]arning")
22 + if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
23 set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
24 endif()
25 if(CMake_HAVE_CXX_${FEATURE})