On Thursday 31 October 2013, Ivan Sergio Borgonovo wrote:
> 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].


so crt0.x is the missing one, right ?
Are you sure it is not compiled ?
(let's just use "compile" although an assembler file is not actually 
"compiled")

Or is just the symbol missing when linking ?

If crt0.x is listed as a source file, I see no reason why this one file should 
not be compiled.

I would guess that it is compiled, but the object file is not included by the 
linker because nobody else references anything from it.

Can you post the complete linker command ?

Alex
--

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