Platform
Note: auto-generated from comments in: ./platform/platform.cmake
platforms:
Platforms in F prime's CMake system setup f prime specific items w.r.t the OS. This file loads those platforms file and uses it to setup F prime's build. See: Platform Template for how to generate these files.
Function fprime_validate_platform:
This function validates the platform setting set by the toolchain file. It ensures that the toolchain file is correctly written. When there is not toolchain file, it sets the TOOLCHAIN_NAME and FPRIME_PLATFORM variables in the CMake Cache so that the system can use them.
Args: None Returns: None
Function fprime_find_platform_file:
Search for a platform file (cmake/platform/${FPRIME_PLATFORM}.cmake) using ordered glob patterns. Each pattern group is searched individually via fprime_glob_ordered so that earlier groups take priority over later groups. Within a single group, matches are equally valid.
Priority order: 1. PROJECT_SOURCE_DIR/cmake/platform/ (project-level direct) 2. FPRIME_PROJECT_ROOT/cmake/platform/ (backwards compat — project root differs from PROJECT_SOURCE_DIR) 3. PROJECT_SOURCE_DIR/lib//cmake/platform/ (project libraries) 4. PROJECT_SOURCE_DIR//cmake/platform/ (project subdirectories) 5. FPRIME_LIBRARY_LOCATIONS/cmake/platform/ (backwards compat — explicit library locations) 6. FPRIME_FRAMEWORK_PATH/cmake/platform/ (framework fallback)
Results are cached in FPRIME_CACHED_PLATFORM_FILE to avoid re-searching.
Args: None Returns: None
Macro fprime_setup_platform:
This macro is the main entry point for setting up the platform. It validates the platform settings, finds the platform file, and includes it to set up the platform for the build. It also handles some left-over toolchain processing by setting output directories and printing the toolchain information.
NOTE: this is a macro so that the included file is included in the scope of the caller.
Args: None Returns: None