On 05/19/2014 07:42 PM, Brad King wrote:
On 05/16/2014 04:56 PM, Nils Gladitz wrote:
I write the properties file at generation time rather than configuration
time ... perhaps generator expressions could be allowed for keys?

So far generator expressions are allowed only when the content will be
evaluated on a per-configuration basis.  Since installation requires
a specific configuration to be chosen, this is well-defined.  However,
the implementation will have to take care of loading the properties
for the matching configuration at the right time.

I was looking at cmTestGenerator and found cmScriptGenerator which seems to already generalize this somewhat.

This requires a variable with the current configuration to be available when the properties are loaded.

CPack currently sets CPACK_BUILD_CONFIG after reading CPackConfig.cmake (I include my properties file from it) but it should be possible to reverse that without breaking anything(?).


If they were set by install() itself there would need to be some sort of
disambiguation in case there are multiple files being installed (like
there already is for DESTINATION).

Yes, and the same mechanism could probably work.  We don't have to
implement it for install() now, I was just using that example as a
reason to choose the name "INSTALL" for the set/get_property commands.

I changed the scope name to "INSTALL" and prefixed the two existing properties with "CPACK_".


We also need a name clearer than "install property" to refer to these.
Perhaps "install file property" (like current "source file property")?

I used "installed file property".
I kind of like how it disambiguates the fact that the property applies to the destination rather than the source file of the installation but I am not a native english speaker so perhaps it doesn't make as much sense as I hope it does.

FYI, some updates to code in Utilities/Sphinx will be needed so that
these properties can be documented in a location like Help/prop_inst.

I didn't really know what I was doing but I duplicated the code specific to one of the other properties and added documentation for my first two properties.

Thanks again for your feedback!

Nils

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to