Deprecation warnings about CMake < 3.5.
1uc opened this issue · 4 comments
On cmake==3.27.7
I'm seeing the following warnings:
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.
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_policy):
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.
These might be helpful when picking a default:
https://cliutils.gitlab.io/modern-cmake/chapters/intro/dodonot.html (Section: Selecting a minimum in 2022)
https://cliutils.gitlab.io/modern-cmake/chapters/intro/newcmake.html
@1uc do you happen to know what the plans are for HighFive?
I set the minimum in libsonata, but then I get this:
CMake Deprecation Warning at 3rdparty/HighFive/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.
Ah, that makes a lot of sense. Sorry, for not checking HighFive. The plan is to completely rewrite HighFive's CMake. The rewrite will change things. Hence, I only want to do it in a v3.0.0. Therefore, I'm collecting smaller issues so that if we make a breaking change we can discuss them all in one go; and then pick what we're willing to change/maintain. And that's why nothing is changing in HighFive's CMake.
I should probably try to find out what the effective minimum version for HighFive is and encode that value. Somehow I doubt it's cmake==3.0.0
.
No worries; pybind is also emitting errors, and I think they'll be fixing it in the next version (at least there is work in progress on that front, from what I can tell). I can still proceed by cleaning up my own mess and setting a minimum version.
I should probably try to find out what the effective minimum version for HighFive is and encode that value. Somehow I doubt it's cmake==3.0.0.
Based on your cliutils link above (very handy, thanks) I settled on 3.16
as a starting point; at least then it's likely I'm not using very old constructs.