cmake: Generate correct inline source listings in asm output

Manually provide a source path prefix to objdump
pull/207/head
Yuri D'Elia 2022-10-02 00:22:06 +02:00
parent 74dfb27c20
commit ea38115152
1 changed files with 3 additions and 1 deletions

View File

@ -171,7 +171,9 @@ if(CMAKE_CROSSCOMPILING)
# produce ASM listing
add_custom_command(
TARGET firmware POST_BUILD COMMAND ${CMAKE_OBJDUMP} -CSd firmware > firmware.asm
TARGET firmware POST_BUILD
COMMAND
${CMAKE_OBJDUMP} --prefix ${CMAKE_SOURCE_DIR} -CSd firmware > firmware.asm
)
# inform about the firmware's size in terminal