[CMake] Incrementing build as target
Andy Cedilnik
andy.cedilnik at kitware.com
Sat May 28 09:23:52 EDT 2005
Hi Jorgen,
The problem with this approach is that it will rebuild every time you
type make.
Also, at this point there is no way to increment a number.
What you can do is to write a program that will do what you want and
then use a custom command to run this program.
Andy
Jorgen Bodde wrote:
> 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
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list