[cmake-developers] How to deal with assembler files

Alexander Neundorf neundorf at kde.org
Wed Mar 9 14:27:35 EST 2011


On Tuesday 08 March 2011, Brad King wrote:
> On 03/07/2011 03:44 PM, Alexander Neundorf wrote:
> > Testing the Intel compiler under Windows...
>
> I just tried this but have no time to work further on it now.  The compiler
> does use -S to generate assembly, but there are at least 3 problems:
>
> (1) The command line needs "-Fo" instead of "-o" to specify the output file
> name. 

Ok, that wouldn't be a problem.

> (2) The assembler extension on Windows is ".asm" so CMake does not
> recognize the "main.s" source file.

Same here.

> (3) The "icl" tool cannot compile its own assembly:
>
>     $ icl -S main.c
>     $ icl main.asm
>     (errors)

Really ?
That's weird.

> 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 ?
It does not really sound like something I'd like to do reading the produced 
asm-file and running some regexps on it :-/


Beside that, AFAIK Microsoft cl.exe is not able to process assembler files. Is 
that correct ?

Alex



More information about the cmake-developers mailing list