[cmake-developers] Disallowing include() of export() result

Brad King brad.king at kitware.com
Fri Jun 28 08:40:32 EDT 2013


On 06/28/2013 07:20 AM, Stephen Kelly wrote:
> I've pushed an export-policy topic to my clone which attempts to disallow 
> including the result of the export command. This is part of making it 
> possible to make export() be executed at generate time in the future.

Great!

> An alternative would be to add a new command generate_export() which takes 
> the same arguments, or a GENERATE keyword to the export() command, and 
> deprecate the existing export() signature with a policy. 

I prefer the policy so that we don't widen the interface further.
Inserting an extra "generate" on either side of the "(" will just
be noise after projects transition.

I think having the policy warning trigger on the basic (bad) use
case will be sufficient.  If projects run into more corner cases
then we can add warnings for them.

What about the APPEND mode of export?  Do you plan to try to
collect all the appended pieces together, all delayed until
generate time?  Perhaps the policy could also disallow the
APPEND mode altogether.  IIRC I've participated in discussion
in the past about how APPEND is a bad approach anyway.

Thanks,
-Brad



More information about the cmake-developers mailing list