blob: 2cebe552f9ff344f33ec841c2c8988e78c963a1a [file] [log] [blame]
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -04001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Davide Pesaventoba3f6892020-12-08 22:18:35 -05002/*
Davide Pesaventobde084f2022-04-17 00:21:35 -04003 * Copyright (c) 2014-2022, Regents of the University of California
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -04004 *
Davide Pesaventoba3f6892020-12-08 22:18:35 -05005 * NAC library is free software: you can redistribute it and/or modify it under the
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -04006 * terms of the GNU Lesser General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option) any later version.
8 *
Davide Pesaventoba3f6892020-12-08 22:18:35 -05009 * NAC library is distributed in the hope that it will be useful, but WITHOUT ANY
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
12 *
13 * You should have received copies of the GNU General Public License and GNU Lesser
Davide Pesaventoba3f6892020-12-08 22:18:35 -050014 * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040015 * <http://www.gnu.org/licenses/>.
16 *
Davide Pesaventoba3f6892020-12-08 22:18:35 -050017 * See AUTHORS.md for complete list of NAC library authors and contributors.
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040018 */
19
Davide Pesaventoba3f6892020-12-08 22:18:35 -050020#ifndef NDN_NAC_VERSION_HPP
21#define NDN_NAC_VERSION_HPP
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040022
Davide Pesaventobde084f2022-04-17 00:21:35 -040023// ndn-nac version follows Semantic Versioning 2.0.0
24// https://semver.org/spec/v2.0.0.html
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040025
Davide Pesaventobde084f2022-04-17 00:21:35 -040026/**
27 * \brief ndn-nac version represented as an integer.
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040028 *
Davide Pesaventobde084f2022-04-17 00:21:35 -040029 * Equivalent to: #NDN_NAC_VERSION_MAJOR*1000000 + #NDN_NAC_VERSION_MINOR*1000 + #NDN_NAC_VERSION_PATCH
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040030 */
31#define NDN_NAC_VERSION @VERSION@
32
Davide Pesaventobde084f2022-04-17 00:21:35 -040033/// The major version of ndn-nac
34#define NDN_NAC_VERSION_MAJOR @VERSION_MAJOR@
35/// The minor version of ndn-nac
36#define NDN_NAC_VERSION_MINOR @VERSION_MINOR@
37/// The patch version of ndn-nac
38#define NDN_NAC_VERSION_PATCH @VERSION_PATCH@
39
40/**
41 * \brief ndn-nac version represented as a string.
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040042 *
Davide Pesaventobde084f2022-04-17 00:21:35 -040043 * Format:
44 * @code
45 * MAJOR.MINOR.PATCH
46 * @endcode
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040047 */
48#define NDN_NAC_VERSION_STRING "@VERSION_STRING@"
49
Davide Pesaventobde084f2022-04-17 00:21:35 -040050/**
51 * \brief ndn-nac version string, including git commit information if ndn-nac is built from a
52 * specific git commit.
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040053 *
Davide Pesaventobde084f2022-04-17 00:21:35 -040054 * #NDN_NAC_VERSION_BUILD_STRING is obtained using the following command (`ndn-nac-` prefix is
55 * afterwards removed): ``git describe --match 'ndn-nac-*'``
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040056 *
Davide Pesaventobde084f2022-04-17 00:21:35 -040057 * When ndn-nac is not built from git, #NDN_NAC_VERSION_BUILD_STRING equals #NDN_NAC_VERSION_STRING.
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040058 *
Davide Pesaventobde084f2022-04-17 00:21:35 -040059 * Format:
60 * @code
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040061 * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
Davide Pesaventobde084f2022-04-17 00:21:35 -040062 * @endcode
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040063 *
Davide Pesaventobde084f2022-04-17 00:21:35 -040064 * Example: 0.1.0-rc1-1-g5c86570
Alexander Afanasyev2b57aeb2018-06-15 18:32:28 -040065 */
66#define NDN_NAC_VERSION_BUILD_STRING "@VERSION_BUILD@"
67
Davide Pesaventoba3f6892020-12-08 22:18:35 -050068#endif // NDN_NAC_VERSION_HPP