[CMake] File-dependent rebuild
Wojciech Migda
wojtek.golf at interia.pl
Sun Jun 15 09:04:33 EDT 2008
> I'd like to have cmake rebuild upon detecting changes made to a file
> being part of the project (simple timestamp difference might suffice).
> This file is not a compiler input itself, but is used to determine the
> list of source files upon which the library to build is dependant. The
> file of interest is a versioned object.
OK, I've found a solution, mainly inspired by this thread
(http://www.cmake.org/pipermail/cmake/2007-July/015357.html). To
explicitly add cmake dependency, which basicaly means calling
AddCMakeDependFile, I've used the CONFIGURE_FILE command. In this
context it simply copies the file to a designated directory (or files, a
total of which in the whole build tree in my case is approx. 140) and
ends up adding required entry to the CMAKE_FILE_DEPENDS variable in
CMakeFiles/Makefile.cmake.
-Wojciech
----------------------------------------------------------------------
Podbij Dziki Zachod!Gra strategiczna online
Sprawdz >>> http://link.interia.pl/f1dff
More information about the CMake
mailing list