sdk-ng icon indicating copy to clipboard operation
sdk-ng copied to clipboard

cmake: support loading of host-tool through COMPONENTS

Open tejlmand opened this issue 3 years ago • 3 comments
trafficstars

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]

tejlmand avatar Aug 31 '22 10:08 tejlmand

alternative to #554

tejlmand avatar Aug 31 '22 10:08 tejlmand

To be discussed at the Toolchain WG meeting today

stephanosio avatar Sep 05 '22 08:09 stephanosio

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.
  • COMPONENTS parameter, 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.

stephanosio avatar Sep 05 '22 16:09 stephanosio