[CMake] whole archive linkage

J Decker d3ck0r at gmail.com
Sat Jan 24 00:34:57 EST 2015


can just include it in the list of target_link_libraries() directive

On Fri, Jan 23, 2015 at 7:41 PM, Adam <adam707blue at gmail.com> wrote:

> Hi All,
>
> I have a library that must be linked with -Wl,--whole-archive -lyourlib
>
> The library contains a static which registers itself in its constructor.
> This problem is described here http://stackoverflow.com/a/842770
>
> Is there a target property I can set on this library so consumers of the
> library automatically get whole archive linkage when including this library.
>
>
> Regards,
> Adam
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150123/ac3df5a4/attachment.html>


More information about the CMake mailing list