On 04/23/2015 12:13 PM, Alan W. Irwin wrote:
I think your idea of configure_file(GENERATE...) (where configure_file
occurs at configure-time without GENERATE to be backwards compatible,
but it occurs at generate-time if the new GENERATE signature is used)
is an excellent way to allow users to replace the current clumsiness
that is required to configure a file with both @ symbols and
generator expressions.

I suppose for that to work configure_file() would have to either:

1. Store the values of all variables as they were set during the configure_file() call so that they can be expanded during generation.

2. Or perform variable substitution in-memory during the call and store the intermediate content for generator expressions substitution at generation time.

3. Or perform variable substitution during the call and store the intermediate content in a temporary file which then gets generator expression substitution at generation time.

None of those sound really optimal.

With 1. and 2. memory requirements might get out of hand.

With 3. you are basically back to something that acts like a configure_file() + file(GENERATE) wrapper except that cmake now has to come up with temporary filenames.

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/mailman/listinfo/cmake

Reply via email to