[nrf fromlist] cmake: fix Zephyr module ext order #2697
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Upstream PR #: 87962
MODULE_EXT_ROOT allows Zephyr modules to provide glue code for Zephyr modules using
cmake-ext: Trueand/orkconfig-ext:True.A module ext root provides a
modules.cmakefile which defines variables like:set(ZEPHYR_FOO_CMAKE_DIR <glue-code-path>/foo)It is intended that a downstream module can replace Zephyr's default glue code, which again can be replaced further downstream.
Setting values in first modules.cmake (Zephyr's) are replaced by later processed modules.cmake (downstream) when the setting name is identical.
Therefore the module ext root list should not be reversed, and Zephyr itself should be placed as first entry in the list.
Signed-off-by: Torsten Rasmussen [email protected]
(cherry picked from commit 83976563b4175e72841b002d35350abb16c6aea8)