[cmake-developers] Generating files at generate-time
Stephen Kelly
steveire at gmail.com
Tue Apr 23 15:28:28 EDT 2013
Alexander Neundorf wrote:
> On Tuesday 23 April 2013, Stephen Kelly wrote:
>> Hi,
>>
>> as 2.8.11 will be out soon, I'm returning to some pending features I'd
>> like to get in early in the next release.
>>
>> I've pushed the genex-evaluate-file branch to my clone. It implements the
>> file(EVALUATE) subcommand, which evaluates an input file containing
>> generator expressions and writes the result to an output file:
>>
>> file(EVALUATE "${CMAKE_CURRENT_SOURCE_DIR}/input.txt"
>> "${CMAKE_CURRENT_BINARY_DIR}/output.txt"
>> )
>
>
> is this somehow similar to configure_file() ?
> If so, maybe it could also be a subcommand of that ?
I don't think it should be a subcommand of that. It doesn't use the same
syntax (@syntax@ versus generator expressions), and it is evaluated at
generate-time, not configure-time, so it's not really similar.
Thanks,
Steve.
More information about the cmake-developers
mailing list