sdk-ng
sdk-ng copied to clipboard
cmake: support loading of host-tool through COMPONENTS
Support loading of host tools as part of Zephyr-sdk.
This allows users of Zephyr SDK to do:
find_package(Zephyr-sdk COMPONENTS HostTools)
instead of having to do something like:
find_package(Zephyr-sdk COMPONENTS HostTools)
include(${ZEPHYR_SDK}/cmake/zephyr/host-tools.cmake)
it further improve loading of host-tools as those are only loaded if installed. Because host tools are now loaded as a find module, then generic CMake reporting regarding module loading is used.
This allows us to cleanup Zephyr CMake code as well as place the responsibility of checking and loading of host tools into Zephyr SDK.
Signed-off-by: Torsten Rasmussen [email protected]
alternative to #554
To be discussed at the Toolchain WG meeting today
Toolchain WG (2022-09-06)
- Since we are making (potentially breaking) changes to the interface between Zephyr SDK and Zephyr, we would want to do it right the first time.
COMPONENTSparameter, although interesting, would not work if we wanted to version and release each Zephyr SDK component separately (toolchains for separate architectures, individual host tools components; as proposed in https://github.com/zephyrproject-rtos/zephyr/issues/37255) because the version requirement can only be specified at the package level.- In general, this needs more thinking. To be discussed further.