[cmake-developers] LINK_LIBRARIES property topic

Brad King brad.king at kitware.com
Mon Jan 7 16:35:55 EST 2013


On 01/07/2013 03:26 PM, Stephen Kelly wrote:
> Brad King wrote:
>> Also, I see a few uses of GetOriginalLinkLibraries left.  The only one
>> we should have left is the one for the CMP0003 OLD behavior.
> 
> The other uses are in cmGlobalGenerator and in the Graphiviz generator.
> 
> In cmGlobalGenerator it is used at configure-time, so we can't evaluate 
> generator expressions, and shouldn't read LINK_LIBRARIES property directly 
> because it can contain generator expressions set via set_property. 

It is used at the end of configuration after all processing is done.
It is looking for raw string values that look like FIND_VAR-NOTFOUND
to report their accidental use.  This can be checked by reading the
LINK_LIBRARIES property directly and using just ExpandListArgument
without any generator expressions.

I think this can wait for a future patch though and does not have to
be squashed in the topic now.

> The uses in the Graphviz generator are also called at configure-time. 
> Downstreams may be relying on that and using the generated graphs in 
> add_custom_target or similar. 
> 
> Additionally, the graphiviz generator does not generate multiple config-
> specific graph files (I think there is a bug for that, but I don't know 
> where), nor does it put config specific information in all one graph (which 
> should it do - it's an open question), so we can't use the information in 
> generator expressions.

Ugh.  IMO the graphviz feature should never have been added.  It puts
an unnecessary burden on new development like this while adding now
real build capabilities.  I've never used it even in large projects.

Anyway, I think it can be skipped for now too.

-Brad



More information about the cmake-developers mailing list