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