From 431079909b6ffce12da3835adede778dbf07187f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 19 May 2025 18:36:57 +0200 Subject: cmake.eclass: If CMake 4 is detected, build w/ compat cmake arg -DCMAKE_POLICY_VERSION_MINIMUM=3.5 Signed-off-by: Andreas Sturmlechner --- eclass/cmake.eclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'eclass/cmake.eclass') diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 59835b50f4c..0eb6c07f9b3 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -559,6 +559,10 @@ cmake_src_configure() { eqawarn "${CATEGORY}/${PN} will fail to build w/o a fix." eqawarn "See also tracker bug #951350; check existing bug or file a new one for" eqawarn "this package." + if has_version -b ">=dev-build/cmake-4"; then + eqawarn "QA Notice: CMake 4 detected; building with -DCMAKE_POLICY_VERSION_MINIMUM=3.5" + cmakeargs+=( -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ) + fi fi pushd "${BUILD_DIR}" > /dev/null || die -- cgit v1.2.3