On Sep 5, 2009, at 3:31 PM, Alexander Neundorf wrote:
[...]
Can you please try the attached patch ?

I have tried it and I have got the desired result, i.e. the compiler driver is invoked for compilation on the assembly sources. The CMakeLists.txt file contains:

ENABLE_LANGUAGE(ASM-GCC)
set (ASM_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/asm.S)
add_library (mylib ${CXX_LIBRARY_TYPE} somesrc.cpp ${ASM_SRCS})

which results in:

[  2%] Building ASM-GCC object .../asm.S.o
cd projdir && /usr/bin/gcc  -Isomeinclude -c asm.S -o bindir/asm.S.o

As I said before, and after more thinking, I believe that in my case a better solution is to have the assembly source compiled like the other sources in the project. This might not be the ideal solution for other projects.

So, a better solution for me is to have:

set_source_files_properties (${ASM_SRCS} PROPERTIES LANGUAGE CXX)

Thanks!

-J

_______________________________________________
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

Reply via email to