[CMake] Incrementing build as target

Jorgen Bodde solidstl at xs4all.nl
Sat May 28 05:58:54 EDT 2005


Hi, it would be a nice idea to let the CMakeScript increment a build 
number automatically. I would think something like;

buildver.txt - contains an integer that is read, incremented and written
the buildver.txt is written to a file called buildver.h using a 
buildver.in like;

buildver.in:

// Contains build version
#define BUILD_VERSION @BUILDVER@

buildver.h

// Contains build version
#define BUILD_VERSION 325

and this file is included in the main app. Is this in some way possible? 
It would be very neat .. regards,

- Jorgen



More information about the CMake mailing list