From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5AF19158176 for ; Tue, 14 Oct 2025 22:08:46 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 46AA7341081 for ; Tue, 14 Oct 2025 22:08:46 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AA176110561; Tue, 14 Oct 2025 22:08:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A1CB7110561 for ; Tue, 14 Oct 2025 22:08:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 52AFB341006 for ; Tue, 14 Oct 2025 22:08:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D6A03AFC for ; Tue, 14 Oct 2025 22:08:37 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1760479400.bc4d5d0944cb44e5d6de4a7af34ff5cd6ea3a53f.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: bc4d5d0944cb44e5d6de4a7af34ff5cd6ea3a53f X-VCS-Branch: master Date: Tue, 14 Oct 2025 22:08:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a3c97bc0-2c28-484e-a2e2-223493f74359 X-Archives-Hash: 9107c0691d56a91099463d88d568a5a2 commit: bc4d5d0944cb44e5d6de4a7af34ff5cd6ea3a53f Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Oct 12 21:34:57 2025 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Oct 14 22:03:20 2025 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=bc4d5d09 cmake.eclass: Check and warn about <3.10 CMake minimum versions - _cmake_minreqver-check(): Results are stored in new _CMAKE_MINREQVER_CMAKE310 array. - _cmake_minreqver-info(): Dump _CMAKE_MINREQVER_CMAKE310 array as eqawarn Signed-off-by: Andreas Sturmlechner gentoo.org> eclass/cmake.eclass | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 77ba1ccfac..dfa59bf06f 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -132,6 +132,15 @@ fi # version lower than 3.5. _CMAKE_MINREQVER_CMAKE305=() +# @ECLASS_VARIABLE: _CMAKE_MINREQVER_CMAKE310 +# @DEFAULT_UNSET +# @DESCRIPTION: +# Internal array containing : tuples detected by +# _cmake_minreqver-check() for any CMakeLists.txt with cmake_minimum_required +# version lower than 3.10 (causes CMake warnings as of 4.0) on top of those +# already added to _CMAKE_MINREQVER_CMAKE305. +_CMAKE_MINREQVER_CMAKE310=() + # @ECLASS_VARIABLE: CMAKE_QA_SRC_DIR_READONLY # @USER_VARIABLE # @DEFAULT_UNSET @@ -280,6 +289,11 @@ _cmake_minreqver-check() { _CMAKE_MINREQVER_CMAKE305+=( "${file}":"${ver}" ) chk=0 fi + # we don't want duplicates that were already flagged + if [[ $chk != 0 ]] && ver_test "${ver}" -lt "3.10"; then + _CMAKE_MINREQVER_CMAKE310+=( "${file}":"${ver}" ) + chk=0 + fi fi return ${chk} } @@ -287,8 +301,13 @@ _cmake_minreqver-check() { # @FUNCTION: _cmake_minreqver-info # @INTERNAL # @DESCRIPTION: -# QA notice printout for build systems unsupported w/ CMake-4. +# QA Notice and file listings for any CMakeLists.txt found with +# cmake_minimum_required versions lower than supported or deprecated by CMake 4. _cmake_minreqver-info() { + if [[ -z ${_CMAKE_MINREQVER_CMAKE305[@]} ]] && + [[ -z ${_CMAKE_MINREQVER_CMAKE310[@]} ]]; then + return + fi local info if [[ -n ${_CMAKE_MINREQVER_CMAKE305[@]} ]]; then eqawarn "QA Notice: Compatibility with CMake < 3.5 has been removed from CMake 4," @@ -306,7 +325,24 @@ _cmake_minreqver-info() { 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." fi + eqawarn + fi + if [[ -n ${_CMAKE_MINREQVER_CMAKE305[@]} ]] || + [[ -n ${_CMAKE_MINREQVER_CMAKE310[@]} ]]; then + eqawarn "QA Notice: Compatibility with CMake < 3.10 will be removed in a future release." + eqawarn "If not fixed in upstream's code repository, we should make sure they are aware." + eqawarn + 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 + eqawarn + fi fi + eqawarn "An upstreamable patch should take any resulting CMake policy changes" + eqawarn "into account. See also:" + eqawarn " https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html" } # @FUNCTION: _cmake_modify-cmakelists