Archetype: cmake_component_root.mustache

Table of Contents

Tiny dispatcher: the component root CMakeLists.txt just descends into src/, tests/ and modeling/. Used by every component profile (component, component-api, component-core, component-service); output projects/{component_full}/CMakeLists.txt. CMake target declaration for this component. Wires sources, include paths, link dependencies, and the export macro.

See the Template variable reference for the complete list of available variables and their semantics.

Template

The full template source. Edit here and re-tangle with compass build --direct tangle_codegen_templates to regenerate library/templates/cmake_component_root.mustache.

{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/cmake.org. Edit the org source. }}
{{{cmake_license}}}
{{#component}}
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/modeling)
{{/component}}

See also

Emacs 29.1 (Org mode 9.6.6)