Re: [cmake-developers] How to deal with assembler files

2011-03-10 Thread Alexander Neundorf
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
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-09 Thread Brad King
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

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-09 Thread Alexander Neundorf
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
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-08 Thread Brad King
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.
(2) The assembler extension on Windows is ".asm" so CMake does not recognize the
"main.s" source file.
(3) The "icl" tool cannot compile its own assembly:

$ 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.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-07 Thread Alexander Neundorf
On Friday 04 March 2011, Brad King wrote:
> On 03/03/2011 05:04 PM, Alexander Neundorf wrote:
> > On Thursday 03 March 2011, Brad King wrote:
> >> Hi Alex,
> >>
> >> The Sun compiler still fails:
> >> http://www.cdash.org/CDash/testDetails.php?test=85204365&build=888421
> >>
> >> It's because the execute_process in the CMakeLists.txt file of the test
> >> does not use the C compiler flags.  Therefore 32-bit assembly code is
> >> generated and then it tries to compile it with 64-bit flags.
> >
> > Ok, merged into next, I hope it works.
> > I disabled the assembler test for Intel under Windows for now.
>
> I just added a few more fixes/changes to the topic.  The CMAKE_C_FLAGS
> have to be parsed because they are space-separated.  We also now use a
> custom command to generate main.s and enable verbose make output.  Now
> the test should print out all the command lines in its output.

Dashboard is green now, thanks :-)

What is left to do ?
Testing the Intel compiler under Windows...
More ?

Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-04 Thread Brad King
On 03/03/2011 05:04 PM, Alexander Neundorf wrote:
> On Thursday 03 March 2011, Brad King wrote:
>> Hi Alex,
>>
>> The Sun compiler still fails:
>> http://www.cdash.org/CDash/testDetails.php?test=85204365&build=888421
>>
>> It's because the execute_process in the CMakeLists.txt file of the test
>> does not use the C compiler flags.  Therefore 32-bit assembly code is
>> generated and then it tries to compile it with 64-bit flags.
> 
> Ok, merged into next, I hope it works.
> I disabled the assembler test for Intel under Windows for now.

I just added a few more fixes/changes to the topic.  The CMAKE_C_FLAGS
have to be parsed because they are space-separated.  We also now use a
custom command to generate main.s and enable verbose make output.  Now
the test should print out all the command lines in its output.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-03 Thread Alexander Neundorf
On Thursday 03 March 2011, Brad King wrote:
> Hi Alex,
>
> The Sun compiler still fails:
> http://www.cdash.org/CDash/testDetails.php?test=85204365&build=888421
>
> It's because the execute_process in the CMakeLists.txt file of the test
> does not use the C compiler flags.  Therefore 32-bit assembly code is
> generated and then it tries to compile it with 64-bit flags.

Ok, merged into next, I hope it works.
I disabled the assembler test for Intel under Windows for now.

Alex

P.S. I'll be away over the weekend
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-03 Thread Alexander Neundorf
On Tuesday 01 March 2011, Brad King wrote:
> On 03/01/2011 04:40 PM, Alexander Neundorf wrote:
> > Do you think when enabling the C compiler as ASM compiler it should
> > also check for $ENV{CFLAGS} ?  Or should I added $ENV{ASMFLAGS} ?
>
> Often the C compiler is the C++ compiler too but we still have a
> separate CXXFLAGS.  Let's use ASMFLAGS.

Just checked, this is already there :-)

Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-03 Thread Brad King
Hi Alex,

The Sun compiler still fails:
http://www.cdash.org/CDash/testDetails.php?test=85204365&build=888421

It's because the execute_process in the CMakeLists.txt file of the test
does not use the C compiler flags.  Therefore 32-bit assembly code is
generated and then it tries to compile it with 64-bit flags.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-02 Thread Brad King
On 03/02/2011 01:54 PM, Brad King wrote:
> On 03/02/2011 10:50 AM, Alexander Neundorf wrote:
>> Leaves mostly the HP compiler:
>> http://www.cdash.org/CDash/testDetails.php?test=85923158&build=886969
> 
> I'm still looking at this one.
> 
>> and the IBM compiler:
>> http://www.cdash.org/CDash/testDetails.php?test=85918066&build=886882
> 
> The RPATH flags are not configured for ASM so 
> CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH
> does not get put on the command line with the proper flags.  I pushed a fix 
> for
> AIX on the topic and merged to next again.  Please fast-forward your local 
> copy
> of the topic to what is now on the stage.

The HP one was the same issue as the IBM one.  To fix it I had to (finally)
factor HP compiler flags out of HP-UX.cmake into the modern 
--.cmake
files.  Then I added the ASM flags for RPATH so the Assembler test can pass.

Please fast-forward your local copy of the topic to what is now on the stage.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-02 Thread Brad King
On 03/02/2011 10:50 AM, Alexander Neundorf wrote:
> Leaves mostly the HP compiler:
> http://www.cdash.org/CDash/testDetails.php?test=85923158&build=886969

I'm still looking at this one.

> and the IBM compiler:
> http://www.cdash.org/CDash/testDetails.php?test=85918066&build=886882

The RPATH flags are not configured for ASM so 
CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH
does not get put on the command line with the proper flags.  I pushed a fix for
AIX on the topic and merged to next again.  Please fast-forward your local copy
of the topic to what is now on the stage.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-02 Thread Alexander Neundorf
On Tuesday 01 March 2011, Brad King wrote:
> On 03/01/2011 04:40 PM, Alexander Neundorf wrote:
> > Do you think when enabling the C compiler as ASM compiler it should
> > also check for $ENV{CFLAGS} ?  Or should I added $ENV{ASMFLAGS} ?
>
> Often the C compiler is the C++ compiler too but we still have a
> separate CXXFLAGS.  Let's use ASMFLAGS.
>
> -Brad

Looks much better today :-)

I tried to fix Intel icl.exe on Windows, let's see if this works tomorrow.

Leaves mostly the HP compiler:
http://www.cdash.org/CDash/testDetails.php?test=85923158&build=886969

and the IBM compiler:
http://www.cdash.org/CDash/testDetails.php?test=85918066&build=886882

In both cases I can't see what went wrong.
Are here also ASMFLAGS necessary ?
(I'll add them ASAP)

Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-01 Thread Bill Hoffman

On 3/1/2011 4:47 PM, Brad King wrote:

On 03/01/2011 04:40 PM, Alexander Neundorf wrote:

Do you think when enabling the C compiler as ASM compiler it should
also check for $ENV{CFLAGS} ?  Or should I added $ENV{ASMFLAGS} ?


Often the C compiler is the C++ compiler too but we still have a
separate CXXFLAGS.  Let's use ASMFLAGS.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers



Looks like Xcode is not working:

http://www.cdash.org/CDash/testDetails.php?test=85203430&build=884682


-Bill
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-01 Thread Brad King
On 03/01/2011 04:40 PM, Alexander Neundorf wrote:
> Do you think when enabling the C compiler as ASM compiler it should
> also check for $ENV{CFLAGS} ?  Or should I added $ENV{ASMFLAGS} ?

Often the C compiler is the C++ compiler too but we still have a
separate CXXFLAGS.  Let's use ASMFLAGS.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-01 Thread Alexander Neundorf
On Tuesday 01 March 2011, Brad King wrote:
> On 03/01/2011 03:44 PM, Alexander Neundorf wrote:
> > The SunPro tests both failed:
> > http://www.cdash.org/CDash/testDetails.php?test=85204365&build=884706
> > http://www.cdash.org/CDash/testDetails.php?test=85247010&build=884931
> > The assembler file was generated in both cases, but could not be linked.
> > Maybe some more arguments are necessary here for specifying the desired
> > output format for the assembler ?
>
> The C flags include -xarch=v9 but that does not show up on the assembler
> compilation line even though it is using the C compiler.

Do you think when enabling the C compiler as ASM compiler it should also check 
for $ENV{CFLAGS} ? 
Or should I added $ENV{ASMFLAGS} ?

Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-01 Thread Brad King
On 03/01/2011 03:44 PM, Alexander Neundorf wrote:
> The SunPro tests both failed:
> http://www.cdash.org/CDash/testDetails.php?test=85204365&build=884706
> http://www.cdash.org/CDash/testDetails.php?test=85247010&build=884931
> The assembler file was generated in both cases, but could not be linked.
> Maybe some more arguments are necessary here for specifying the desired 
> output 
> format for the assembler ?

The C flags include -xarch=v9 but that does not show up on the assembler
compilation line even though it is using the C compiler.

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-01 Thread Alexander Neundorf
On Tuesday 01 March 2011, Brad King wrote:
> On 02/24/2011 02:58 PM, Alexander Neundorf wrote:
> > I merged this now into next on stage.
>
> The Assembler test fails on several platforms:
>
> http://www.cdash.org/CDash/testSummary.php?project=1&name=Assembler&date=20
>11-03-01

Oops, sorry.
I'll fix my mail filters, the mails from the CMake dashboard went in the same 
folder as the ones from the KDE dashboards (where there are many failing 
every day).

>
> Please take a look.  Let me know if you need help on a specific platform.

In most cases the ASM compiler ID was not recognized.
I can't reproduce why.
I committed some debug output to next.
Then I should be able to fix most of them tomorrow.


The SunPro tests both failed:
http://www.cdash.org/CDash/testDetails.php?test=85204365&build=884706
http://www.cdash.org/CDash/testDetails.php?test=85247010&build=884931
The assembler file was generated in both cases, but could not be linked.
Maybe some more arguments are necessary here for specifying the desired output 
format for the assembler ?


Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-03-01 Thread Brad King
On 02/24/2011 02:58 PM, Alexander Neundorf wrote:
> I merged this now into next on stage.

The Assembler test fails on several platforms:

http://www.cdash.org/CDash/testSummary.php?project=1&name=Assembler&date=2011-03-01

Please take a look.  Let me know if you need help on a specific platform.

Thanks,
-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-02-24 Thread Alexander Neundorf
On Wednesday 23 February 2011, Brad King wrote:
> On 02/23/2011 03:36 PM, Alexander Neundorf wrote:
> > This is now on stage in the "ReworkedAsmSupport" branch.
> > I'd like to merge this into next, if there are no objections.
> > It implements what we discussed here, i.e. if there is already a C/CXX
> > compiler it tries to use that too for assembler, if not, it tries to find
> > such a compiler.
>
> Looks good!  BTW, this block:
>
> +if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "HP"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "Intel"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "SunPro"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "XL")
> ...
> +endif(CMAKE_C_COMPILER_ID STREQUAL "GNU"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "HP"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "Intel"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "SunPro"
> +   OR CMAKE_C_COMPILER_ID STREQUAL "XL")
>
> is more easily written
>
> if("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|Intel|SunPro|XL)$")
> ...
> endif()

Ok.

I merged this now into next on stage.
I also removed the "Assembler support is still experimental" message now.


Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-02-23 Thread Brad King
On 02/23/2011 03:36 PM, Alexander Neundorf wrote:
> This is now on stage in the "ReworkedAsmSupport" branch.
> I'd like to merge this into next, if there are no objections.
> It implements what we discussed here, i.e. if there is already a C/CXX 
> compiler it tries to use that too for assembler, if not, it tries to find 
> such a compiler.

Looks good!  BTW, this block:

+if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
+   OR CMAKE_C_COMPILER_ID STREQUAL "HP"
+   OR CMAKE_C_COMPILER_ID STREQUAL "Intel"
+   OR CMAKE_C_COMPILER_ID STREQUAL "SunPro"
+   OR CMAKE_C_COMPILER_ID STREQUAL "XL")
...
+endif(CMAKE_C_COMPILER_ID STREQUAL "GNU"
+   OR CMAKE_C_COMPILER_ID STREQUAL "HP"
+   OR CMAKE_C_COMPILER_ID STREQUAL "Intel"
+   OR CMAKE_C_COMPILER_ID STREQUAL "SunPro"
+   OR CMAKE_C_COMPILER_ID STREQUAL "XL")

is more easily written

if("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|Intel|SunPro|XL)$")
...
endif()

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2011-02-23 Thread Alexander Neundorf
On Wednesday 18 August 2010, Brad King wrote:
> On 08/18/2010 01:03 PM, Alexander Neundorf wrote:
> > If the files are written that way (and built without cmake before), the
> > developers want to have them processed with the actual compiler, because
> > that's what they are always doing.
> > IMO that's not wrong, because if the compiler can also process assembler
> > files, then it can be considered also a valid "compiler" for assembler,
> > no matter that it is "also" a C compiler.
> >
> > Maybe I didn't make one thing clear.
> > There are of course separate CMAKE_ASM_COMPILER, CMAKE_ASM_COMPILE_OBJECT
> > etc. variables. It's just that CMAKE_ASM_COMPILER will be the same
> > executable as CMAKE_C_COMPILER.
>
> You're right, I misunderstood your proposal.  Part (1) is exactly what
> I had in mind.  The users just happen to chose the C compiler as the
> ASM language compiler.  It does not need C to be enabled.  Good.
>
> For part (2) I think you can use my suggestion: CMAKE_ASM_PREPROCESSOR
> might happen to be set to a C compiler but can also be a preprocessor.
>
> To help IAR choose an assembler that matches the C compiler, take a
> look at what we do in CMakeDetermineFortranCompiler.cmake around the
> comment "Prefer vendors matching the C and C++ compilers.".
>
> -Brad

