[CMake] Add a helper function to extract paths
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
Activity
Added 24 commits:
- 37b2df59...154cfac7 - 19 commits from branch
master
- 4eb8b692 - [CMake] Add a helper function to extract paths
- 125e47eb - [cmake] Add a SOURCE_DIR option to dune_module_path
- a09a4858 - [Doc] Correct and enhance the documentation of dune_module_path
- 2e0f01f7 - [CMake] Add a SCRIPT_DIR option to dune_module_path
- e665cdd8 - [CMake] Use dune_module_path instead of dune_common_script_dir
Toggle commit list- 37b2df59...154cfac7 - 19 commits from branch
mentioned in commit 08be7d96
mentioned in merge request !86 (merged)
mentioned in commit 110968b5
Mentioned in commit 08be7d96
Mentioned in commit 110968b5
Please register or sign in to reply