summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2025-10-19 23:45:48 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2025-10-19 23:45:48 +0200
commit4e35968ea53138d8b2726f8f2b9b1804dc291767 (patch)
tree65c3ea6227e90a090302378fae4aa8a0c35c552e /eclass
parent69a73cbdc1e3cd5f4cee33829755d4e71a8f9855 (diff)
downloadkde-4e35968ea53138d8b2726f8f2b9b1804dc291767.tar.gz
kde-4e35968ea53138d8b2726f8f2b9b1804dc291767.tar.bz2
kde-4e35968ea53138d8b2726f8f2b9b1804dc291767.zip
cmake.eclass: _cmake_modify-cmakelists(): Fix _cmake_minreqver-check call
_cmake_minreqver-check may be called from any phase, so <file> path must be absolute. As a quick fix, push the path mangling into the output function _cmake_minreqver-info which (currently) is only called from cmake_prepare. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cmake.eclass14
1 files changed, 10 insertions, 4 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index eba47d2405d..f214ec36c2d 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -370,20 +370,26 @@ _cmake_minreqver-info() {
case ${1} in
305)
eqawarn "The following CMakeLists.txt files are causing errors:"
- for info in ${_CMAKE_MINREQVER_CMAKE305[*]}; do eqawarn " ${info}"; done
+ for info in ${_CMAKE_MINREQVER_CMAKE305[*]}; do
+ eqawarn " ${info#"${CMAKE_USE_DIR}/"}";
+ done
eqawarn
;;
310)
if [[ -n ${_CMAKE_MINREQVER_CMAKE310[@]} ]]; then
eqawarn "The following CMakeLists.txt files are causing warnings:"
- for info in ${_CMAKE_MINREQVER_CMAKE310[*]}; do eqawarn " ${info}"; done
+ for info in ${_CMAKE_MINREQVER_CMAKE310[*]}; do
+ eqawarn " ${info#"${CMAKE_USE_DIR}/"}";
+ done
eqawarn
fi
;;
316)
if [[ ${warnlvl} -ge 316 ]] && [[ -n ${_CMAKE_MINREQVER_CMAKE316[@]} ]]; then
eqawarn "The following CMakeLists.txt files are causing warnings:"
- for info in ${_CMAKE_MINREQVER_CMAKE316[*]}; do eqawarn " ${info}"; done
+ for info in ${_CMAKE_MINREQVER_CMAKE316[*]}; do
+ eqawarn " ${info#"${CMAKE_USE_DIR}/"}";
+ done
eqawarn
fi
;;
@@ -444,7 +450,7 @@ _cmake_modify-cmakelists() {
fi
# Detect unsupported minimum CMake versions unless CMAKE_QA_COMPAT_SKIP is set
if ! [[ ${CMAKE_QA_COMPAT_SKIP} ]]; then
- _cmake_minreqver-check "${file#"${CMAKE_USE_DIR}/"}"
+ _cmake_minreqver-check "${file}"
fi
done < <(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -print0 || die)