On Saturday 04 February 2012, Oliver Smith wrote: > My CMakeLists uses the Subversion repository information in a couple of > places (it configures a file revision.h and it uses it for the CPack > package name). > > The problem is that this variable is cached and retained until the cache > is rebuilt, instead of being calculated or evaluated per make. So if I > do a build, then do an svn update and pull some changes, it will build a > new executable but it will stamp it with the revision number from when > CMake last regenerated the make files... > > Is there a way to mark a variable as volatile or something so that CMake > will always recalculate it and check if it has changed?
Would it be acceptable if cmake would rerun after every build ? You could enforce that e.g. with a add_custom_command( POST_BUILD ... ) which could e.g. touch CMakeCache.txt or something. Better ideas ? Alex -- 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://www.cmake.org/mailman/listinfo/cmake