[cmake-developers] EXPORT_NAME-genex

Stephen Kelly steveire at gmail.com
Mon May 20 09:48:25 EDT 2013


Brad King wrote:

> What's so bad about the exported targets being called "boost_..."
> instead of "boost::..."? 

A stronger indication that it is an imported target. boost::... can only be 
an imported target, but boost_... could be an imported target, a in-build 
target or a library. 

As we discussed in another thread, we can check for '::' to see if it is an 
imported target and error if that imported target is not available.

> VTK and ITK have worked that way for years.
> It is simpler if the name inside the upstream build matches that in
> the downstream consumers.

Why is that simpler? 

By the same logic, is it simpler for the target name to match the output 
name? Should the OUTPUT_NAME property exist?
 
> We had some recent discussion about encouraging the convention of
> "namespace::" for imported targets, but perhaps we should reconsider
> the value and cost.

value:
 * We can assume that NS::foo is an imported target and error if not found
 * Readers know that NS::foo is imported and tll(bar NS::foo) does more 
 * Anything else?

cost:
 * Projects may wish to have a different in-build name than exported name.
 * Anything else?

Thanks,

Steve.





More information about the cmake-developers mailing list