This is now on stage in the "ReworkedAsmSupport" branch.
I'd like to merge this into next, if there are no objections.
It implements what we discussed here, i.e. if there is already a C/CXX 
compiler it tries to use that too for assembler, if not, it tries to find 
such a compiler.

Alex

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2010-08-18 Thread Brad King
On 08/18/2010 01:03 PM, Alexander Neundorf wrote:
> If the files are written that way (and built without cmake before), the 
> developers want to have them processed with the actual compiler, because 
> that's what they are always doing.
> IMO that's not wrong, because if the compiler can also process assembler 
> files, then it can be considered also a valid "compiler" for assembler, no 
> matter that it is "also" a C compiler. 
> 
> Maybe I didn't make one thing clear. 
> There are of course separate CMAKE_ASM_COMPILER, CMAKE_ASM_COMPILE_OBJECT 
> etc. 
> variables. It's just that CMAKE_ASM_COMPILER will be the same executable as 
> CMAKE_C_COMPILER.

You're right, I misunderstood your proposal.  Part (1) is exactly what
I had in mind.  The users just happen to chose the C compiler as the
ASM language compiler.  It does not need C to be enabled.  Good.

For part (2) I think you can use my suggestion: CMAKE_ASM_PREPROCESSOR
might happen to be set to a C compiler but can also be a preprocessor.

To help IAR choose an assembler that matches the C compiler, take a
look at what we do in CMakeDetermineFortranCompiler.cmake around the
comment "Prefer vendors matching the C and C++ compilers.".

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2010-08-18 Thread Alexander Neundorf
On Tuesday 17 August 2010, Brad King wrote:
> On 08/17/2010 04:39 PM, Alexander Neundorf wrote:
> > Still, there is the preprocessing bug.
>
> I think some Fortran compilers need help with this too but we ignore
> them right now.  I prefer a solution that may work for both, but just
> for ASM for now.
>
> In general the languages should be independent.  Both parts of your
> proposal make ASM depend on C in one way or another.  

IMO not really.
If the files are written that way (and built without cmake before), the 
developers want to have them processed with the actual compiler, because 
that's what they are always doing.
IMO that's not wrong, because if the compiler can also process assembler 
files, then it can be considered also a valid "compiler" for assembler, no 
matter that it is "also" a C compiler. 

Maybe I didn't make one thing clear. 
There are of course separate CMAKE_ASM_COMPILER, CMAKE_ASM_COMPILE_OBJECT etc. 
variables. It's just that CMAKE_ASM_COMPILER will be the same executable as 
CMAKE_C_COMPILER.

Alex
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] How to deal with assembler files

2010-08-17 Thread Brad King
On 08/17/2010 04:39 PM, Alexander Neundorf wrote:
> Still, there is the preprocessing bug.

I think some Fortran compilers need help with this too but we ignore
them right now.  I prefer a solution that may work for both, but just
for ASM for now.

In general the languages should be independent.  Both parts of your
proposal make ASM depend on C in one way or another.  It would be
best to add direct support for preprocessing sources.  We do not need
separate rules with dependencies for this; the preprocessing step
can be done at the same time as the compile step.

I envision something like this:

  SET(CMAKE_ASM_COMPILE_OBJECT
"   -o .s -E "
"  -o  .s"
)

(The  token would need to be implemented for -I options.)

This first preprocesses to a source file right next to the object
file and then assembles it to create the object.  The preprocessor
can be the C compiler if C is enabled and /usr/bin/cpp otherwise
(but works either way).

-Brad
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers