]> git.ipfire.org Git - thirdparty/libsolv.git/commit
Increase CMake version to 3.5 581/head
authorPetr Písař <ppisar@redhat.com>
Tue, 4 Mar 2025 08:02:22 +0000 (09:02 +0100)
committerPetr Písař <ppisar@redhat.com>
Tue, 4 Mar 2025 10:51:07 +0000 (11:51 +0100)
commit4a0b11dcdfffb23cd4ac1c1572caf2fd320b76bb
treecd31f6ef174622e97f0c106fd385e1adec32d18b
parent2a8217d6dddd2592e80b3e72764f6a3fef6b60db
Increase CMake version to 3.5

CMake 4.0.0 removed a support for CMake scripts older than 3.5 and a build
with CMake 4.0.0-rc2 fails like this:

    $ /usr/bin/cmake -S . -B redhat-linux-build
    CMake Warning (dev) at CMakeLists.txt:1 (PROJECT):
      cmake_minimum_required() should be called prior to this top-level project()
      call.  Please see the cmake-commands(7) manual for usage documentation of
      both commands.
    This warning is for project developers.  Use -Wno-dev to suppress it.

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

    -- Configuring incomplete, errors occurred!

There seems to be no way of making the script working with all
versions. CMake 3.5 was relased in 2016.

This patch increases the minimal version to 3.5 and moves it to the top
of the script as it needs to be the very first thing of a script as
recommeded by cmake:

    CMake Warning (dev) at CMakeLists.txt:1 (PROJECT):
      cmake_minimum_required() should be called prior to this top-level project()
      call.  Please see the cmake-commands(7) manual for usage documentation of
      both commands.

I did not set a supported upper version of CMake since I guess
we do not want to update it with every new minor CMake release.

Other printed CMake warnings are not news are not addressed with
this patch.
CMakeLists.txt
package/libsolv.spec.in