ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
407 stars 191 forks source link

build: update cmake from 2.6 to 3.10 #492

Closed marco-m closed 3 years ago

marco-m commented 3 years ago

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.

hmeine commented 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?

marco-m commented 3 years ago

Good question indeed :-) I think the answer is the following mix:

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)...

hmeine commented 3 years ago

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?

marco-m commented 3 years ago

@hmeine updated

hmeine commented 3 years ago

Thanks!