You can use the Adaptive SDK in your CMake projects and save time compiling. It is as simple as adding a few lines to your project-wide CMake configurations in the CMakeLists.txt.

File Location: MyAdaptiveProject/CMakeLists.txt
Steps
- Prerequisite: The Adaptive SDK was created and is made available.
- Prerequisite: Your system fulfills the system requirements of the MICROSAR Adaptive BSW package
- Specify the SDK path.
- Locate the AMSR package with
find_package()
. - Integrate the generated CMake files into the project.
- Link against the appropriate targets.
CMakeLists.txt
# Set the search location for the AMSR SDK
set(AMSR_ROOT "path/to/AdaptiveSDK")
# Find CMake Config files of AMSR package
# Simple command (Missing targets are found at build time)
# find_package(AMSR REQUIRED)
# Advanced command (Missing targets are found at configuration time)
find_package(AMSR
COMPONENTS amsr::vac
REQUIRED
)
# The variable "target" is important here because it is expected
# in the generated CMake files
set(target MyAdaptiveApplication)
# Please note: SRC_GEN_DIR locates to the folder where the code is
# generated
file(GLOB LIST_OF_SRC_GEN_CMAKE_FILES "${SRC_GEN_DIR}/MyAdaptiveApplication/*.cmake")
block()
foreach(CMAKEFILE_TO_INCLUDE IN LISTS LIST_OF_SRC_GEN_CMAKE_FILES)
include(${CMAKEFILE_TO_INCLUDE})
endforeach()
endblock()
# Specify the libraries to be linked into the user build artifact
target_link_libraries(
MyAdaptiveApplication
PRIVATE
amsr::vac
)
Components / Link Targets

Note: The list of pre-built and installed targets (libraries and/or executables) may vary depending on the content of the delivery. In addition, the number of available targets depends on the build configuration.
Component / Target | Cluster |
---|---|
amsr::applicationbase | Base Libraries |
amsr::vac | Base Libraries |
amsr::com_default | Communication |
amsr::com_r18_03 | Communication |
amsr::com_r20_11 | Communication |
amsr::comtrace | Communication |
amsr::ipcbinding | Communication |
amsr::someipbinding | Communication |
amsr::someipprotocol | Communication |
amsr::zerocopybinding | Communication |
amsr::aradiag | Diagnostics |
amsr::em_application_client | Execution Management |
amsr::em_state_client | Execution Management |
amsr::log | LOG |
amsr::log_ara_logging | LOG |
amsr::osa_common | Operating System |
amsr::osa_net | Operating System |
amsr::per | Persistency |
amsr::sm_functiongroupcontrol | State Management |
amsr::sm_lifecycle | State Management |
amsr::sm_runtime | State Management |
amsr::sm_statemachine | State Management |

Reference: To find the CMake link targets for a certain component, please refer to the Technical Reference at <BSW Package>/Docs/Technical References
.
An exhaustive list of all available link targets is generated with the build cache and can be found at <MyAdaptiveProject>/build/<preset>/AMSRConfig.cmake.