Skip to content

cmake 4.x: Configuration fails with Compatibility with CMake < 3.5 has been removed from CMake.. Workaround: -DCMAKE_POLICY_VERSION_MINIMUM=3.5. #385

Description

@dreirund

Ahoj,

with cmake 4.x, some changes did occur that break the cmake run for this package.

I get the following error when doing cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .:

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!

Adding -DCMAKE_POLICY_VERSION_MINIMUM=3.5 does work around this, but as I got from some other project, the cmake configuration code/ options should be updated to cater for cmake version 4.x.

I am using cmake version 4.0.2.

The project AIS-catcher had a similar issue, they could fix it by an update, see the patch linked in this comment. Maybe that can help you, too.

Regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions