Skip to content

Extract dune_add_library from DuneMacros

Summary

Extract the CMake macro dune_add_library into a separate file DuneAddLibrary. Additionally, extract the implementation detail dune_expand_object_libraries using in dune_add_library only. This is one step of the larger MR !957 (closed) .

Details

The CMake file DuneMacros.cmake is a large collection of functions and macros and variables and other commands. It is grown over time and because of its size one cannot easily find, maintain, correct, and extend existing CMake functionality. It is not well documented and has some unused functions/macros. That is why we slowly start to separate this big file into smaller units. We try to follow a convention used in C++ (or the single-responsibility principle): Each file contains essentially just one function, at least only related functions, plus the internal macros as implementation details.

Note, the documentation style is changed towards a more modern style used in CMake itself. It will require some adaptions of the build-system documentation generator, see !1020 (merged).

Edited by Simon Praetorius

Merge request reports