No way to get the path of the source file of the build command being generated
Maybe it's lack of my knowledge, but I couldn't find any CMake variable containing the path of the source file whose build command is being generated. I try to explain this better.
I'm using a cross-compiler toolchain (ARM Compiler toolchain), whose assembler (armasm
) accepts a --list
argument (reference here).
I would really use something like
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} --list=${CURRENT_SOURCE_FILE}.lst")
in order to make .lst
files end up together with .o
files.
In other words, I need to produce this build command:
armasm --list=path/to/my/dummy/file.lst -o path/to/my/dummy/file.o path/to/my/dummy/file.s
(The -o path/to/my/dummy/file.o path/to/my/dummy/file.s
part is already generated by CMake)