Improve version information handling
commit15b8a9dc67e0ead2144f058a627c89f3c705bb70
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 26 Mar 2014 19:44:26 +0000 (26 21:44 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 29 Mar 2014 13:52:50 +0000 (29 14:52 +0100)
tree0b664ef4dd2132f69c44e449e81cfeb4e196f531
parent8f3461734deb54b91c5d50afbbaf873bfd2160bb
Improve version information handling

- Always use the same mechanism (a generated source file) to communicate
  the version information from the build system to the source, even when
  not using git to generate the info.  This allows removing several
  variables from config.h.
- Rename the generated file from gitversion.c to baseversion-gen.c to
  better reflect its new role.  Rename the header correspondingly.
- Add utility/baseversion.h to provide functions to access the version
  information, and use the new functions in a few places that were using
  copyrite.cpp only for GromacsVersion().  This removes some cyclic
  dependencies and warnings from the new Doxygen checker.
- Make checkpoint.c use the full version string in the checking instead
  of VERSION, which is now removed from config.h.  It is anyways
  checking also the build time, so it doesn't hurt even if the version
  string is more specific.

Change-Id: Ie85bab434a5e8c7e4e1a72b0af726ea4ea1f8d6f
13 files changed:
cmake/gmxGenerateVersionInfo.cmake
doxygen/suppressions.txt
src/config.h.cmakein
src/gromacs/CMakeLists.txt
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/gmxlib/checkpoint.c
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/utility/.gitignore
src/gromacs/utility/baseversion-gen.c.cmakein [copied from src/gromacs/utility/gitversion.c.cmakein with 93% similarity]
src/gromacs/utility/baseversion-gen.h [copied from src/gromacs/utility/gitversion.h with 93% similarity]
src/gromacs/utility/baseversion.cpp [moved from src/gromacs/utility/gitversion.c.cmakein with 82% similarity]
src/gromacs/utility/baseversion.h [moved from src/gromacs/utility/gitversion.h with 62% similarity]
src/gromacs/utility/errorformat.cpp