cmake: bump minimum required to version 3.5.0 #859

Merged
scribam merged 1 commit from cmake-minimum-required into dev 2023-07-22 11:35:25 -05:00
scribam commented 2023-07-12 15:32:48 -05:00 (Migrated from github.com)

This fixes the following warning when configuring with CMake 3.27+:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
This fixes the following warning when configuring with CMake 3.27+: ``` CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. ```
Cyan4973 commented 2023-07-12 17:02:51 -05:00 (Migrated from github.com)

Moving the minimum version to v3.5 is fine by me,
as it's the version supported by Ubuntu Xenial, which is the oldest linux distribution worth supporting in 2023 imho.

But we don't update a minimum version just for the sake of it, since it mechanically reduces the addressable scope of the cmake script. We must "gain" something from this change.
It seems the gain in this case is a higher guarantee to remain supported in some future versions of cmake, which may drop support for versions older than v3.5 in some unspecified future.
That's a good enough reason I believe.

The PR is also well done, updating the cmake min version test introduced by @t-mat, and exploiting the increased minimum version to slightly reduce complexity of the script.

The only remaining question is if it's worth updating it "right now", or can it wait after the imminent release.

I would tend to lean towards the latter, as there is no immediate risk (the only downside is a warning message for some really recent versions of cmake) but increasing the minimum version may prevent some older systems from building xxhash with cmake. While it's probably not major, it still is a negative.

Moving the minimum version to `v3.5` is fine by me, as it's the version supported by Ubuntu Xenial, which is the oldest linux distribution worth supporting in 2023 imho. But we don't update a minimum version just for the sake of it, since it mechanically reduces the addressable scope of the cmake script. We must "gain" something from this change. It seems the gain in this case is a higher guarantee to remain supported in some future versions of `cmake`, which may drop support for versions older than `v3.5` in some unspecified future. That's a good enough reason I believe. The PR is also well done, updating the cmake min version test introduced by @t-mat, and exploiting the increased minimum version to slightly reduce complexity of the script. The only remaining question is if it's worth updating it "right now", or can it wait after the imminent release. I would tend to lean towards the latter, as there is no immediate risk (the only downside is a warning message for some really recent versions of `cmake`) but increasing the minimum version may prevent some older systems from building `xxhash` with `cmake`. While it's probably not major, it still is a negative.
Sign in to join this conversation.
No description provided.