Skip to content

Support cmake 4.0 without workarounds #391

@brawer

Description

@brawer

When building libosmium 2.22.0 with cmake 4.0, configuration fails like this:

CMake Error at CMakeLists.txt:9 (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!
>>> ERROR: libosmium: build failed

See command line invocation and error log. As a workaround, users can pass -DCMAKE_POLICY_VERSION_MINIMUM=3.5, which we'll do for now when packaging libosmium for Alpine Linux. However, consider updating CMakeLists.txt, so people can build libosmium with modern CMake without trouble.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions