#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2014, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# GROMACS is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at your option) any later version.
#
# GROMACS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with GROMACS; if not, see
# http://www.gnu.org/licenses, or write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# If you want to redistribute modifications to GROMACS, please
# consider that scientific software is very special. Version
# control is crucial - bugs must be traceable. We will be happy to
# consider code for inclusion in the official distribution, but
# derived work must not be called official GROMACS. Details are found
# in the README & COPYING files - if they are missing, get the
# official version at http://www.gromacs.org.
#
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
# Sets version information variables and provides CMake functions for
# generating files based on them
#
# This script provides the following basic version variables that need to be
# maintained manually:
# GMX_VERSION_MAJOR Major version number.
# GMX_VERSION_MINOR Minor version number.
# GMX_VERSION_PATCH Patch version number.
# Should always be defined: zero for, e.g., 5.0.
# GMX_VERSION_SUFFIX String suffix to add to numeric version string.
# "-dev" is automatically added when not building from a source package,
# and does not need to be kept here.
# LIBRARY_SOVERSION so version for the built libraries.
# Should be increased for each binary incompatible release (in GROMACS,
# the typical policy is to increase it for each major/minor version
# change, but not for patch releases, even if the latter may not always
# be fully binary compatible).
# LIBRARY_VERSION Full library version.
# REGRESSIONTEST_BRANCH For builds not from source packages, name of the
# regressiontests branch at gerrit.gromacs.org whose HEAD can test this
# code, *if* this code is recent enough (i.e., contains all changes from
# the corresponding code branch that affects the regression test
# results).
# REGRESSIONTEST_MD5SUM
# The MD5 checksum of the regressiontest tarball. Only used when building
# from a source package.
# They are collected into a single section below.
# The following variables are set based on these:
# GMX_VERSION String composed from GMX_VERSION_* numeric variables
# above. Example: 4.6.1, 5.0
# GMX_VERSION_STRING String with GMX_VERSION suffixed with the given
# suffix and possibly "-dev" for builds not from a source package.
# GMX_VERSION_NUMERIC Numeric version number (e.g., 40601 for 4.6.1).
# GMX_API_VERSION Numeric API version.
# This is currently set automatically to GMX_VERSION_NUMERIC, but may
# become manually maintained in the future if there will be releases
# where the API does not change, but programs/libraries do.
# In such a case, this should be the first version where the current API
# appeared.
# REGRESSIONTEST_VERSION For source packages, version number of the
# matching regressiontests tarball. Not used for builds not from source
# packages.
# The latter two are used to generate gromacs/version.h to allow software
# written against the GROMACS API to provide some #ifdef'ed code to support
# multiple GROMACS versions.
#
# The following variables are defined without manual intervention:
# SOURCE_IS_SOURCE_DISTRIBUTION The source tree is from a source tarball.
# SOURCE_IS_GIT_REPOSITORY The source tree is a git repository.
# Note that both can be false if the tree has been extracted, e.g., as a
# tarball directly from git.
# Additionally, the following variable is defined:
# BUILD_IS_INSOURCE The build is happening in-source.
#
# This script also declares machinery to generate and obtain version
# information from a git repository. This is enabled by default if the source
# tree is a git, but can be disabled with
# GMX_GIT_VERSION_INFO Advanced CMake variable to disable git
# version info generation.
# The main interface to this machinery is the gmx_configure_version_file()
# CMake function. The signature is
# gmx_configure_version_file(