[geos-devel] [GEOS] #556: Build error using cmake: ../geos_svn_revision.h: No such file or directory

Mateusz Loskot mateusz at loskot.net
Mon Jun 25 13:27:58 PDT 2012

On 25 June 2012 16:34, Mateusz Loskot <mateusz at loskot.net> wrote:
> On 25 June 2012 15:08, Sandro Santilli <strk at keybit.net> wrote:
>> It's very weak to depend on the discipline of the builder to always run ./configure (or cmake)
>> after each and every SVN update, so the result would often be an outdated
>> revision string in reported issues.
> On the contrary, depending on the ./configure is actually the strength
> of the solution.
> Every svn update should be followed by ./configure, then make,
> and skipping ./configure after svn update should not be supported whatsoever.
> [...]


You may find this thread interesting:


The GraphicsMagick's version.sh is interesting solution.

Simply, there are two cases where version info is used/generated:

1) Static version info stored currently in multiple places
(./configure, nmake.opt, CMakeLists.txt)
What about having such 'static' version info stored in plain text file
e.g. VERSION with number per line.

Then, this file could be parsed by ./configure, by cmake script and
even by NMAKE stuff too
so the general version info is consistent across all build configurations.

2) Volatile VCS-based version
In case of SVN/Git revision, version.sh could do this job as well for
./configure (see GraphicsMagick),
and native CMake scripting/modules could be used for CMake configuration.
For NMAKE, there could be simple .bat script.

Best regards,
Mateusz Loskot, http://mateusz.loskot.net

More information about the geos-devel mailing list