[cmake-developers] INTERFACE_LIBRARY target type

Stephen Kelly steveire at gmail.com
Tue Sep 10 10:54:46 EDT 2013


Brad King wrote:
> 
>> 3) I have left a TODO note in cmLocalGenerator.cxx about the return value
>> from GetRealDependency.
> 
> Callers of GetRealDependency are looking for a file-level dependency.
> Targets like OBJECT_LIBRARY and INTERFACE_LIBRARY have no real file
> on which to depend.  The OBJECT_LIBRARY comment "This was listed to
> get the target-level dependency" is talking about ordering dependencies
> among logical targets.

Ok, I've changed the patch to add a similar comment for INTERFACE_LIBRARY 
types.

>> 7) I've only implemented the support for this target type in the Makefile
>> generator so far. I can also do the Ninja one after all of the details
>> about how it works are sorted out.
>> 
>> Can someone else implement the VS and Xcode support? I'm too unfamiliar
>> with those generators.
> 
> Do you mean support for "make iface" in the other generators?

Yes. Something similar to what is changed in the makefile generator in the 
first patch 'Add the INTERFACE library type.' is likely needed in other 
generators too.
 
> 
>> 9) INTERFACE_LIBRARY targets are always effectively EXCLUDE_FROM_ALL
>> because they have no direct outputs.
> 
> ...but they do have dependencies on other targets, as built by "make
> iface". If a given directory contains nothing but an interface target that
> depends on real targets from other directories, shouldn't typing "make" in
> that directory bring everything up to date to use the interface?

Good point. I'll look into that a bit more.

Thanks,

Steve.






More information about the cmake-developers mailing list