DuneProject¶
Initialize and finalize a Dune module.
- dune_project¶
Initialize a DUNE module from its top-level
CMakeLists.txt.dune_project()This command should be called from every module top-level
CMakeLists.txtfile. It readsdune.module, initializes the standardProject*variables, finds required and suggested DUNE dependencies, enables the project documentation and header-check infrastructure, and prepares the build system for module-specific macros and package exports.Call
finalize_dune_project()at the end of the sameCMakeLists.txtfile.
- finalize_dune_project¶
Finalize the top-level DUNE project setup and generate export metadata.
finalize_dune_project()Changed in version 2.10: The legacy arguments to
finalize_dune_project()were removed. The command no longer takes parameters.This command should be run at the end of every top-level
CMakeLists.txtfile. Among other things it creates the cmake package configuration file and package version file. Modules can add additional entries to these files by setting the variable${ProjectName}_INIT.Based on the template
config.h.cmakein the project directory, a private header file${module}-private-config.hhand a public header file${module}-config.hhare created. The public header is installed. For legacy reasons, the fileconfig.hwith collected upstream configuration files is also created. For more information, see the build system documentation.
- dune_mark_module_as_required_dependency¶
Force a suggested module dependency to become required downstream.
dune_mark_module_as_required_dependency(MODULE <module>)
Added in version 2.11.
MODULEName of the suggested dependency that should be treated as required for downstream consumers.
Use this when a dependency listed only in the section
Suggested:of the dune.module file becomes effectively required once it is found, for example because corresponding source files are compiled into the module library. Call this command afterdune_project()and beforefinalize_dune_project().