[CMake] Check for file-existence during build, not during cmake
Jorrit Schaap
jschaap at fugro-jason.com
Mon Jan 22 10:37:12 EST 2007
Hi,
I'm using a 3rd party tool to process some files during a build. This tool
then generates some cpp files, which get compiled normally. All build rules
work, everything is fine...
Except for one detail... The tool expects some flags to be present or absent,
depending on the exsistense of the generated files. It cannot find that out
by itself, so I will have to set the flags manually during each build.
I would like Cmake to generate a makefile which has a build rule that sets a
flag to A or B, depending on the exsistense of the generated files. I know
there is the command EXISTS <filename>, but that is only evalueted during the
cmake execution, not during the normal build.
Can anybody think of a nice trick?
Thanks, Jorrit
More information about the CMake
mailing list