Add include directories to library target
This properly sets up the dune-foamgrid main target to follow modern CMake practices where the target holds all the information to propagate transitively to other targets. The MR also suppresses the warning that a Dune policy is not set, by setting it to NEW. The consequence is that there is no global include_directories(...)
call in dune_project
anymore and one needs to link all targets that need Dune include directories either to the library target Dune::FoamGrid
(or dunefoamgrid
) or set the include directories manually, e.g., using the utility function dune_default_include_directories(<target> [PUBLIC|PRIVATE|INTERFACE])
. This is especially important for tests. That is why tests should be linked against the library target.
Edited by Simon Praetorius
Merge request reports
Activity
Please register or sign in to reply