On Wed, 13 Jan 2010 13:51:57 +0100, Nico Schlömer <nico.schloe...@gmail.com> wrote: > > Overlinking is actually only an issue for dynamic libraries. So as > > long as you're absolutely sure that you only have static libraries, > > you're fine. > > Oh, I was thinking it is *unclean* to have a link line like
Overlinking is orthogonal to this. Suppose we have libA depending on libB, but consumers of libA never call into libB directly. With shared libraries, libA.so will reference libB.so and the user only needs to link with -lA. Overlinking means using -lA -lB which means that e.g. an ABI change in libB requires not just rebuilding libA, but also the client application. With static libs, you have no choice. > -llibrarya /usr/local/local/liblapack.a --llibraryb > /usr/local/local/liblapack.a (1) [...] > So, yeap, it works, but I expected CMake to clean up after me > dependency-wise -- instead of (1), this > > -llibrarya --llibraryb /usr/local/local/liblapack.a (1') This cannot be done automatically because some people end up with dependency loops and CMake does not know the dependency graph. Jed _______________________________________________ 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