diff --git a/package/cmake/Config.in.host b/package/cmake/Config.in.host index b2e210ee2c..5de076537b 100644 --- a/package/cmake/Config.in.host +++ b/package/cmake/Config.in.host @@ -9,3 +9,30 @@ config BR2_PACKAGE_HOST_CMAKE the compiler environment of your choice. http://www.cmake.org/ + +# The minimum system cmake version we expect if 3.18 as provided by +# Debian bullseye, that we use in our reference build docker image. +config BR2_HOST_CMAKE_AT_LEAST_3_19 + bool + +config BR2_HOST_CMAKE_AT_LEAST_3_20 + bool + select BR2_HOST_CMAKE_AT_LEAST_3_19 + +config BR2_HOST_CMAKE_AT_LEAST_3_21 + bool + select BR2_HOST_CMAKE_AT_LEAST_3_20 + +config BR2_HOST_CMAKE_AT_LEAST_3_22 + bool + select BR2_HOST_CMAKE_AT_LEAST_3_21 + +# This order guarantees that the highest version is set, as kconfig +# stops affecting a value on the first matching default. +config BR2_HOST_CMAKE_AT_LEAST + string + default "3.22" if BR2_HOST_CMAKE_AT_LEAST_3_22 + default "3.21" if BR2_HOST_CMAKE_AT_LEAST_3_21 + default "3.20" if BR2_HOST_CMAKE_AT_LEAST_3_20 + default "3.19" if BR2_HOST_CMAKE_AT_LEAST_3_19 + default "3.18" diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk index dc92c8bb4e..b99877696a 100644 --- a/package/cmake/cmake.mk +++ b/package/cmake/cmake.mk @@ -4,6 +4,7 @@ # ################################################################################ +# When updating the version, please also update BR2_HOST_CMAKE_AT_LEAST_X_Y CMAKE_VERSION_MAJOR = 3.22 CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).3 CMAKE_SITE = https://cmake.org/files/v$(CMAKE_VERSION_MAJOR) diff --git a/support/dependencies/check-host-cmake.mk b/support/dependencies/check-host-cmake.mk index 5760e4ded1..e367690319 100644 --- a/support/dependencies/check-host-cmake.mk +++ b/support/dependencies/check-host-cmake.mk @@ -1,9 +1,11 @@ -# Set this to either 3.18 or higher, depending on the highest minimum -# version required by any of the packages bundled in Buildroot. If a -# package is bumped or a new one added, and it requires a higher -# version, our cmake infra will catch it and build its own. +# The cmake minimum version is set to either 3.18 or higher, +# depending on the highest minimum version required by any +# of the packages bundled in Buildroot. If a package is +# bumped or a new one added, and it requires a higher +# cmake version than the one provided by the host, our +# cmake infra will catch it and build its own. # -BR2_CMAKE_VERSION_MIN = 3.18 +BR2_CMAKE_VERSION_MIN = $(BR2_HOST_CMAKE_AT_LEAST) BR2_CMAKE_CANDIDATES ?= cmake cmake3 BR2_CMAKE ?= $(call suitable-host-package,cmake,\