-DCMAKE_POLICY_VERSION_MINIMUM=3.5

Signed-off-by: Andreas Sturmlechner <ast...@gentoo.org>
---
 eclass/cmake.eclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index ca6c03f335..8e3454fca5 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -560,6 +560,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
-- 
2.49.0

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to