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: Increase CMake minimal version to 3.5.0 #1700

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

ppisar
Copy link
Contributor

@ppisar ppisar commented Feb 28, 2025

CMake 4.0.0 removed a support for CMake < 3.5, causing a configure error:

CMake Error at CMakeLists.txt:7 (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.

This patch moves CMakeList.txt to the earliest supported version, 3.5.0. It also ports the script to CMP0005 policy which cannot be disabled anymore.

New CMake deprecation warnigs will be resolved later.

Resolves #1699

@ppisar ppisar requested a review from a team as a code owner February 28, 2025 14:38
@ppisar ppisar requested review from m-blaha and removed request for a team February 28, 2025 14:38
CMake 4.0.0 removed a support for CMake < 3.5, causing a configure
error:

 CMake Error at CMakeLists.txt:7 (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.

This patch moves CMakeList.txt to the earliest supported version,
3.5.0. It also ports the script to CMP0005 policy which cannot be
disabled anymore. It also moves GNUInstallDirs inclusion after
project() as it requires it for probing a library path.

New CMake deprecation warnigs will be resolved later.

Resolves rpm-software-management#1699
@kontura
Copy link
Contributor

kontura commented Mar 3, 2025

The failing tests are not related.
Thanks.

@kontura kontura merged commit 099600c into rpm-software-management:dnf-4-master Mar 3, 2025
7 of 11 checks 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.

dnf-4-master: fails to build with cmake-4.0.0
2 participants