Skip to content
Snippets Groups Projects

[CMake] Add a helper function to extract paths

Merged Dominic Kempf requested to merge feature/clever-cmake-path-helpers into master

Developing CMake code yourself you often need to access path variables like: What is the build directory of dune-grid? What is the cmake modules directory of dune-common? Unfortunately, there are two problems with that:

  • The extract method changes depending on whether you are currently configuring the module itself or whether you are configuring a downstream module.
  • Normal people tend to forget the naming schemes of the path variable.

This commit introduces a function with a documented interface that allows for querying dune module paths. You give it the name of the dune module, the name of the return variable and a path type. Currently implemented path types are CMAKE_MODULES and BUILD_DIR. More may be added as needed.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading