[CMake] can CMake determine linker version ?

Ilias Miroslav Miroslav.Ilias at umb.sk
Wed Nov 28 15:59:24 EST 2012


Dear experts,

in recent versions of ld-linker I have to use this flags for static linking:
        target_link_libraries(${EXECUTABLE} -Wl,--no-export-dynamic)

however, older versions, like "GNU ld version 2.17.50.0.6-20.el5 20061020" does not know the flag "--no-export-dynamic".

Would it be please possible to get version of the linker and determine accordingly which flags to use ?

Best, Miro



More information about the CMake mailing list