Description
Description of defect
Our CMake system has been designed to mirror the old build system. This means it relies on an externally set global MBED_TARGET_LABELS
variable to know which mbed components and features to include. mbed-tools parses a set of JSON config files scattered throughout the mbed-os source tree, and creates the MBED_TARGET_LABELS
CMake variable the build system relies on. MBED_TARGET_LABELS
is a list of the LABELS, FEATURES and COMPONENTS fields parsed from the target configuration. These labels only seem to exist to tell the build system which subdirectories to add to the build.
CMake provides us a reasonable alternative for target labels: transitive usage requirements. This mechanism allows us to create dependency chains amongst sets of CMake targets without relying on externally set global variables to tell us which source files, include directories or compile definitions to include.
Target(s) affected by this defect ?
All
Toolchain(s) (name and version) displaying this defect ?
All
What version of Mbed-os are you using (tag or sha) ?
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
All versions of mbed-tools
How is this defect reproduced ?
Build mbed-os