Brad King wrote:
> On 04/23/2013 03:07 PM, Stephen Kelly wrote:
>> file(EVALUATE "${CMAKE_CURRENT_SOURCE_DIR}/input.txt"
>> "${CMAKE_CURRENT_BINARY_DIR}/output.txt"
>> )
> [snip]
>> file(EVALUATE "${CMAKE_CURRENT_BINARY_DIR}/input.txt"
>> "${CMAKE_CURRENT_BINARY_DIR}/output_$<CONFIGURATION>.txt"
>> CONFIGURATIONS Debug Release
>> )
> [snip]
>> file(EVALUATE "${CMAKE_CURRENT_BINARY_DIR}/input.txt"
>> "${CMAKE_CURRENT_BINARY_DIR}/output_$<CONFIGURATION>.txt"
>> ALL_CONFIGURATIONS
>> )
> In order to select which configurations get the generation we could
> just have an argument to specify a condition for generation. That
> condition could then be populated with a generator expression to
> test $<CONFIG:...> or something.
That's a little bit better than a list of configurations as I proposed, but
I don't think it solves the problem I raised.
How do you generate a file only once with non-config-dependent content in a
simple case?
file(GENERATE
OUTPUT "the_output.txt"
CONTENT "The content"
CONDITION 1
)
That will be generated N times in multi-config generators, and once for
single-config, right? Currently in my branch it is an error to cause one
file name to be used to generate content twice.
Thanks,
Steve.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers