1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/llarp/constants/version.cpp.in
Jason Rhinelander 3dd3d48fbb Consolidate cmake vars & definitions
CMake will set version variables itself if you give the version in the
project(), which is cleaner.  Also removes some (nearly) duplicate
definitions and settings added in basic_definitions.cmake for unknown
reasons.

Removes some redundant settings (name, description, version) from the
cpack settings which already default to the values from the project()
call.
2020-04-19 23:16:23 -03:00

28 lines
1.1 KiB
C++

#include <constants/version.hpp>
#include <constants/version.h>
#include <constants/proto.hpp>
// clang-format off
#define LLARP_STRINGIFY2(val) #val
#define LLARP_STRINGIFY(val) LLARP_STRINGIFY2(val)
#define LLARP_VERSION_STR \
LLARP_STRINGIFY(LLARP_VERSION_MAJOR) \
"." LLARP_STRINGIFY(LLARP_VERSION_MINOR) "." LLARP_STRINGIFY( \
LLARP_VERSION_PATCH)
#define LLARP_VERSION_FULL LLARP_VERSION_STR "-@VERSIONTAG@"
namespace llarp
{
// clang-format off
const std::array<uint16_t, 3> VERSION{{LLARP_VERSION_MAJOR, LLARP_VERSION_MINOR, LLARP_VERSION_PATCH}};
const std::array<uint64_t, 4> ROUTER_VERSION{{LLARP_PROTO_VERSION, LLARP_VERSION_MAJOR, LLARP_VERSION_MINOR, LLARP_VERSION_PATCH}};
const char* const VERSION_STR = LLARP_VERSION_STR;
const char* const VERSION_TAG = "@VERSIONTAG@";
const char* const VERSION_FULL = LLARP_NAME "-" LLARP_VERSION_STR "-@VERSIONTAG@";
const char* const RELEASE_MOTTO = LLARP_RELEASE_MOTTO;
const char* const DEFAULT_NETID = LLARP_DEFAULT_NETID;
// clang-format on
} // namespace llarp