I want to generate .lst
files for my source file. I am successfully able to generate the executable.
But I don't know how to generate .lst
files for my source files.
get_property(allsrcfiles TARGET myExe PROPERTY SOURCES)
foreach(srcfile IN LISTS allsrcfiles)
set_source_files_properties(${srcfile} PROPERTIES COMPILE_FLAGS "-Wa, anhlmsd=${srcfile}.lst")
endforeach()
I have added the above script in my CMakelists.txt
, if I add the above script I am getting the following error
[100%] Linking C executable myExe
dld: error: Can't open file 'CMakeFiles/myExe.dir/src/sample.c.obj': No such file or directory
CMakeFilesmyExe.diruild.make:101: recipe for target 'myExe' failed gmake[2]: *** [myExe] Error 1
CMakeFilesMakefile2:93: recipe for target 'CMakeFiles/myExe.dir/all' failed
gmake[1]: *** [CMakeFiles/myExe.dir/all] Error 2
Makefile:101: recipe for target 'all' failed
gmake: *** [all] Error 2
sample.c.obj
file is getting generated without source_file_properties
.
compiler : WIND RIVER
Target : ppc - embedded
Host : windows
is list file generation commands depends on the compiler?
question from:
https://stackoverflow.com/questions/65840053/lst-file-generation-in-cmake 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…