summaryrefslogtreecommitdiff
path: root/eclass/cmake.eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2025-05-19 18:36:57 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2025-05-20 22:51:54 +0200
commit431079909b6ffce12da3835adede778dbf07187f (patch)
treebfd50a1534fe1251d81ed5ca31271a0fac34d3f2 /eclass/cmake.eclass
parentf339ee5843ba31255239bce871c470cfef590bee (diff)
downloadkde-431079909b6ffce12da3835adede778dbf07187f.tar.gz
kde-431079909b6ffce12da3835adede778dbf07187f.tar.bz2
kde-431079909b6ffce12da3835adede778dbf07187f.zip
cmake.eclass: If CMake 4 is detected, build w/ compat cmake arg
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/cmake.eclass')
-rw-r--r--eclass/cmake.eclass4
1 files changed, 4 insertions, 0 deletions
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