| 1 |
/* |
| 2 |
* This file is part of the GROMACS molecular simulation package. |
| 3 |
* |
| 4 |
* Copyright 2012- The GROMACS Authors |
| 5 |
* and the project initiators Erik Lindahl, Berk Hess and David van der Spoel. |
| 6 |
* Consult the AUTHORS/COPYING files and https://www.gromacs.org for details. |
| 7 |
* |
| 8 |
* GROMACS is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU Lesser General Public License |
| 10 |
* as published by the Free Software Foundation; either version 2.1 |
| 11 |
* of the License, or (at your option) any later version. |
| 12 |
* |
| 13 |
* GROMACS is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* Lesser General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Lesser General Public |
| 19 |
* License along with GROMACS; if not, see |
| 20 |
* https://www.gnu.org/licenses, or write to the Free Software Foundation, |
| 21 |
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 22 |
* |
| 23 |
* If you want to redistribute modifications to GROMACS, please |
| 24 |
* consider that scientific software is very special. Version |
| 25 |
* control is crucial - bugs must be traceable. We will be happy to |
| 26 |
* consider code for inclusion in the official distribution, but |
| 27 |
* derived work must not be called official GROMACS. Details are found |
| 28 |
* in the README & COPYING files - if they are missing, get the |
| 29 |
* official version at https://www.gromacs.org. |
| 30 |
* |
| 31 |
* To help us fund GROMACS development, we humbly ask that you cite |
| 32 |
* the research papers on the package. Check out https://www.gromacs.org. |
| 33 |
*/ |
| 34 |
/*! \file |
| 35 |
* \brief |
| 36 |
* Version information for software that links to \Gromacs. |
| 37 |
* |
| 38 |
* \if libapi |
| 39 |
* This include file will be configured by CMake and contains version |
| 40 |
* information. It is not used by \Gromacs, but intended for software that |
| 41 |
* links to \Gromacs. |
| 42 |
* The values come from the main CMakeLists.txt. |
| 43 |
* \endif |
| 44 |
* |
| 45 |
* This file exists from 4.6 onward, and can be included as |
| 46 |
* `<gromacs/version.h>`. In 4.6, it is also included by |
| 47 |
* `<gromacs/typedefs.h>, but that header has already moved in 5.0. |
| 48 |
* |
| 49 |
* This header defines two values, the \Gromacs version, and the API version. |
| 50 |
* The versions are in numerical form, where, for example, version |
| 51 |
* 4.6.1 would be 40601. |
| 52 |
* |
| 53 |
* The API version is defined in ::GMX_API_VERSION, and denotes the |
| 54 |
* version of the programmer interface, i.e. the installed header files |
| 55 |
* and compatible library. |
| 56 |
* |
| 57 |
* Programs written against the \Gromacs library can use this file |
| 58 |
* to provide some backward compatibility even though parts of the API |
| 59 |
* change. For example: |
| 60 |
* \code |
| 61 |
#include <gromacs/version.h> |
| 62 |
#if (GMX_API_VERSION < 50000) |
| 63 |
.... <do pre-5.0 stuff> |
| 64 |
#else |
| 65 |
.... <do post-5.0 stuff> |
| 66 |
#endif |
| 67 |
\endcode |
| 68 |
* where version.h is included directly. For code that must be compatible |
| 69 |
* between 4.5 and 4.6, an interim solution is to include typedefs.h, which |
| 70 |
* includes this file: |
| 71 |
* \code |
| 72 |
#include <gromacs/typedefs.h> |
| 73 |
#if !defined(GMX_API_VERSION) || (GMX_API_VERSION < 40600) |
| 74 |
.... <do 4.5 specific stuff> |
| 75 |
#elif (GMX_API_VERSION < 40700) |
| 76 |
.... <do 4.6 specific stuff> |
| 77 |
#endif |
| 78 |
\endcode |
| 79 |
* |
| 80 |
* \inpublicapi |
| 81 |
*/ |
| 82 |
#ifndef GMX_VERSION_H |
| 83 |
#define GMX_VERSION_H |
| 84 |
|
| 85 |
/*! \brief |
| 86 |
* API version of this set of \Gromacs headers. |
| 87 |
* |
| 88 |
* If there are multiple versions of \Gromacs that work with the same set of |
| 89 |
* headers, then this version is not updated between the versions, even though |
| 90 |
* ::GMX_VERSION is. |
| 91 |
* For 4.6 and 5.0 (and likely for some time in the future as well), this |
| 92 |
* tracks the exact \Gromacs version. |
| 93 |
*/ |
| 94 |
#define GMX_API_VERSION @GMX_API_VERSION@ |
| 95 |
|
| 96 |
/*! \brief |
| 97 |
* Exact \Gromacs version of this set of headers. |
| 98 |
* |
| 99 |
* This specifies the version number of the actual \Gromacs library that |
| 100 |
* installed these headers. |
| 101 |
*/ |
| 102 |
#define GMX_VERSION @GMX_VERSION_NUMERIC@ |
| 103 |
|
| 104 |
#endif |