[CMake] Cmake 2.8 and cross compilation

Emmanuel Blot eblot.ml at gmail.com
Mon Nov 16 12:21:14 EST 2009


> Can you create a bug entry for this?

Sure,  I'll do it

> As a quick fix I think if you set CMAKE_OSX_DEPLOYMENT_TARGET to empty it
> will stop CMake form doing this.  You should be able to do that either in
> the cache or in your project.

Ok, it seems to work, thanks for the workaround.

Now the actual issue, as I'm able to reproduce the original Linux host error:
Assembly support seems broken, or at least not compatible with ATT
mode from 2.5/2.6:

Here is a CMake snippet of what we've been using up to now to build
assembly source files:
ENABLE_LANGUAGE (ASM-ATT OPTIONAL)
SET (CMAKE_ASM-ATT_COMPILER ${xcc})
SET (CMAKE_ASM-ATT_COMPILE_OBJECT
     "<CMAKE_ASM-ATT_COMPILER> <FLAGS> -c -o <OBJECT> <SOURCE>")
SET (CMAKE_ASM-ATT_FLAGS "${ARCH} -Wall")
SET (CMAKE_ASM-ATT_FLAGS_DEBUG "-DDEBUG")
SET (CMAKE_ASM-ATT_FLAGS_RELEASE "-DNDEBUG")

then, to create an executable from mixed sources (.S and .c), we use
the following syntax:
ADD_EXECUTABLE(myapp myc.c myasm.S)

when I enable a VERBOSE build, CMake does not attempt to assemble the
.S file, and it does not attempt to link it neither.

I nevertheless get these information strings:

-- Found assembler: /usr/local/gnu-eabi/bin/arm-eabi-gcc
-- Loaded CMakeASM-ATTInformation - ASM-ATT support is still
experimental, please report issues

Any way to enable back ASM support ?

Thanks a lot,
Manu


More information about the CMake mailing list