[CMake] Building a Version Header

Johannes Stallkamp johannes.stallkamp at rub.de
Fri Jul 9 07:23:12 EDT 2010


Am 09.07.2010 12:56, schrieb Michael Hertling:
> As the version target is always out of date it will be build each time
> you (re)build main, but since CONFIGURE_FILE() obviously does not touch
> the output file as long as it won't change, version.h isn't timestamped,
> so it doesn't trigger the rebuild of the main target.
Hey, that's great. I didn't know that CONFIGURE_FILE does not touch
the output file if the content doesn't change.
With that knowledge, I can now simplify my scripts which up to now
checked manually whether the version number changed and only called
CONFIGURE_FILE if this is the case.
Where did you find that? Did I miss it in the docs?

Thanks
Johannes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100709/e121f7fb/attachment.htm>


More information about the CMake mailing list