snippets: basic build system boilerplate

Basic things needed to integrate the new 'snippets' feature into the
build system. The main CMake variable which controls snippets is
SNIPPET. It is a whitespace-or-semicolon-separated list of snippet
names.

- Add minimal new cmake module for processing snippets. This just has
  basic infrastructure for processing a SNIPPET variable into
  SNIPPET_AS_LIST, and warning the user if they try to change it too
  late.

- Integrate the new module into the build system, via
  zephyr_default.cmake

This is anologous to the shields and boards modules' boilerplate and
input variables.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Marti Bolivar 2023-01-06 16:49:23 -08:00 committed by Carles Cufí
commit 80ca540522
2 changed files with 36 additions and 0 deletions

View file

@ -81,6 +81,7 @@ list(APPEND zephyr_cmake_modules zephyr_module)
list(APPEND zephyr_cmake_modules boards)
list(APPEND zephyr_cmake_modules shields)
list(APPEND zephyr_cmake_modules snippets)
list(APPEND zephyr_cmake_modules arch)
list(APPEND zephyr_cmake_modules configuration_files)