[cmake-developers] How to deal with assembler files

Alexander Neundorf neundorf at kde.org
Thu Mar 10 15:55:59 EST 2011


On Wednesday 09 March 2011, Brad King wrote:
> On 03/09/2011 02:27 PM, Alexander Neundorf wrote:
> > On Tuesday 08 March 2011, Brad King wrote:
> >>     $ icl -S main.c
> >>     $ icl main.asm
> >>     (errors)
> >> I was able to fix the errors for (3) by replacing "." with "_" in a few
> >> labels. Then the build produces HelloAsm.exe which runs as expected.
> >
> > Do you consider this a solution or a hack ?
>
> Definitely a hack.
>
> Only a few instances of "." must be translated.  I'd rather pre-generate a
> sample file for each architecture on this compiler.
>
> > Beside that, AFAIK Microsoft cl.exe is not able to process assembler
> > files. Is that correct ?
>
> It can generate them with /FA and /Fa"main.asm":
>
>   http://msdn.microsoft.com/en-us/library/367y26c6%28v=VS.90%29.aspx
>
> In order to compile them though one must use "ml.exe" or "ml64.exe":
>
>   http://msdn.microsoft.com/en-us/library/s0ksfwcf%28v=VS.90%29.aspx

Yes, this is supported via ASM_MASM.
ASM is all assembler which can be processed by the normal C compiler.
There is currently no test for ASM_MASM, ASM-ATT and ASM_NASM. They all need 
different files, also different for each architecture :-/

Alex



More information about the cmake-developers mailing list