CMake Parameters#

CMake Xmera Build Parameters#

CMake Parameter

Description

Default

XMERA_MODULE_ROOTS

Semicolon-separated roots containing modules to add to the build. Each directory must contain a CMakeLists.txt. e.g. "${sourceDir}/fswAlgorithms/;${sourceDir}/simulation/;${sourceDir}/moduleTemplates/"

Empty

XMERA_ENABLE_GROUPS

Semicolon-separated module group names to enable. The group names are hierarchical lists in thr form of “a.b.c” corresponding to directory structure. For example group specifier “a.b” will build all module in “b” and below, while specifying “a” will build all modules in “b” and “c”.

Empty

XMERA_ENABLE_INTERNAL

Whether to enable modules that are marked as INTERNAL.

NO

URL_SPICE_KERNEL

URL from which to download spice kernel de430.bsp dependency

https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430.bsp

CMake Example (same on macOS or Linux)#

While it is significantly easier to use the provided CMake presets or setting up your own user present, there may be a time when you want to call CMake and pass the parameters. The following are simple examples of doing that.

cd src
cmake -S . -B ../build \
    -DXMERA_MODULE_ROOTS="${sourceDir}/fswAlgorithms/;${sourceDir}/simulation/;${sourceDir}/myModules/" \
    -DXMERA_ENABLE_GROUPS="simulation;fswAlgorithms;myModules" \
    -DXMERA_ENABLE_INTERNAL=YES
cmake --build ../build