cmake: Show executable for memory report

Firstly, COMMENT does not work for ninja.
Therefore, change COMMENT to echo.

With the addition of sysbuild, several memory reports can be printed
for one build.
Because of this, it is useful to know which executable each memory
report is printed for, so adding full path to elf file.

Signed-off-by: Sigurd Hellesvik <sigurd.hellesvik@nordicsemi.no>
This commit is contained in:
Sigurd Hellesvik 2023-12-06 10:20:34 +01:00 committed by Carles Cufí
commit ed040f1873

View file

@ -1885,12 +1885,11 @@ endif()
add_custom_command(
TARGET ${logical_target_for_zephyr_elf}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Generating files from ${PROJECT_BINARY_DIR}/${KERNEL_ELF_NAME} for board: ${BOARD}"
${post_build_commands}
BYPRODUCTS
${post_build_byproducts}
COMMENT "Generating files from ${KERNEL_ELF_NAME} for board: ${BOARD}"
COMMAND_EXPAND_LISTS
# NB: COMMENT only works for some CMake-Generators
)
# To populate with hex files to merge, do the following: