public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andreas Sturmlechner <asturm@gentoo.org>
To: gentoo-dev@lists.gentoo.org, kde@gentoo.org, base-system@gentoo.org
Subject: Re: [gentoo-dev] [PATCH v2 3/3] cmake.eclass: Add CMAKE_QA_COMPAT_SKIP flag to skip  compat checks
Date: Mon, 19 May 2025 20:47:05 +0200	[thread overview]
Message-ID: <2233502.irdbgypaU6@tuxbrain.fritz.box> (raw)
In-Reply-To: <6166619.lOV4Wx5bFT@tuxbrain.fritz.box>

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

---
 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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 789 bytes --]

  parent reply	other threads:[~2025-05-19 18:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-17 20:04 [gentoo-dev] [PATCH] cmake.eclass: Add recursive CMakeLists.txt unsupported version detection Andreas Sturmlechner
2025-05-17 20:42 ` Ionen Wolkens
2025-05-17 21:03   ` Ionen Wolkens
2025-05-17 21:30     ` Andreas Sturmlechner
2025-05-18  2:42   ` Eli Schwartz
2025-05-19 18:44 ` [gentoo-dev] [PATCH v2 1/3] " Andreas Sturmlechner
2025-05-19 18:46   ` [gentoo-dev] [PATCH v2 2/3] cmake.eclass: If CMake 4 is detected, build w/ compat cmake arg Andreas Sturmlechner
2025-05-19 18:47   ` Andreas Sturmlechner [this message]
2025-05-19 18:51   ` [gentoo-dev] [PATCH v2 1/3] cmake.eclass: Add recursive CMakeLists.txt unsupported version detection Michał Górny
2025-05-19 18:58     ` Andreas Sturmlechner
2025-06-02 20:44 ` [gentoo-dev] [PATCH v3 " Andreas Sturmlechner
2025-06-02 20:46   ` [gentoo-dev] [PATCH v3 2/3] cmake.eclass: If CMake 4 is detected, build w/ compat cmake arg Andreas Sturmlechner
2025-06-02 20:47   ` [gentoo-dev] [PATCH v3 3/3] cmake.eclass: Add CMAKE_QA_COMPAT_SKIP flag to skip compat checks Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2233502.irdbgypaU6@tuxbrain.fritz.box \
    --to=asturm@gentoo.org \
    --cc=base-system@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=kde@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox