[CMake] Link order of object files

Mathias Lafeldt misfire at debugon.org
Mon Jun 21 05:12:24 EDT 2010


Hi,

is there a way to tell CMake in which order to link in object files?

For example, I got the following executable:

	ADD_EXECUTABLE(hello crt0.o hello.c)

Using a disassembler, I can see that hello.c is compiled in before
crt0.o, but I want crt0.o to always be the first.

Also, this gives me the same result:

	ADD_EXECUTABLE(hello hello.c crt0.o)

-Mathias


More information about the CMake mailing list