Hi,

I'm cross compiling (avr32) with a gcc compiler under Linux and I'm
using a framework where asm extensions aren't directly recognized by
cmake (.x).

gcc is recognized as a valid C and ASM compiler during cmake
configuration.

But still I see cmake running just ar and ranlib on nothing. gcc is not
invoked at all on asm targets.

I've read several "solutions" on the net but none works.

These are the relevant part I've put in my CMakeLists.txt

project(SAM C ASM)

set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS x)
enable_language(C ASM)
set(ASM_OPTIONS "-x assembler-with-cpp")
set(CMAKE_ASM_FLAGS "${CFLAGS} ${ASM_OPTIONS}" )

All asm files are in separate directories with their own CMakeLists.txt
and they are "added" as

add_library(targetname STATIC sourcefile)
SET_TARGET_PROPERTIES(targetname
   PROPERTIES LINKER_LANGUAGE ASM)

thanks

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to