Skip to content

Bump cmake_minimum_required to 3.5 for CMake 4.x compatibility - #411

Open
davefx wants to merge 1 commit into
vitalif:masterfrom
davefx:bump-cmake-minimum-version
Open

davefx wants to merge 1 commit into
vitalif:masterfrom
davefx:bump-cmake-minimum-version

Conversation

@davefx

@davefx davefx commented May 19, 2026

Copy link
Copy Markdown

Summary

CMake 4.x has removed compatibility with cmake_minimum_required values below 3.5, so configuring grive2 with a modern CMake (e.g. on Ubuntu 26.04, which ships CMake 4.2) fails with:

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

This bumps the minimum required version to 3.5 so the project configures cleanly under CMake 4.x while still supporting older CMake releases (3.5 was released in 2016).

Test plan

  • cmake configures successfully on Ubuntu 26.04 with CMake 4.2.3
  • make builds grive, libgrive.a, btest, and unittest to completion
  • Resulting binary reports grive version 0.5.3

Note: a fully clean build on Ubuntu 26.04 also requires the changes from #403 (libgcrypt pkg-config fallback) and #410 (Boost 1.89+ no longer ships boost::system as a separate library). This PR intentionally only addresses the CMake version bump to keep it focused.

CMake 4.x removed compatibility with cmake_minimum_required values
below 3.5, so configuring with a modern CMake (e.g. on Ubuntu 26.04)
fails with:

  Compatibility with CMake < 3.5 has been removed from CMake.
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.

1 participant