cmake: flash: Conditional dependency to 'mergehex'
This patch adds a dependency from the 'flash' target to the 'mergehex' target IF files to be merged are configured. Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
This commit is contained in:
parent
1fe9a5b8d8
commit
0da5d24c36
2 changed files with 4 additions and 1 deletions
|
@ -1327,6 +1327,7 @@ if(HEX_FILES_TO_MERGE)
|
|||
)
|
||||
|
||||
add_custom_target(mergehex ALL DEPENDS ${MERGED_HEX_NAME})
|
||||
list(APPEND FLASH_DEPS mergehex)
|
||||
endif()
|
||||
|
||||
if(CONFIG_OUTPUT_PRINT_MEMORY_USAGE)
|
||||
|
|
|
@ -91,6 +91,8 @@ foreach(target flash debug debugserver attach)
|
|||
set(comment "Debugging ${BOARD}")
|
||||
endif()
|
||||
|
||||
list(APPEND FLASH_DEPS ${logical_target_for_zephyr_elf})
|
||||
|
||||
# We pass --skip-rebuild here because the DEPENDS value ensures the
|
||||
# build is already up to date before west is run.
|
||||
set(cmd
|
||||
|
@ -101,7 +103,7 @@ foreach(target flash debug debugserver attach)
|
|||
${RUNNER_VERBOSE}
|
||||
${target}
|
||||
--skip-rebuild
|
||||
DEPENDS ${logical_target_for_zephyr_elf}
|
||||
DEPENDS ${FLASH_DEPS}
|
||||
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue