Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Davide Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 2 | /* |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 3 | * Copyright (c) 2014-2022, Regents of the University of California |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 4 | * |
Davide Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 5 | * NAC library is free software: you can redistribute it and/or modify it under the |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 6 | * 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 Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 9 | * NAC library is distributed in the hope that it will be useful, but WITHOUT ANY |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 10 | * 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 Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 14 | * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 15 | * <http://www.gnu.org/licenses/>. |
| 16 | * |
Davide Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 17 | * See AUTHORS.md for complete list of NAC library authors and contributors. |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 18 | */ |
| 19 | |
Davide Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 20 | #ifndef NDN_NAC_VERSION_HPP |
| 21 | #define NDN_NAC_VERSION_HPP |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 22 | |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 23 | // ndn-nac version follows Semantic Versioning 2.0.0 |
| 24 | // https://semver.org/spec/v2.0.0.html |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 25 | |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 26 | /** |
| 27 | * \brief ndn-nac version represented as an integer. |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 28 | * |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 29 | * Equivalent to: #NDN_NAC_VERSION_MAJOR*1000000 + #NDN_NAC_VERSION_MINOR*1000 + #NDN_NAC_VERSION_PATCH |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 30 | */ |
| 31 | #define NDN_NAC_VERSION @VERSION@ |
| 32 | |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 33 | /// 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 Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 42 | * |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 43 | * Format: |
| 44 | * @code |
| 45 | * MAJOR.MINOR.PATCH |
| 46 | * @endcode |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 47 | */ |
| 48 | #define NDN_NAC_VERSION_STRING "@VERSION_STRING@" |
| 49 | |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 50 | /** |
| 51 | * \brief ndn-nac version string, including git commit information if ndn-nac is built from a |
| 52 | * specific git commit. |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 53 | * |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 54 | * #NDN_NAC_VERSION_BUILD_STRING is obtained using the following command (`ndn-nac-` prefix is |
| 55 | * afterwards removed): ``git describe --match 'ndn-nac-*'`` |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 56 | * |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 57 | * When ndn-nac is not built from git, #NDN_NAC_VERSION_BUILD_STRING equals #NDN_NAC_VERSION_STRING. |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 58 | * |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 59 | * Format: |
| 60 | * @code |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 61 | * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH) |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 62 | * @endcode |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 63 | * |
Davide Pesavento | bde084f | 2022-04-17 00:21:35 -0400 | [diff] [blame] | 64 | * Example: 0.1.0-rc1-1-g5c86570 |
Alexander Afanasyev | 2b57aeb | 2018-06-15 18:32:28 -0400 | [diff] [blame] | 65 | */ |
| 66 | #define NDN_NAC_VERSION_BUILD_STRING "@VERSION_BUILD@" |
| 67 | |
Davide Pesavento | ba3f689 | 2020-12-08 22:18:35 -0500 | [diff] [blame] | 68 | #endif // NDN_NAC_VERSION_HPP |