Hi all,

I'm wondering, if I understood correctly the behaviour of CMake, whether there'a a way to prevent CMake from deleting duplicated libraries in a target_link_libraries list.

I have an executable which links against (all static) libraries A, B and C. A itself links against C,D,E... and so on. When CMake creates the link.txt file what I see is:

c++ -o myExe -lA -lC -lD -lE -lB

that is cmake links the executable against A followed by its dependents, then against B but not against C. The point is that B needs C to follow it as B depends on C. This is why I suspect that CMake removes the duplicated libraries listed in a target_link_libraries directive.

Is it correct? And is there a way to force CMake to preserve exactly the list of libraries passed to target_link_libraries?

Thanks.

Marco

--
Marco Corvo
SuperB experiment
CNRS - Orsay
c/o INFN - Padova
_______________________________________________
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

Reply via email to