Skip to content
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

build: Make it compatible with CMake 4.0 #3521

Conversation

debarshiray
Copy link
Contributor

Compatibility with versions of CMake older than 3.5 has been removed from CMake 4.0 [1]. This leads to:

  CMake Error at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
    Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument <min> value.  Or, use the <min>...<max>
    syntax to tell CMake that the project requires at least <min> but
    has been updated to work with policies introduced by <max> or
    earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring
    anyway.

It's necessary to be compatible with CMake 4.0 because it is now in Fedora Rawhide. The lack of compatibility with CMake older than 3.5 shouldn't be a big problem because even RHEL 8.10 has CMake 3.26.5.

[1] https://cmake.org/cmake/help/latest/release/4.0.html

Compatibility with versions of CMake older than 3.5 has been removed
from CMake 4.0 [1].  This leads to:

  CMake Error at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
    Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument <min> value.  Or, use the <min>...<max>
    syntax to tell CMake that the project requires at least <min> but
    has been updated to work with policies introduced by <max> or
    earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring
    anyway.

It's necessary to be compatible with CMake 4.0 because it is now in
Fedora Rawhide.  The lack of compatibility with CMake older than 3.5
shouldn't be a big problem because even RHEL 8.10 has CMake 3.26.5.

[1] https://cmake.org/cmake/help/latest/release/4.0.html
@debarshiray debarshiray force-pushed the wip/rishi/src-plugins-libdnf-cmake-4.0 branch from 940fd89 to 6a9535e Compare March 3, 2025 19:52
@ptoscano
Copy link
Contributor

ptoscano commented Mar 4, 2025

Hi @debarshiray,

changing the version is only the tip of the iceberg; since that cmake buildsystem is a bit old, I took the opportunity to refresh/improve it a bit: #3522

Because of that, I'm closing this PR -- thanks anyway for it, and for raising the awareness of the cmake compat issue!

@ptoscano ptoscano closed this Mar 4, 2025
@debarshiray
Copy link
Contributor Author

changing the version is only the tip of the iceberg; since that cmake buildsystem is a bit old, I took the opportunity to refresh/improve it a bit: #3522

Because of that, I'm closing this PR -- thanks anyway for it, and for raising the awareness of the cmake compat issue!

Cool, thanks!

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.

2 participants