[CMake] CMAKE set linker variables (including custom linker script)
Martin Osterloh
Martin.Osterloh at dartmouth.edu
Thu Jun 20 15:57:56 EDT 2013
Hi,
I am currently migrating my project to CMAKE and so far it has been going quite well. I am using the standard "ld" as a linker with options -N -S -q -T <path-to-linkerscript.ld>
In my CMakeLists.txt I do:
Set(CMAKE_C_LINK_EXECUTABLE "ld -N -S -q -T <path-to-linkerscript.ld>")
This seems to invoke the correct linker script. However, it also fails to produce any binaries! No compilation or linker errors (even with --verbose).
The code compiles fine and produces executables without setting this variable.
I am puzzled how to pass the linker options to CMAKE. Could anyone please point out why - once the CMAKE_C_LINKER_EXECUTABLE variable is set - no binaries are being built?
I am working with the latest version 2.8.11.
Thanks for any help!
Cheers,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130620/21f573cc/attachment.htm>
More information about the CMake
mailing list