[cmake-developers] ninja parallelism and LLVM cmake builds

Stephen Kelly steveire at gmail.com
Tue Feb 11 10:47:31 EST 2014


Brad King wrote:

> On 02/11/2014 08:46 AM, Stephen Kelly wrote:
>> We could consider making the LINK_ONLY generator expression public in
>> order to allow the user to decide the granularity here (possibly
>> encapsulated in a INTERFACE_LIBRARY).
> 
> For reference, without the interface target it is as simple as:
> 
>  target_link_libraries(staticB $<LINK_ONLY:staticA>)
> 
> Do we have any enforcement for $<LINK_ONLY> to be used only with
> static libraries?

Yes. cmTarget::GetTransitivePropertyLinkLibraries ensures that it is only 
effective for static libraries because only there 
dagChecker.SetTransitivePropertiesOnly(); is called. It might be possible to 
refactor that.

> Is there any reason not to allow it for all
> library types?  It looks like a way to suppress usage requirements
> specified by a package but that the consuming project does not
> want for some reason.

Yes. When we introduced it (part of CMP0022 I think), we decided to keep it 
internal for now. I can look into generalizing it a bit after 3.0.0.

Thanks,

Steve.





More information about the cmake-developers mailing list