#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2014, by the GROMACS development team, led by
+# Copyright (c) 2014,2015, 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.
set(GMX_VERSION "@GMX_VERSION@")
set(GMX_VERSION_MAJOR "@GMX_VERSION_MAJOR@")
-set(GMX_VERSION_MINOR "@GMX_VERSION_MINOR@")
set(GMX_VERSION_PATCH "@GMX_VERSION_PATCH@")
set(GMX_VERSION_STRING "@GMX_VERSION_STRING@")
"GROMACS - a toolkit for high-performance molecular simulation")
# Set version info.
set(CPACK_PACKAGE_VERSION_MAJOR ${GMX_VERSION_MAJOR})
- set(CPACK_PACKAGE_VERSION_MINOR ${GMX_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${GMX_VERSION_PATCH})
set(CPACK_PACKAGE_VERSION ${GMX_VERSION_STRING})
# Add various text resources for some installers.
# 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.
+# Should always be defined: zero for, e.g., 2016.
# 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. This mechanism is not quite enough
# 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
+# above. Example: 4.6.1, 5.0, 2016
# 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_VERSION_NUMERIC Numeric version number (e.g., 40601 for 4.6.1, 20160001 for 2016.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
# The GROMACS convention is that these are the version number of the next
# release that is going to be made from this branch.
-set(GMX_VERSION_MAJOR 5)
-set(GMX_VERSION_MINOR 2)
+set(GMX_VERSION_MAJOR 2016)
set(GMX_VERSION_PATCH 0)
# The suffix, on the other hand, is used mainly for betas and release
# candidates, where it signifies the most recent such release from
# General version management based on manually set numbers
if (GMX_VERSION_PATCH)
- set(GMX_VERSION "${GMX_VERSION_MAJOR}.${GMX_VERSION_MINOR}.${GMX_VERSION_PATCH}")
+ set(GMX_VERSION "${GMX_VERSION_MAJOR}.${GMX_VERSION_PATCH}")
else()
- set(GMX_VERSION "${GMX_VERSION_MAJOR}.${GMX_VERSION_MINOR}")
+ set(GMX_VERSION "${GMX_VERSION_MAJOR}")
endif()
set(GMX_VERSION_STRING "${GMX_VERSION}${GMX_VERSION_SUFFIX}")
option(GMX_BUILD_TARBALL "Build tarball without -dev version suffix" OFF)
set(REGRESSIONTEST_MD5SUM "614a74e9b143bda5476f87f4ce08eec0" CACHE INTERNAL "MD5 sum of the regressiontests tarball")
math(EXPR GMX_VERSION_NUMERIC
- "${GMX_VERSION_MAJOR}*10000 + ${GMX_VERSION_MINOR}*100 + ${GMX_VERSION_PATCH}")
+ "${GMX_VERSION_MAJOR}*10000 + ${GMX_VERSION_PATCH}")
set(GMX_API_VERSION ${GMX_VERSION_NUMERIC})
#####################################################################
* different patch level versions, but we do not guarantee
* compatibility between different major/minor versions - check this.
*/
- int gmx_major, gmx_minor;
- int cpt_major, cpt_minor;
- sscanf(gmx_version(), "VERSION %5d.%5d", &gmx_major, &gmx_minor);
- int ret = sscanf(version, "VERSION %5d.%5d", &cpt_major, &cpt_minor);
- version_differs = (ret < 2 || gmx_major != cpt_major ||
- gmx_minor != cpt_minor);
+ int gmx_major;
+ int cpt_major;
+ sscanf(gmx_version(), "%5d", &gmx_major);
+ int ret = sscanf(version, "%5d", &cpt_major);
+ version_differs = (ret < 1 || gmx_major != cpt_major);
}
check_string(fplog, "Build time", BUILD_TIME, btime, &mm);
if (mm)
{
const char msg_version_difference[] =
- "The current GROMACS major & minor version are not identical to those that\n"
+ "The current GROMACS major version is not identical to the one that\n"
"generated the checkpoint file. In principle GROMACS does not support\n"
"continuation from checkpoints between different versions, so we advise\n"
"against this. If you still want to try your luck we recommend that you use\n"
"the -noappend flag to keep your output files from the two versions separate.\n"
"This might also work around errors where the output fields in the energy\n"
- "file have changed between the different major & minor versions.\n";
+ "file have changed between the different versions.\n";
const char msg_mismatch_notice[] =
"GROMACS patchlevel, binary or parallel settings differ from previous run.\n"
#ifdef GMX_DOUBLE
precisionString = " (double precision)";
#endif
- sprintf(programInfo, "%.100s, %.128s%.24s",
+ sprintf(programInfo, "%.100s %.128s%.24s",
gmx::getProgramContext().displayName(),
gmx_version(), precisionString);
if (mode == 'w')
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/snprintf.h"
#include "gromacs/utility/txtdump.h"
#define TPX_TAG_RELEASE "release"
}
else
{
- gmx_fio_write_string(fio, gmx_version());
+ snprintf(buf, STRLEN, "VERSION %s", gmx_version());
+ gmx_fio_write_string(fio, buf);
bDouble = (precision == sizeof(double));
gmx_fio_setprecision(fio, bDouble);
gmx_fio_do_int(fio, precision);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2012,2014,2015, 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.
*/
#include "gromacs/utility/baseversion-gen.h"
-const char _gmx_ver_string[] = "VERSION @GMX_VERSION_STRING_FULL@";
+const char _gmx_ver_string[] = "@GMX_VERSION_STRING_FULL@";
const char _gmx_full_git_hash[] = "@GMX_VERSION_FULL_HASH@";
const char _gmx_central_base_hash[] = "@GMX_VERSION_CENTRAL_BASE_HASH@";
*
* This can be a plain version if git version info was disabled during the
* build.
- * The returned string starts with a literal word `VERSION`.
+ * The returned string used to start with a literal word `VERSION` before
+ * \Gromacs 2016, but no longer does.
*
* \ingroup module_utility
*/
// necessary to read stuff above the copyright notice.
// The line above the copyright notice puts the copyright notice is
// context, though.
- fprintf(fp, "%sGROMACS: %s, %s%s%s\n", prefix, name,
+ fprintf(fp, "%sGROMACS: %s, version %s%s%s\n", prefix, name,
gmx_version(), precisionString, suffix);
}
const char *const binaryPath = programContext.fullBinaryPath();
}
std::fprintf(fp, "\n-------------------------------------------------------\n");
- std::fprintf(fp, "Program: %s, %s\n", programName, gmx_version());
+ std::fprintf(fp, "Program: %s, version %s\n", programName, gmx_version());
if (file != NULL)
{
// TODO: Check whether this works on Windows. If it doesn't, perhaps