blob: 0a7ae4b532ef36e0e459de8d00709eb0486ed821 [file] [log] [blame]
Vince Lehmanb722b102014-08-24 16:33:49 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2014 University of Memphis,
4 * Regents of the University of California
5 *
6 * This file is part of NLSR (Named-data Link State Routing).
7 * See AUTHORS.md for complete list of NLSR authors and contributors.
8 *
9 * NLSR is free software: you can redistribute it and/or modify it under the terms
10 * of the GNU General Public License as published by the Free Software Foundation,
11 * either version 3 of the License, or (at your option) any later version.
12 *
13 * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
14 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
19 **/
20
21#ifndef NLSR_VERSION_HPP
22#define NLSR_VERSION_HPP
23
24namespace nlsr {
25
26/** NLSR version follows Semantic Versioning 2.0.0 specification
27 * http://semver.org/
28 */
29
30// To change version number, modify VERSION variable in top-level wscript.
31
32/** \brief NLSR version represented as an integer
33 *
34 * MAJOR*1000000 + MINOR*1000 + PATCH
35 */
36#define NLSR_VERSION @VERSION@
37
38/** \brief NLSR version represented as a string
39 *
40 * MAJOR.MINOR.PATCH
41 */
42#define NLSR_VERSION_STRING "@VERSION_STRING@"
43
44/** \brief NLSR version string, including git commit information, if NLSR is build from
45 * specific git commit
46 *
47 * NLSR_VERSION_BUILD_STRING is obtained using the following command (`NLSR-` prefix is
48 * afterwards removed):
49 *
50 * `git describe --match 'NLSR-*'`
51 *
52 * When NLSR is built not from git, NLSR_VERSION_BUILD_STRING equals NLSR_VERSION_STRING
53 *
54 * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
55 *
56 * Example, 0.1.0-rc1-1-g5c86570
57 */
58#define NLSR_VERSION_BUILD_STRING "@VERSION_BUILD@"
59
60/// MAJOR version
61#define NLSR_VERSION_MAJOR @VERSION_MAJOR@
62/// MINOR version
63#define NLSR_VERSION_MINOR @VERSION_MINOR@
64/// PATCH version
65#define NLSR_VERSION_PATCH @VERSION_PATCH@
66
67} // namespace nlsr
68
69#endif // NLSR_VERSION_HPP