[CMake] Convenience lib vs static library

Ioan Calin Borcoman iborco at gmail.com
Sun Nov 23 01:53:44 EST 2008

Isn't a static lib still better than nothing? I was thinking at the
same thing this morning - why not use static libs and simply don't
install them.

I agree, this still has the problem of missing lib dependencies that
you have to solve by hand (with convenience libs, if you have libB
that depends on libA, you simply need to link with libB and the linker
solves your dependencies automatically; with static libs I guess
you'll need to link with -lB -lA), but I guess static libs could cover
a vast number of cases where an autotools developer would use a
convenience lib.

Am I missing something?


On Sun, Nov 23, 2008 at 1:30 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> "Sean Soria" <sean.soria at gmail.com>
> writes:
>> cmake claims to not support convenience libraries.  Isn't building a
>> static library and then linking it into other libraries the same as a
>> convenience library?
> A convenience library works as an object file at link time: it is
> included on the final executable as any other object file. A static
> library does not have this quality: the linker picks the library's
> contents only if there is something elsewhere that requires it (i.e. a
> reference to a symbol defined on some object file contained on the
> library).
> --
> Oscar
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

More information about the CMake mailing list