From 347093e70e12139950e93e32d2584b301df7d474 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Fri, 7 Jul 2023 12:53:28 +0200 Subject: [PATCH] nrf_security: Re-run TF-M when zephyr configuration have changed This fixes the nrf-config-user.h header not being updated when the zephyr configuration for crypto has changed. Signed-off-by: Joakim Andersson --- subsys/nrf_security/tfm/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subsys/nrf_security/tfm/CMakeLists.txt b/subsys/nrf_security/tfm/CMakeLists.txt index 468e817a186..d9e25af950e 100644 --- a/subsys/nrf_security/tfm/CMakeLists.txt +++ b/subsys/nrf_security/tfm/CMakeLists.txt @@ -34,6 +34,12 @@ endforeach() # Standard extensions of Zephyr included in the TF-M build list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/cmake/modules) include(extensions) + +# Force a re-run of TF-M configuration if zephyr configuration has changed. +# Since we import these configurations we need to re-run when they have changed. +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${ZEPHYR_AUTOCONF}) +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${ZEPHYR_DOTCONFIG}) + import_kconfig(CONFIG_ ${ZEPHYR_DOTCONFIG}) # Additional TF-M build only settings: