diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2025-06-13 16:28:09 +0200 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2025-06-13 19:18:14 +0200 |
| commit | d88d09e64c447e14f072956e45605765cb29268e (patch) | |
| tree | 056efe26b940f6d971fe722147fc4ed37a76aad6 | |
| parent | 58d0a20a399a795bef840a17c584380042c1fd83 (diff) | |
| download | kde-d88d09e64c447e14f072956e45605765cb29268e.tar.gz kde-d88d09e64c447e14f072956e45605765cb29268e.tar.bz2 kde-d88d09e64c447e14f072956e45605765cb29268e.zip | |
cmake.eclass: Introduce _CMAKE_MINREQVER_UNSUPPORTED
Allows to split detection/eqawarn and applying cmakearg over different
phases.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
| -rw-r--r-- | eclass/cmake.eclass | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index b6d96770086..47f96227d3e 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -123,6 +123,11 @@ fi # If set, skip detection of CMakeLists.txt unsupported in CMake 4 in case of # false positives (e.g. unused outdated bundled libs). +# @ECLASS_VARIABLE: _CMAKE_MINREQVER_UNSUPPORTED +# @DEFAULT_UNSET +# @DESCRIPTION: +# Is set to true if an unsupported cmake_minimum_required value was detected. + # @ECLASS_VARIABLE: CMAKE_QA_SRC_DIR_READONLY # @USER_VARIABLE # @DEFAULT_UNSET @@ -372,7 +377,7 @@ cmake_src_configure() { # Fix xdg collision with sandbox xdg_environment_reset - local file ver cmreq_isold + local file ver if ! [[ ${CMAKE_QA_COMPAT_SKIP} ]]; then while read -d '' -r file ; do ver=$(sed -ne "/cmake_minimum_required/I{s/.*\(\.\.\.*\|\s\)\([0-9.]*\)\([)]\|\s\).*$/\2/p;q}" \ @@ -380,7 +385,7 @@ cmake_src_configure() { ) if [[ -n $ver ]] && ver_test $ver -lt "3.5"; then - cmreq_isold=true + _CMAKE_MINREQVER_UNSUPPORTED=true fi done < <(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -print0) fi @@ -566,7 +571,7 @@ cmake_src_configure() { cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" ) fi - if [[ ${cmreq_isold} ]]; then + if [[ ${_CMAKE_MINREQVER_UNSUPPORTED} ]]; then eqawarn "QA Notice: Compatibility with CMake < 3.5 has been removed from CMake 4," 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" |
