Skip to content

Commit

Permalink
tools/cmake: downgrade to 3.18.6
Browse files Browse the repository at this point in the history
  • Loading branch information
luxiaok committed Jan 8, 2025
1 parent 08f8ef1 commit 00141b6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
22 changes: 17 additions & 5 deletions tools/cmake/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,35 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=cmake
PKG_VERSION:=3.21.6
PKG_VERSION:=3.18.6
PKG_RELEASE:=1
PKG_CPE_ID:=cpe:/a:kitware:cmake

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
https://cmake.org/files/v3.21/
PKG_HASH:=b7c3ac35ca7ed3cce8c192c9c873e6061aaecc8b2bc564290e629b10bff59f3c
https://cmake.org/files/v3.18/
PKG_HASH:=124f571ab70332da97a173cb794dfa09a5b20ccbb80a08e56570a500f47b6600

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 += \
CC="$(HOSTCC_NOCACHE)" \
CXX="$(HOSTCXX_NOCACHE)" \
MAKEFLAGS="$(HOST_JOBS)" \
CXXFLAGS="$(HOST_CFLAGS)"

Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/patches/120-curl-fix-libressl-linking.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
---
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -528,6 +528,14 @@ if(CMAKE_USE_OPENSSL)
@@ -488,6 +488,14 @@ if(CMAKE_USE_OPENSSL)
endif()
set(SSL_ENABLED ON)
set(USE_OPENSSL ON)
Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/patches/130-bootstrap_parallel_make_flag.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/bootstrap
+++ b/bootstrap
@@ -1421,7 +1421,10 @@ int main(){ printf("1%c", (char)0x0a); r
@@ -1297,7 +1297,10 @@ int main(){ printf("1%c", (char)0x0a); r
' > "test.c"
cmake_original_make_flags="${cmake_make_flags}"
if test "x${cmake_parallel_make}" != "x"; then
Expand Down

0 comments on commit 00141b6

Please sign in to comment.