On 07/23/2012 02:31 PM, J Decker wrote:
> 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.

By what mechanism is code "indirectly referenced" such that
references are not visible to the linker?

Depending on your use case consider the object library feature:

 http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library

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

target_link_libraries(my_target -Wl,--whole-archive my_archive)

-Brad
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to