-
Notifications
You must be signed in to change notification settings - Fork 192
Description
cmake 3.27 has now deprecated support for versions prior to 3.5 but hunter is littered with minimum required statements such as:
cmake_minimum_required(VERSION 3.0)
The effect of this with the latest release is to have lots of warnings along the lines of (when configuring with hunter):
CMake Deprecation Warning at C:/hunter/cmake/modules/hunter_calculate_config_sha1.cmake:4 (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.
Things are still working: this is just a warning and the what is effectively a compatibility mode with 3.0 is still working, albeit
rather noisily. However the warnings are annoying (you get multiple ones per build) and do hint of a larger issue in the
near(?) future when the support is actually removed. At that point (based on what happened when earliest minimum
support went up last time) there will still be a warning but, instead of acting in (say) 3.0 compatibility mode, cmake will
act in 3.5 - assuming you are not actually using cmake that ancient.
The obvious thing to do would be to place all cmake_minimum_required within hunter, where the min is less that 3.5, with something like:
cmake_minimum_required(3.0...3.5)
With any cmake version after 3.12, this would run in 3.5 compatibility-mode instead of 3.0. If that does not work then it
would need fixing.