On 5/17/25 4:42 PM, Ionen Wolkens wrote: > On Sat, May 17, 2025 at 10:04:16PM +0200, Andreas Sturmlechner wrote: >> We need to ramp up detection of unsupported CMake build systems with >> CMake 4. This will detect CMakeLists.txt files setting insufficient >> cmake_minimum_required VERSION level even in project subdirectories, >> putting out appropriate eqawarn message about the need to fix ${PN}. >> >> That makes us not rely on tinderbox runs w/ unmasked cmake-4 slowly >> being able to build everything up to leaf packages, and also helps >> detect insufficient subproject minimums that could otherwise be masked >> by USE flag choice. >> >> Bug: https://bugs.gentoo.org/951350 >> Signed-off-by: Andreas Sturmlechner <ast...@gentoo.org> >> --- >> eclass/cmake.eclass | 20 +++++++++++++++++++- >> 1 file changed, 19 insertions(+), 1 deletion(-) >> >> diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass >> index 083b566d26..8a3f2db7c4 100644 >> --- a/eclass/cmake.eclass >> +++ b/eclass/cmake.eclass >> @@ -243,6 +243,25 @@ _cmake_modify-cmakelists() { >> # Only edit the files once >> grep -qs "<<< Gentoo configuration >>>" >> "${CMAKE_USE_DIR}"/CMakeLists.txt && return 0 >> >> + local x re="VERSION( .*\.\.\.| )(([[:digit:]]+)\.([[:digit:]]+))" >> + local ver isold >> + for x in $(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" >> -exec \ > > Just to note, may be rare so guess not a big deal but, while crawling > all sub-directories, it could pickup some extra CMakeLists.txt that are > entirely unused (by us) and don't need attention downstream. Some > packages keep a lot of weird unused stuff, or bits that we disable or > unbundle, e.g. qtwebengine adds BUILD.gn files for 3rdparty stuff but > the (unused) upstream CMakeLists.txt are often left there and I wouldn't > want a QA bug filed over that if any were bad. > > May be hard to get the real picture without just testing with cmake-4.
It has come up in other contexts as well, that eqawarns should probably (and unfortunately all too often do not) come with a variable that ebuilds can set to disable false positives, e.g. QA_CONFIG_IMPL_DECL_SKIP So let us say QA_CMAKE_COMPAT_SKIP=( 'path/to/unused subdir/' ) -- Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature