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
bintools
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
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
sca/sparse
toolchain libc: Move strnlen into common 2023-05-08 09:59:27 +02:00
usage
util
cfb.cmake
extra_flags.cmake
gcc-m-cpu.cmake ARC: Add HS4x support 2023-05-02 16:54:24 +02:00
gcc-m-fpu.cmake
gen_version_h.cmake cmake: generalize VERSION infrastructure for better reuse 2023-05-17 13:56:58 +02:00
hex.cmake
kobj.cmake
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
verify-toolchain.cmake
vif.cmake