Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: support loading of host-tool through COMPONENTS #555

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tejlmand
Copy link
Contributor

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]

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
Copy link
Contributor Author

alternative to #554

@stephanosio
Copy link
Member

To be discussed at the Toolchain WG meeting today

@stephanosio
Copy link
Member

stephanosio commented Sep 5, 2022

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 Proposal: Multi-platform package-based Zephyr SDK zephyr#37255) because the version requirement can only be specified at the package level.
  • In general, this needs more thinking. To be discussed further.

@tejlmand tejlmand added the DNM DO NOT MERGE label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM DO NOT MERGE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants