tools/cmake: Update to 3.15.1
authorDaniel Engberg <daniel.engberg.lists@pyret.net>
Sat, 16 Mar 2019 21:09:22 +0000 (21:09 +0000)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Sep 2019 11:46:12 +0000 (13:46 +0200)
Update CMake to 3.15.1
Refresh patches
Remove inofficial fossies.org and replace with GitHub (link on official site)
Remove 150-C-feature-checks-Match-warnings-more-strictly.patch as it's
a no longer needed backport from upstream.
Disable ccache if GCC is 4.8, 4.9 or 5.X to avoid build failures.
Reference: https://github.com/openwrt/openwrt/pull/1929

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(cherry picked from commit 413c68d120043cd8ff1f4aa057d33c140bfc6bfa)

tools/cmake/Makefile
tools/cmake/patches/100-disable_qt_tests.patch
tools/cmake/patches/120-curl-fix-libressl-linking.patch
tools/cmake/patches/130-bootstrap_parallel_make_flag.patch
tools/cmake/patches/150-C-feature-checks-Match-warnings-more-strictly.patch [deleted file]

index 888cf7de8e28bc10c41b152f3dd75dfb084d3081..33d6d4944f309e11da6d42e8f908cfe7a4b361c1 100644 (file)
@@ -7,19 +7,33 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmake
-PKG_VERSION:=3.13.2
+PKG_VERSION:=3.15.1
 PKG_CPE_ID:=cpe:/a:kitware:cmake
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://cmake.org/files/v3.13/ \
-               https://fossies.org/linux/misc/
-PKG_HASH:=c925e7d2c5ba511a69f43543ed7b4182a7d446c274c7480d0e42cd933076ae25
+PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
+               https://cmake.org/files/v3.15/
+PKG_HASH:=18dec548d8f8b04d53c60f9cedcebaa6762f8425339d1e2c889c383d3ccdd7f7
 
 HOST_BUILD_PARALLEL:=1
 HOST_CONFIGURE_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 
+# Workaround for GCC versions below 6.X and ccache
+# Reference: https://github.com/openwrt/openwrt/pull/1929
+GCC_DMPVER_GREPCMD := grep -E '^(4\.[8-9]|[5]\.?)'
+GCC_DMPVER_STRING := $(shell $(HOSTCC_NOCACHE) -dumpversion | $(GCC_DMPVER_GREPCMD))
+ifneq ($(GCC_DMPVER_STRING),)
+  ifeq ($(CONFIG_CCACHE),y)
+    $(info GCC version less than 6.0 detected, disabling CCACHE)
+    HOST_CONFIGURE_VARS:=$(filter-out CC=% gcc%",$(HOST_CONFIGURE_VARS)) CC="$(HOSTCC_NOCACHE)"
+    HOST_CONFIGURE_VARS:=$(filter-out CXX=% g++%",$(HOST_CONFIGURE_VARS)) CXX="$(HOSTCXX_NOCACHE)"
+      else
+    $(info GCC version greater or equal to 6.0 detected, no workaround set for CCACHE)
+  endif
+endif
+
 HOST_CONFIGURE_VARS += \
        MAKEFLAGS="$(HOST_JOBS)" \
        CXXFLAGS="$(HOST_CFLAGS)"
index af04bf7c4198c2d1ac04684f17adfc8bc05ef3d5..7f83e279f73996f2bb245777224235f8f4f8069c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Tests/RunCMake/CMakeLists.txt
 +++ b/Tests/RunCMake/CMakeLists.txt
-@@ -301,15 +301,6 @@ add_RunCMake_test(no_install_prefix)
+@@ -325,15 +325,6 @@ add_RunCMake_test(no_install_prefix)
  add_RunCMake_test(configure_file)
  add_RunCMake_test(CTestTimeoutAfterMatch)
  
@@ -18,7 +18,7 @@
    add_RunCMake_test(FindPkgConfig)
 --- a/Tests/CMakeLists.txt
 +++ b/Tests/CMakeLists.txt
-@@ -437,13 +437,6 @@ if(BUILD_TESTING)
+@@ -483,13 +483,6 @@ if(BUILD_TESTING)
  
    list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
  
index e217979ee42f2f61d020462758d29e7d829bbcd8..e7d9c5ddda665d89cf937aaa51d6b24b8f2dacef 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
 ---
 --- a/Utilities/cmcurl/CMakeLists.txt
 +++ b/Utilities/cmcurl/CMakeLists.txt
-@@ -454,6 +454,14 @@ if(CMAKE_USE_OPENSSL)
+@@ -453,6 +453,14 @@ if(CMAKE_USE_OPENSSL)
    set(USE_OPENSSL ON)
    set(HAVE_LIBCRYPTO ON)
    set(HAVE_LIBSSL ON)
index 535417d55a69949d2d4e0a8252e101d6928b4619..124cf6d9d42240edf24ab438f604664a3008d363 100644 (file)
@@ -1,6 +1,6 @@
 --- a/bootstrap
 +++ b/bootstrap
-@@ -1164,7 +1164,10 @@ int main(){ printf("1%c", (char)0x0a); r
+@@ -1168,7 +1168,10 @@ int main(){ printf("1%c", (char)0x0a); r
  ' > "test.c"
  cmake_original_make_flags="${cmake_make_flags}"
  if [ "x${cmake_parallel_make}" != "x" ]; then
diff --git a/tools/cmake/patches/150-C-feature-checks-Match-warnings-more-strictly.patch b/tools/cmake/patches/150-C-feature-checks-Match-warnings-more-strictly.patch
deleted file mode 100644 (file)
index 674ff0d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 4ca5a815f2dfe9e1116cc2ccd5ddb56d0d00d12e Mon Sep 17 00:00:00 2001
-From: Brad King <brad.king@kitware.com>
-Date: Thu, 7 Mar 2019 14:55:54 -0500
-Subject: [PATCH] C++ feature checks: Match warnings more strictly
-
-Require the word "warning" to appear at the start of a line, after
-whitespace, or after a `:`.  This is the same that CTest launchers use
-to match warnings.  It avoids matching "warning" inside file paths.
-
-Fixes: #19019
----
- Source/Checks/cm_cxx_features.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Source/Checks/cm_cxx_features.cmake
-+++ b/Source/Checks/cm_cxx_features.cmake
-@@ -25,7 +25,7 @@ function(cm_check_cxx_feature name)
-     # 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.
--    if(check_output MATCHES "[Ww]arning")
-+    if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
-       set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
-     endif()
-     if(CMake_HAVE_CXX_${FEATURE})