--- eclass/cmake.eclass | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 8e3454fca5..d9013fbc01 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -117,6 +117,12 @@ fi # for econf and is needed to pass TRY_RUN results when cross-compiling. # Should be set by user in a per-package basis in /etc/portage/package.env. +# @ECLASS_VARIABLE: CMAKE_QA_COMPAT_SKIP +# @DEFAULT_UNSET +# @DESCRIPTION: +# 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_QA_SRC_DIR_READONLY # @USER_VARIABLE # @DEFAULT_UNSET @@ -364,15 +370,16 @@ cmake_src_configure() { local file re="cmake_minimum_required *\( *VERSION( .*\.\.\.| )(([[:digit:]]+)\.([[:digit:]]+))" local ver cmreq_isold - while read -d '' -r file ; do - [[ $(grep -hi "cmake_minimum_required" "$file") =~ $re ]] - ver="${BASH_REMATCH[2]}" - echo $file $ver - - if [[ -n $ver ]] && ver_test $ver -lt "3.5"; then - cmreq_isold=true - fi - done < <(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -print0) + if ! [[ ${CMAKE_QA_COMPAT_SKIP} ]]; then + while read -d '' -r file ; do + [[ $(grep -hi "cmake_minimum_required" "$file") =~ $re ]] + ver="${BASH_REMATCH[2]}" + + if [[ -n $ver ]] && ver_test $ver -lt "3.5"; then + cmreq_isold=true + fi + done < <(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -print0) + fi # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.) local build_rules=${BUILD_DIR}/gentoo_rules.cmake -- 2.49.0
signature.asc
Description: This is a digitally signed message part.