[cmake-developers] External objects with IDE generators

Brad King brad.king at kitware.com
Thu Feb 27 11:01:58 EST 2014


On 02/27/2014 03:32 AM, Stephen Kelly wrote:
> IDE generators are problematic though. 
> 
> 'git grep GetExternalObjects' shows that the IDEs mostly don't call 
> GetExternalObjects at all.

In this discussion we must distinguish "external objects" that are
explicit .o files mentioned in the list of sources and OBJECT library
objects.  All the generators, including the IDE generators, funnel
handling of OBJECT library objects through UseObjectLibraries.

GetExternalObjects is a cmGeneratorTarget method to access the
source files classified as external objects.

> Xcode does it's own thing entirely.

Hmm, that is true for VS < 10 also.  All those generators still
have their own loops to classify sources.  They will have to
be refactored to use cmGeneratorTarget.  Note that the IDE
generators also need to deal with source groups.

> VS10 gets External objects, but treats them very differently to
> objects from OBJECT_LIBRARY targets. 

It has some special magic for external objects in case they are
generated by custom commands to work around some VS 10 behavior
(but not VS >= 11 which has an option to disable the behavior).
In the normal case both end up as <Object> elements though.

-Brad




More information about the cmake-developers mailing list