From ea381151529fae26dd4fdee0edd4d3be273b90ad Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sun, 2 Oct 2022 00:22:06 +0200 Subject: [PATCH] cmake: Generate correct inline source listings in asm output Manually provide a source path prefix to objdump --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a4a090..2fe4ab2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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