Skip to content

Dune "policies" in a multi-project build

We have introduced the DunePolicy system in !1269 (merged). It works fine in a single project CMake build. Using it in a multi-project build, e.g., a super-build setup shows some issues with the current approach:

  • The policies are GLOBAL properties. Thus, once set in one project, the values is changed also for all later projects
  • The policies are not project-aware
  • All the default variables, like DUNE_POLICY_DEFAULT are cache variables not prefixed by the package name

How can we add policies that have a local project scope, but a unique global name?

Edited by Simon Praetorius