[cmake-developers] Linking to OBJECT libraries?

Brad King brad.king at kitware.com
Thu Jun 6 09:40:14 EDT 2013


On 06/06/2013 08:09 AM, Stephen Kelly wrote:
> The solution would be to generate an OBJECT library instead of a static 
> library. However, it is not possible to link to an OBJECT library currently. 
> 
> I was wondering why that is, and if it can be changed?

I didn't want tll() to be responsible for bringing in object libraries
because I didn't want to deal with all the transitive behavior issues.
Object libraries are referenced like source files because they are
treated as "source" external objects for building a target.

Instead let's consider introducing a usage requirement that can bring
in object libraries, external objects, or even source files.  That
would solve this and be pretty cool too.

-Brad



More information about the cmake-developers mailing list