zephyr/cmake/modules
Torsten Rasmussen ba48dd8763 cmake: support snippets scope for zephyr_get()
Fixes: #57139

Snippets provides the possibility of defining EXTRA_DTC_OVERLAY_FILE and
EXTRA_CONF_FILE in snippets.
Snippets must co-exist with existing infrastructure of
EXTRA_DTC_OVERLAY_FILE and EXTRA_CONF_FILE, and a user specifying a
snippet must be able to specify extra files for adjusting the snippet.

This means that if the following is specified:
`-DSNIPPET=some_snippet -DEXTRA_CONF_FILE=extra.conf`
then `extra.conf` may contain adjustments to the snippet.
Similar to sysbuild. Imagine a sysbuild controlled image uses a default
snippet for building, by ensuring that any extra
`-D<image>_EXTRA_CONF_FILE=extra.conf` arguments takes precedence over
the snippet we allow users to make adjustments if they need.

This commit introduces a snippets scope where snippet scoped variables
can be set with `zephyr_set()` and then `zephyr_get()` will take the
snippet scoped variables into consideration before returning.

Adjust calls to `zephyr_get(EXTRA_DTC_OVERLAY_FILE)` and
`zephyr_get(EXTRA_CONF_FILE)` to use `MERGE` to ensure all scopes are
considered.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-25 13:31:53 +00:00
..
arch.cmake
basic_settings.cmake
boards.cmake cmake: fix and clean up some module doc comments 2023-01-11 09:40:14 +01:00
ccache.cmake
configuration_files.cmake cmake: support snippets scope for zephyr_get() 2023-05-25 13:31:53 +00:00
doc.cmake
dts.cmake cmake: introduce EXTRA_DTC_OVERLAY_FILE for devicetree 2023-05-23 16:40:21 +02:00
extensions.cmake cmake: support snippets scope for zephyr_get() 2023-05-25 13:31:53 +00:00
Findarmclang.cmake armclang: Add version check for armclang toolchain 2023-02-28 13:54:56 +01:00
FindBabbleSim.cmake nrf52_bsim: Find simulator thru west as fallback 2023-04-28 13:57:21 +02:00
FindDeprecated.cmake cmake: sparse: fix handling of (deprecated) -DSPARSE=garbage 2023-04-20 10:49:23 +02:00
FindDtc.cmake
FindGnuLd.cmake cmake: toolchain: cache property GNULD_LINKER_IS_BFD 2023-04-12 10:25:41 -04:00
FindHostTools.cmake
FindLlvmLld.cmake linker: lld: see if clang has a preferred linker 2023-03-29 19:48:47 -04:00
FindoneApi.cmake toolchain: oneApi: Fix support and update for 2023.0.0 release 2023-02-23 14:30:03 -05:00
FindScaTools.cmake cmake: implement build infrastructure for supporting SCA tools. 2023-01-27 20:28:58 +09:00
FindTargetTools.cmake
FindZephyr-sdk.cmake cmake: FindZephyr-sdk: Find newest SDK version 2023-03-06 13:51:36 +01:00
generated_file_directories.cmake cmake: modules: add generated_file_directories 2023-04-12 13:04:31 +02:00
kconfig.cmake kconfig: provide an option for enforcing Kconfig settings 2023-05-25 14:57:41 +02:00
kernel.cmake cmake: implement build infrastructure for supporting SCA tools. 2023-01-27 20:28:58 +09:00
pre_dt.cmake cmake: modules: dts: extract preprocessing helper extension 2023-04-12 13:04:31 +02:00
python.cmake
root.cmake sysbuild: Fix issue with *_ROOT values not propagating 2023-05-03 14:25:33 +02:00
shields.cmake cmake: fix and clean up some module doc comments 2023-01-11 09:40:14 +01:00
snippets.cmake cmake: support snippets scope for zephyr_get() 2023-05-25 13:31:53 +00:00
soc.cmake
unittest.cmake unittest: add support for coverage 2022-11-28 16:26:02 -05:00
user_cache.cmake cmake: Fix USER_CACHE_DIR path generation 2023-05-10 15:27:54 +02:00
version.cmake cmake: generalize VERSION infrastructure for better reuse 2023-05-17 13:56:58 +02:00
west.cmake west.cmake: make MIN_WEST_VERSION catch up with requirements-base.txt 2023-05-22 10:17:11 +02:00
zephyr_default.cmake cmake: modules: add generated_file_directories 2023-04-12 13:04:31 +02:00
zephyr_module.cmake cmake: align Zephyr module variable to EXTRA_ZEPHYR_MODULES 2023-05-23 16:40:21 +02:00