[CMake] "rule" to generate assembler listings for each c file

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jan 11 17:01:27 EST 2010


On Monday 11 January 2010, Arne Pagel wrote:
>  > Are you sure you really need that ?
>  > If you enter "make help" in the directory of your target, you will see
>  > that there are also rules for building the object files foo.o and also
>  > for just generating the assembler files (foo.s).
>  > I.e. you can manually enter "make ...path/foo.s" and this will produce
>  > the assembler file for you so you can look at it.
>  >
>  > From my experience this is the typical use case: if something goes
>  > wrong, look at the assembler file of the file in question and check
>  > whether it makes sense. Do you need it for something else ?
>
> Well, with the compiler Flags I will not have just an assembler file *.s,
> then I have a list file with more debug information like high level
> language comments, symbols an so on.

Well, you can set the CMAKE_(C|CXX)_CREATE_ASSEMBLY_SOURCE variable so that it 
contains all the flags you need for the listfile.

Alex


More information about the CMake mailing list