Closed marco-m closed 3 years ago
Pardon my ignorance – does this change improve anything in itself? I would totally agree with you that lower versions no longer have to be supported, but as long as no newer features are used, couldn't we leave the old requirements in?
Good question indeed :-) I think the answer is the following mix:
it removes the warnings when building VIGRA with a recent CMake (I see this with cmake 3.19 installed by brew on macOS):
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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.
Having said that, one could also argue that VIGRA could bump the version the moment somebody modernizes the cmake configuration (wether this will happen or not is another question :-).
Accepting this PR also means that be default cmake < 3.10 will refuse to build VIGRA...
Last point: if you accept the PR, I think that it should be modified to just remove any cmake_minimum_required()
from config/VigraDetectThreading.cmake
, I don't think it buys anything (and it already inconsistent: 2.8 vs 2.6)...
Thanks for elaborating; your arguments make a lot of sense.
Yes, I think one could remove the second cmake_minimum_required()
. Would you do so?
@hmeine updated
Thanks!
CMake 2.6 is really ancient and deprecated: newer CMake will stop supporting it. Updating also allows to use modern CMake techniques.
This also makes it easier for other CMake projects to use VIGRA (I stumbled on this while trying to build Hugin).
To give an idea, CMake is currently at 3.19. CMake 3.10 is what is shipped with Ubuntu 18.04, which has been released in April 2018.
If we wanted to be more conservative, we could maybe use the CMake version shipped with Ubuntu 16.04, but 16.04 itself will be end of life in April 2021...
Tested on macOS 10.15 Catalina.