zephyr/tests/cmake/yaml/test.yaml
Torsten Rasmussen 0828d0b0ef cmake: support array of maps in yaml module
This commit introduce support for maps in a yaml list.

The yaml_set() function has been extended with the following signature:
> yaml_set(NAME <name> KEY <key>...
>          [APPEND] LIST MAP <map1> MAP <map2> MAP ...
> )

where a `MAP <map>` has the form:
`MAP "<key1>: <value1>, <key2>: <value2>, ...`

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-02-10 15:56:52 +00:00

19 lines
327 B
YAML

cmake:
test:
key-string: "Simple string"
key-int: 42
key-list-int:
- 4
- 10
- 2
key-list-string:
- "a"
- "list"
- "of"
- "strings"
map-list:
- map-entry-name: "MapEntry1"
map-entry-int: 5
- map-entry-name: "MapEntry2"
map-entry-int: 4