blob: dee1660f4ee7e56c323f0537ac3e75610e7c1ec0 [file] [log] [blame]
Alexander Afanasyevcfe0b062014-05-08 18:26:50 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (c) 2013-2014, Regents of the University of California.
4 * All rights reserved.
5 *
6 * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
7 * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
8 *
9 * This file licensed under New BSD License. See COPYING for detailed information about
10 * ndn-cxx library copyright, permissions, and redistribution restrictions.
11 *
12 * Based on code originally written by Jeff Thompson <jefft0@remap.ucla.edu>
13 */
14
15#ifndef NDN_VERSION_HPP
16#define NDN_VERSION_HPP
17
18namespace ndn {
19
20/** ndn-cxx version follows Semantic Versioning 2.0.0 specification
21 * http://semver.org/
22 */
23
24/** \brief ndn-cxx version represented as an integer
25 *
26 * MAJOR*1000000 + MINOR*1000 + PATCH
27 */
28#define NDN_CXX_VERSION @VERSION@
29
30/** \brief ndn-cxx version represented as a string
31 *
32 * MAJOR.MINOR.PATCH
33 */
34#define NDN_CXX_VERSION_STRING "@VERSION_STRING@"
35
36/** \brief ndn-cxx version string, including git commit information, if ndn-cxx is build from
37 * specific git commit
38 *
39 * NDN_CXX_VERSION_BUILD_STRING is obtained using the following command (`ndn-cxx-` prefix is
40 * afterwards removed):
41 *
42 * `git describe --match 'ndn-cxx-*'`
43 *
44 * When ndn-cxx is built not from git, NDN_CXX_VERSION_BUILD_STRING equals NDN_CXX_VERSION_STRING
45 *
46 * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
47 *
48 * Example, 0.1.0-rc1-1-g5c86570
49 */
50#define NDN_CXX_VERSION_BUILD_STRING "@VERSION_BUILD@"
51
52/// MAJOR version
53#define NDN_CXX_VERSION_MAJOR @VERSION_MAJOR@
54/// MINOR version
55#define NDN_CXX_VERSION_MINOR @VERSION_MINOR@
56/// PATCH version
57#define NDN_CXX_VERSION_PATCH @VERSION_PATCH@
58
59} // namespace ndn
60
61#endif // NDN_VERSION_HPP