UG4 / ugcore

The core functionality of UG4. Includes sources, build-scripts, and utility scripts.
https://github.com/UG4/ugcore
Other
36 stars 23 forks source link

CMake version #45

Closed LogashenkoDL closed 2 years ago

LogashenkoDL commented 3 years ago

It seems that Kitware stops supporting old versions of CMake. With CMake 3.19.0, I get the message:

CMake Deprecation Warning at externals/BoostForUG4/libs/system/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 value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

ug4 sets the minimum version to 2.6: cmake_minimum_required(VERSION 2.6)

Should we set the minimum version to 2.8.12 or higher?

LogashenkoDL commented 3 years ago

To clear up some details: It does not concern the Boost. It was only an example. Actually, there are a lot of messages, in particular CMake Deprecation Warning at ugcore/CMakeLists.txt:31 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

stephanmg commented 3 years ago

https://cmake.org/cmake/help/latest/release/3.19.html#deprecated-and-removed-features

mlampe commented 3 years ago

Do we need this compatibility for our own cmake stuff? Or will it continue to work if we just put cmake_minimum_required(VERSION 2.8.12) everywhere?

LogashenkoDL commented 3 years ago

I assume that it will work with cmake_minimum_required(VERSION 2.8.12), I can check. The only matter is that the version 2.6 should not be essential for anybody or for any other reason.

stephanmg commented 3 years ago

CMake 2.6 is from year 2008 - do still many people use this? Even on the compute clusters it should be > 2.6.?

LogashenkoDL commented 3 years ago

It seems to work with cmake_minimum_required(VERSION 2.8.12) and I am sure that there is no need for cmake 2.6 now. However, there are two issues:

  1. ughub creates the central CMakeLists.txt with that cmake_minimum_required(VERSION 2.6). I am not a contributor of ughub now and cannot change this. I shall try my best.
  2. There are some messages coming from the Boost library. - I was wrong last time. Is there a newer version for the up-to-date cmake available? (I mean, the version compatible with ug4.)
stephanmg commented 3 years ago

Hi @LogashenkoDL,

I think the relevant code is here (line 103-117): https://github.com/UG4/ughub/blob/master/ughub.py#L103-L117

Regards, Stephan

LogashenkoDL commented 3 years ago

So, there is now a new branch with the corrections, and the branch in ughub repository with the same name. As soon as the issue with Boost is solved, we can merge everything.

LogashenkoDL commented 2 years ago

The changes are committed to the repository.