[CMake] ASM support

Phil Smith phil at voltage.com
Fri Feb 27 15:36:33 EST 2009


Well, it seems that CMAKE_ASM_COMPILER is being invoked as a literal. If I copy dasm.exe to CMAKE_ASM_COMPILER.exe, it works, happily assembles files.

So it's a bug in (a) what I did, (b) the instructions, or (c) the quasi-asm support in there already.

I did notice that the ATT support (which http://www.cmake.org/Wiki/CMake/Assembler#How_to_add_support_for_other_assembler_.22dialects.22 says to use as a model) doesn't quite match the instructions: CMakeDetermineASM-ATTCompiler sets CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT, not CMAKE_ASM${ASM_DIALECT}_COMPILER as the instructions would suggest. But I tried setting that and it didn't make any difference that I could see.

...phsiii
-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Phil Smith
Sent: Thursday, February 26, 2009 11:17 AM
To: a.neundorf-work at gmx.net; cmake at cmake.org
Subject: Re: [CMake] ASM support

I got back on this, and found a big part of my problem. The Wiki page says:

"Edit CMakeASM_FOOInformation.cmake. ... then include the generic CMakeASMInformation.cmake."
and later:
"Edit CMakeDetermineASM_FOOCompiler.cmake. ...then include the generic file..."

What wasn't obvious to me (though of course it is now) was that the second "generic file" wasn't the same as the first. If the Wiki page could say "...then include the generic file CMakeDetermineASMCompiler.cmake" it would help.

ISTR that if you say INCLUDE(banana.cmake) it looks for it in the local directory, whereas INCLUDE(banana) looks for it in Modules. This could be made clearer too, as "include the generic CMakeASMInformation.cmake" is likely to result in the former.

Now...CMake says it works, but "make" says:

[ 11%] Building ASM_DIGNUS object CMakeFiles/zfpe.dir/temp/ZOSFINFO.asm.o
make[2]: CMAKE_ASM_COMPILER: Command not found
make[2]: *** [CMakeFiles/zfpe.dir/temp/ZOSFINFO.asm.o] Error 127
make[1]: *** [CMakeFiles/zfpe.dir/all] Error 2
make: *** [all] Error 2

I thought the issue was related to using a front-end script for the assembler, such that the actual command (if typed on the commandline) to do an assembly would be "rexx.exe cc.rex dasm.exe" (with flags and operands after that), but I simplified it to just "dasm" and get the same error.

My CMakeASM_DIGNUSInformation.cmake is:

set(ASM_DIALECT _DIGNUS)
include(CMakeASMInformation)
set(ASM_DIALECT)
SET(CMAKE_ASM_DIGNUS_SOURCE_FILE_EXTENSIONS asm)
SET(CMAKE_ASM_DIGNUS_OUTPUT_EXTENSION ".o" )
SET(CMAKE_ASM_DIGNUS_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -o <OBJECT> <SOURCE>")

My CMakeDetermineASM_DIGNUSCompiler.cmake is:
set(ASM_DIALECT _DIGNUS)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT dasm)
include(CMakeDetermineASMCompiler)
set(ASM_DIALECT)

My CMakeTestASM_DIGNUSCompiler.cmake is:
set(ASM_DIALECT _DIGNUS)
include(CMakeTestASMCompiler)
set(ASM_DIALECT)

I'm sure this is something dumb, but ... ideas?

TIA

...phsiii
-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Alexander Neundorf
Sent: Thursday, January 29, 2009 3:40 PM
To: cmake at cmake.org
Subject: Re: [CMake] ASM support

On Thursday 29 January 2009, Phil Smith wrote:
> Ok, I found http://www.cmake.org/Wiki/CMake/Assembler -- not sure how I
> missed it before.

It's only three weeks old or so.

Alex
_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list