Skip to content

Implementation

Note: auto-generated from comments in: ./implementation.cmake

implementation.cmake:

This file handles enables deployments (and other executables) to choose implementations that resolve at link time. This enables projects to choose different underlying implementations for specific concepts (e.g. OS, Memory, etc.) at link time.

Function fprime_target_implementations:

This function will calculate and add the implementations required for a target. It will use the default implementations if no OVERRIDES are provided. Default implementations are the final set of chosen implementations as specified in register_fprime_config using the CHOOSES_IMPLEMENTATIONS call.

Choosing implementations ensures that there is some implementation of all globally required implementations specified by register_fprime_* via the REQUIRED_IMPLEMENTATIONS argument.

Warning

This function may only be called on targets that already exist

Note

Target will be updated with FPRIME_CHOSEN_IMPLEMENTATIONS property and FPRIME_CHOSEN_ properties for each implementation. target_link_libraries will be updated.

Args: BUILD_SYSTEM_TARGET: the target in the build system to add implementations dependencies to ARGN: a list of implementations to override the default implementations with

Function fprime__internal_implementation_detect_implementations:

This function will scan the list of global default implementations (detected via the config modules and set in the sub-build) and the implementations chosen by the current module. It will then choose one implementation for each "IMPLEMENTS" type.

If IMPLEMENTS cannot be determined it is added to the list of unknown implementations.

Args: CURRENT_MODULE: the module to check for implementations

Function fprime__internal_choose_implementations:

This function will scan the list of global default implementations module choices via fprime__internal_implementation_detect_implementations. It will then ensure that each REQUIRED implementation has a chosen implementation.

It is an error to not have a chosen implementation for required unless there is a set of unknown implementations and in that case it is a warning.

Warning

If UNKNOWN implementations are set, it is assumed that one of them fills any missing REQUIRED implementations but users should update those modules to explicitly set IMPLEMENTS flag to avoid this warning.

If the UNKNOWN implementations do not provided the required implementations a linker error will occur.

Args: CURRENT_MODULE: the module to check for implementations OUTPUT_VARIABLE: the variable to set with the list of chosen implementations