Configuration

Selecting build features and using Rodin's generated configuration.

Rodin's build selects execution backends, optional dependencies, tests and documentation through CMake options. CMake generates Rodin/Configure.h from Configure.h.in; exported CMake targets also carry the include paths, compile definitions and dependencies needed by consumers.

Configure a build

cmake -S . -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DRODIN_USE_MPI=ON \
  -DRODIN_MULTITHREADED=ON \
  -DRODIN_USE_PETSC=OFF
cmake --build build

These switches select different capabilities:

CMake optionPurpose
RODIN_USE_MPIDistributed-memory support; see MPI.
RODIN_MULTITHREADEDShared-memory execution policies used by Assembly.
RODIN_USE_OPENMPOpenMP dependency support.
RODIN_USE_PETSCPETSc-backed linear algebra and variational operations; see PETSc.
RODIN_USE_SCOTCHGraph-based mesh partitioning through Scotch.
RODIN_BUILD_UNIT_TESTSUnit-test executables.
RODIN_BUILD_MANUFACTURED_TESTSManufactured-solution tests.
RODIN_BUILD_CONVERGENCE_TESTSConvergence studies.
RODIN_BUILD_BENCHMARKSBenchmark executables.
RODIN_BUILD_DOCAPI and guide documentation.
RODIN_USE_MCSSThe styled documentation renderer.

Dependency availability and the requested options determine the configured build. Inspect build/CMakeCache.txt for its selected CMake values. Optional backends have their own dependency requirements; enabling an option does not install the corresponding system library.

Inspect configuration in C++

#include <Rodin/Configure.h>

#if defined(RODIN_USE_MPI)
// Implementation requiring Rodin's MPI configuration.
#endif

Feature macros in the generated header are generally defined when enabled and absent otherwise. The Configure.h reference documents individual version, feature and capacity macros. Some backend definitions are supplied by exported CMake targets; link the relevant Rodin targets to retain their compile definitions and dependencies.

Configure.h.in is the source template, and Configure.h is the generated include. Regenerate the build after changing CMake selections rather than editing the generated header or manually enabling a backend in consumer code.

Module-specific controls

A small number of capacity and precondition macros are declared by their owning headers. Their references remain attached to those files: