diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2025-10-13 23:07:55 +0200 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2025-10-16 21:14:24 +0200 |
| commit | 5c3a3f9ac5533ec04815057f64600f665d52068c (patch) | |
| tree | 9cef8ebb7a0d94f97727665891b4f066b23b206a | |
| parent | 6d7865c16f4c2eebf5d66a401184324967033d23 (diff) | |
| download | gentoo-5c3a3f9ac5533ec04815057f64600f665d52068c.tar.gz gentoo-5c3a3f9ac5533ec04815057f64600f665d52068c.tar.bz2 gentoo-5c3a3f9ac5533ec04815057f64600f665d52068c.zip | |
cmake.eclass: Don't pass workaround when CMAKE_QA_COMPAT_SKIP is set
If QA checks are skipped, then it is counterproductive to hide
resulting errors by passing -DCMAKE_POLICY_VERSION_MINIMUM=3.5.
Better warn about the CMake 4 workaround possibly only getting the build
system to another error.
Bug: https://bugs.gentoo.org/951350
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
| -rw-r--r-- | eclass/cmake.eclass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index ebc78a333eef..91928b65b974 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -386,7 +386,8 @@ _cmake_minreqver-info() { eqawarn if has_version -b ">=dev-build/cmake-4"; then eqawarn "CMake 4 detected; building with -DCMAKE_POLICY_VERSION_MINIMUM=3.5" - eqawarn "This is merely a workaround and *not* a permanent fix." + eqawarn "This is merely a workaround to avoid CMake Error and *not* a permanent fix;" + eqawarn "there may be new build or runtime bugs as a result." eqawarn fi eqawarn "An upstreamable patch should take any resulting CMake policy changes" @@ -748,7 +749,9 @@ cmake_src_configure() { cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" ) fi - if [[ -n ${_CMAKE_MINREQVER_CMAKE305[@]} ]] && has_version -b ">=dev-build/cmake-4"; then + if ! [[ ${CMAKE_QA_COMPAT_SKIP} ]] && + [[ -n ${_CMAKE_MINREQVER_CMAKE305[@]} ]] && + has_version -b ">=dev-build/cmake-4"; then cmakeargs+=( -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ) fi |
