[cmake-developers] GCC link options

J Decker d3ck0r at gmail.com
Mon Jul 23 14:31:09 EDT 2012


In this commit --no-whole-archive is artificially added to compile
options in Modules/Platform/Windows-GNU.cmake.

http://cmake.org/gitweb?p=cmake.git;a=commit;h=5f05a3c25e1480648f46c9ccbf775225f9e8e32d

This is causes no end of problems for me; because I have code which is
indirectly referenced such that LD doesn't identify it as being used.

I don't know what the proper thing is...


    "<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS>
<LINK_FLAGS> <OBJECTS>  -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB>
${CMAKE_GNULD_IMAGE_VERSION} ${LD_FLAGS} <LINK_LIBRARIES>")

in the above I've inserted ${LD_FLAGS} which lets me put the
--whole-archive mode back in.... but actually no, it doesn't.... I
geuss I can't set those flags soon enough....

any idea how I can get around the --no-whole-archive flag?



More information about the cmake-developers mailing list