8000 cmake.eclass: Add src_install() check for CMake-4-incompatible modules by a17r · Pull Request #1047 · gentoo/kde · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cmake.eclass: Add src_install() check for CMake-4-incompatible modules #1047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8000
Merged
merged 4 commits into from
Jun 14, 2025

Conversation

a17r
Copy link
Member
@a17r a17r commented Jun 13, 2025

No description provided.

# Internal function for detecting occurrence of lower-than-specified
# <lt-version> in cmake_minimum_required of a given CMake file <path>.
# Returns 1 if the regex matched (a lower-than-specified version found).
_cmake_minreqver-detect() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name it "_cmake_minreqver_lt" or alike, to make it clear it detects "lower than" version. Or just make it "_cmake_minreqver_test" and let the caller specify the operator.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8000

@mgorny we don't ever need to look in the other direction, so _cmake_minreqver_lt would be fine.

and then reverse the return value logic, so success follows the wording of the function name, I guess

Allows to split detection/eqawarn and applying cmakearg over different
phases.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
a17r added 3 commits June 14, 2025 12:47
- _cmake_minverreq-lt(): New function for reusability of regex
- Optimise #1: Reuse existing loop over CMakeLists.txt files
- Optimise gentoo#2: If _CMAKE_MINREQVER_UNSUPPORTED is already set, then no
  further run of _cmake_minverreq-lt is necessary since we currently throw
  away the info on affected files
- Relegate "CMake 4 detected; ..." to be a non-QA Notice, it is just an
  addendum

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Thanks-to: Ionen Wolkens <ionen@gentoo.org>
Closes: https://bugs.gentoo.org/957990
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
@gentoo-bot gentoo-bot merged commit 48ca364 into gentoo:master Jun 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0