[CMake] Merge two static libraries

Verweij, Arjen VerweijA at tass-safe.com
Tue Oct 5 11:25:18 EDT 2010


Hi,

>-----Original Message-----
>From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
>Of Marcel Loose

>The downside to this solution is that you have duplicates of the object
>files that are part of common, but that's the price you'll have to pay
>if you want to have just one static library.
>
>HTH,
>Marcel Loose.


I think at least for Linux and Unices this gets solved when linking the final executable. Stuff in an archive (static library for you AIX users) that is not referenced evaporates.

It's also need for fast linking. You just create a link line that creates an executable based on one or more objects files in front of an archive. The symbols in the object file take precedence, which can make incremental builds really fast. This last bit is where cmake is much slower than my original build system, but arguably more safe.

Regards,
Arjen


More information about the CMake mailing list