Skip to content

Restructure the cmake library

Simon Praetorius requested to merge issue/cmake-restructure-library into master

Summary

This MR applies some simplifications to the CMake files that might also fix some recent bugs, e.g. #137 (closed).

Summary of the changes:

  • The dunegrid library is created in the root CMakeLists.txt file. This allows to add properties and sources in sub-directories directly to that target
  • The dunealbertagrid library targets are also created in the root CMakeLists file. They are linked against dunegrid and the Alberta library directly and flags are set directly to this target. Instead of separating object libraries and library targets, there is only the target created and sources added in subdirectires.
  • The maximal tested world-dimension for Alberta libraries is reduced to 3, but a cmake variable is added to increase this maximal world dimension. Almost all code uses maximal dimension 3, there are only rare exceptions.
  • The UGGrid library is a dune module. Thus it is already linked automatically if found by module dependencies. No need for any dune_add_ug_flags function. This function is thus deprecated and any code from this removed. Also the package falgs are not registered anymore. These should be available directly by the dune module cmake config file.

Todo

  • Add CHANGELOG entry for the main changes important for the user
Edited by Simon Praetorius

Merge request reports