On Thu, Jun 20, 2013 at 9:57 PM, Martin Osterloh < [email protected]> wrote:
> 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.**** > > ** > Shouldn't you be using CMAKE_EXE_LINKER_FLAGS for adding linker flags? The variable you are using overrides the whole linker invocation and you have to take care of all paths and outputs on your own. If you are linking libraries, use CMAKE_SHARED_LIBRARY_C[XX]_FLAGS, after setting up CMP0018 policy. Also, don't forget -Wl Cheers, Vittorio
-- 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
