cmake: kconfig: allow to set Kconfig targets externally

This commit allows a project to specify a given set of Kconfig targets
prior to sourcing kconfig.cmake.

This allows for greater flexibility when re-using kconfig.cmake in
other projects.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2021-11-27 11:58:00 +01:00 committed by Carles Cufí
commit 542aad5ac3

View file

@ -149,10 +149,10 @@ set(EXTRA_KCONFIG_TARGET_COMMAND_FOR_hardenconfig
${ZEPHYR_BASE}/scripts/kconfig/hardenconfig.py
)
set_ifndef(KCONFIG_TARGETS menuconfig guiconfig hardenconfig)
foreach(kconfig_target
menuconfig
guiconfig
hardenconfig
${KCONFIG_TARGETS}
${EXTRA_KCONFIG_TARGETS}
)
add_custom_target(