Skip to content

Commit 6c3e957

Browse files
committed
cmake: mcuboot: Add dependency to keys
Adds a dependency that causes CMake to re-configure if the input key files for MCUboot signing/encryption have changed Signed-off-by: Jamie McCrae <[email protected]> (cherry picked from commit 271dbb4)
1 parent dc88506 commit 6c3e957

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/mcuboot.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ function(zephyr_mcuboot_tasks)
4949
elseif(NOT (CONFIG_BUILD_OUTPUT_BIN OR CONFIG_BUILD_OUTPUT_HEX))
5050
message(FATAL_ERROR "Can't sign images for MCUboot: Neither CONFIG_BUILD_OUTPUT_BIN nor CONFIG_BUILD_OUTPUT_HEX is enabled, so there's nothing to sign.")
5151
endif()
52+
53+
# Add key file as CMake dependency so a file change will rerun the build
54+
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${${file}})
5255
endif()
5356
endforeach()
5457

0 commit comments

Comments
 (0)