On Thu, 31 Oct 2013 21:17:11 +0100 Alexander Neundorf <[email protected]> wrote:
> On Thursday 31 October 2013, Ivan Sergio Borgonovo wrote: > > On Thu, 31 Oct 2013 18:01:29 +0100 > > > > Alexander Neundorf <[email protected]> wrote: > > > Did you try setting the source file property "LANGUAGE" to "ASM" > > > for these files ? > > > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_sf:LANGUAGE > > > > Thanks, that made the trick but I ran into another problem: > > > > One of those asm file is somehow being ignored by cmake. > > > > I can find the right commands greping in the build dir but they are > > not executed during make: > > can you post a bit more from your cmake files, or maybe a complete > minimal example ? It was automatically generated by a python script. The schema is: main CMakeLists.txt [list of include_directories()] [list of add_subdirectory()] add_executable(project main.c) target_link_libraries(project [list of targets]) In each dir I've a CMakeLists.txt consisting of: add_library(target STATIC source) # for asm source only: set_source_files_properties(source PROPERTIES LANGUAGE ASM) SET_TARGET_PROPERTIES(target PROPERTIES LINKER_LANGUAGE ASM) All asm files get compiled and linked with the exception of one. The only difference I can spot is that others contains global symbols that are referenced in C files[1] or in the linker options[2] while the only one that doesn't get compiled and linked contains symbols that are referenced just in another ASM file[3]. In all asm file I've a .global [asymbol] [1] extern void [asymbol] [2] -Wl,-e,[asymbol] [3] lda.w pc, _stext [3] causes: libtrampoline.a(trampoline.s.o): In function `program_start': (.reset+0x2004): undefined reference to `_stext where trampoline.a source is an asm file. My guess is that cmake understand the dependency between a C file or a linker option and an asm file but it doesn't understand the dependency between an asm file and another asm file. -- 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
