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

Stephen Kelly steveire at gmail.com
Fri Jun 28 07:20:33 EDT 2013


Hi,

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.

There are limitations to my topic already. For example, it doesn't warn if 
someone uses file(APPEND) on the targets file, though that would be easy to 
add. It also doesn't warn if someone uses, for example, execute_process 
giving the targets file as an argument. That's something that can probably 
not be handled with a warning, and there are other similar cases. Is that 
acceptable, or is it better to not change this at all?

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 think the new command may be a better idea.

Comments?

Steve.





More information about the cmake-developers mailing list