libosmium icon indicating copy to clipboard operation
libosmium copied to clipboard

Support cmake 4.0 without workarounds

Open brawer opened this issue 5 months ago • 2 comments

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.

brawer avatar Jul 15 '25 14:07 brawer