DuneProject ----------- Initialize and finalize a Dune module. .. cmake:command:: dune_project Initialize a DUNE module from its top-level ``CMakeLists.txt``. .. code-block:: cmake dune_project() This command should be called from every module top-level ``CMakeLists.txt`` file. It reads ``dune.module``, initializes the standard ``Project*`` 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 :cmake:command:`finalize_dune_project()` at the end of the same ``CMakeLists.txt`` file. .. cmake:command:: finalize_dune_project Finalize the top-level DUNE project setup and generate export metadata. .. code-block:: cmake finalize_dune_project() .. versionchanged:: 2.10 The legacy arguments to :cmake:command:`finalize_dune_project()` were removed. The command no longer takes parameters. This command should be run at the end of every top-level ``CMakeLists.txt`` file. 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.cmake`` in the project directory, a private header file ``${module}-private-config.hh`` and a public header file ``${module}-config.hh`` are created. The public header is installed. For legacy reasons, the file ``config.h`` with collected upstream configuration files is also created. For more information, see the build system documentation. .. cmake:command:: dune_mark_module_as_required_dependency Force a suggested module dependency to become required downstream. .. code-block:: cmake dune_mark_module_as_required_dependency(MODULE ) .. versionadded:: 2.11 ``MODULE`` Name 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 after :cmake:command:`dune_project()` and before :cmake:command:`finalize_dune_project()`.