[CMake] automatic library dependencies causing problems

William A. Hoffman billlist at nycap.rr.com
Thu Feb 3 13:58:50 EST 2005


This example is to complicated.   Can you provide a smaller one that shows
the problem?

Basically, cmake only does what you tell it.   Sounds like you need
to remove a TARGET_LINK_LIBRARIES or a LINK_LIBRARIES command.

I would expect you could create an example in one cmakelist file that showed
the problem.


-Bill



At 11:57 AM 2/3/2005, Clinton Stimpson wrote:
>Hi,
>
>I've got a project that is supposed to be like this
>
>    
>     A
>    / \
>    D  B
>        \
>         D
>      / / \ \
>      E F  G H
>
>And lets say that libraries E, F, and G are static libraries and all the others are shared.
>And let's say that E and F are built by CMake in the same project and G is an external one.
>The static ones should only be linked into D and not into A and B.  
>CMake does link them in and A and B end up being much larger than they need to be because they have their own copies of E, F, and G.
>How do I turn off the automatic library dependencies so that they don't get linked into A and B?
>The code is functional on several platfoms except IRIX.
>On IRIX, this is causing the code to be non functional because it uses the wrong copies of static variables in libraries E and F.
>
>Thanks,
>Clint
>
>_______________________________________________
>CMake mailing list
>CMake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list