Archetype: cmake_component_modeling.mustache

Table of Contents

modeling/CMakeLists.txt for every component profile: the generate_<name>_diagram PlantUML target, wired into make_all_diagrams. Output projects/{component_full}/modeling/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_modeling.mustache.

{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/cmake.org. Edit the org source. }}
{{{cmake_license}}}
{{#component}}
set(name "{{full_name}}")

set(diagram_target generate_${name}_diagram)
add_custom_target(${diagram_target}
    COMMENT "Generating PlantUML diagram for ${name}" VERBATIM
    COMMAND java ${ORES_JAVA_ARGS} -jar ${ORES_PLANTUML_JAR} ${name}.puml
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/)
add_dependencies(make_all_diagrams ${diagram_target})
{{/component}}

See also

Emacs 29.1 (Org mode 9.6.6)