zephyr/cmake
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
..
app cmake: function to update Zephyr_DIR when loading old Zephyr packages 2022-03-07 16:35:54 +01:00
bintools toolchain: oneApi: Fix support and update for 2023.0.0 release 2023-02-23 14:30:03 -05:00
compiler compiler: add CONFIG_COMPILER_TRACK_MACRO_EXPANSION 2023-05-05 12:08:48 +02:00
emu ARC: used 64bit MDB binary by default. 2023-05-22 10:16:28 +02:00
flash west: runners: uf2: Add new UF2 runner. 2023-02-20 12:50:38 +01:00
ide
linker device: use iterable sections 2023-05-12 12:01:10 +02:00
linker_script device: use iterable sections 2023-05-12 12:01:10 +02:00
makefile_exports
modules cmake: support snippets scope for zephyr_get() 2023-05-25 13:31:53 +00:00
reports scripts: size_report: Add support for TF-M and BL2 image size reports 2022-03-09 14:03:52 -05:00
sca/sparse cmake: add sparse support to the new SCA infrastructure 2023-01-27 20:28:58 +09:00
toolchain libc: Move strnlen into common 2023-05-08 09:59:27 +02:00
usage cmake: boards and shields cmake files repurposed 2022-02-22 10:02:39 -08:00
util
cfb.cmake scripts: move gen_cfb_font_header.py to scripts/build 2022-07-12 10:03:45 +02:00
extra_flags.cmake cmake: fix improper use of separate_arguments 2022-09-05 10:22:05 +02:00
gcc-m-cpu.cmake ARC: Add HS4x support 2023-05-02 16:54:24 +02:00
gcc-m-fpu.cmake cmake: gcc: Fix Cortex-R52 FPU type 2022-10-19 00:28:33 +09:00
gen_version_h.cmake cmake: generalize VERSION infrastructure for better reuse 2023-05-17 13:56:58 +02:00
hex.cmake
kobj.cmake scripts: move gen_kobject_list.py to scripts/build/gen_kobject_list.py 2022-07-12 10:03:45 +02:00
mcuboot.cmake cmake: mcuboot: Add Kconfig for passing west sign arguments 2023-03-24 09:04:49 +01:00
package_helper.cmake cmake: update package helper description to use EXTRA_CONF_FILE var 2023-05-23 16:40:21 +02:00
pristine.cmake
target_toolchain_flags.cmake everywhere: fix typos 2022-03-14 20:22:24 -04:00
verify-toolchain.cmake cmake: rework of host tools and generic toolchain handling 2022-09-01 15:59:43 +02:00
vif.cmake usb-c: Generate USB-C connector VIF policies XML file 2022-12-02 08:46:04 -06:00