In the following sections you will learn about several CMake variables and commands that are used in the CMake configuration file for the Hello World App.

File Location: <BSW Package/Examples/amsr-vector-app-example-hello-world/CMakeLists.txt
- HWSRC_APP_OUTPUT_NAME
- add_subdirectory()
- taco_target_properties
- app/hello_world/CMakeLists.txt
- find_package()
HWSRC_APP_OUTPUT_NAME
The variable HWSRC_APP_OUTPUT_NAME
defines the name of the executable. TACO evaluates variables named <target-upper>_OUTPUT_NAME
to deduce the executable name from the target name.
add_subdirectory()
add_subdirectory("${AMSR_SRC_SYMLINK}" "AMSR")
The AMSR stack is included as source sub-project. This means that:
- the AMSR stack and the hello world application share one build-directory
- both projects can be initialized and build with one CMake command
- the hello world application CMake files can directly reference targets from the AMSR stack,
find_package()
is not needed.
taco_target_properties
The content in these files includes the hello_world subdirectory and makes sure that the MICROSAR Adaptive daemons are build and installed together with the hello world application.

Note: This is for demonstration purposes only. In a real world application you would build your own daemons and provide your own configuration files.
app/hello_world/CMakeLists.txt
The function dvacfg_file_gen()
makes sure that the generators for the models are run.
In this example the keyword argument OUTPUT
lists generated CMake files instead of source and config files. This has the advantage that you do not need to list each generated file individually. dvacfg_file_gen()
also adds the generated files as dependency to the target sources of hwsrc_app
.

Reference: For more information, see the TACO Guide in your delivery under CMake/Html/module/FindDvACfg.html
find_package (TACO REQUIRED)
TACO is included with a call to find_package
– CMake’s standard mechanism for external packages.
The variable TACO_ROOT
is set in CMakePresets.json to the corresponding directory in the MICROSAR Adaptive delivery.
The find_package
call automatically sets the correct CMAKE_MODULE_PATH
, so that TACO modules can be included and found modules can be referenced later on.