[CMake] Making a variable a dependency...

Oliver Smith osmith at playnet.com
Sat Feb 4 17:35:06 EST 2012


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?




More information about the CMake mailing list