varpar.cpp v1.0.0-build
Parse variables in an env style for C++ from a .varpar file
Loading...
Searching...
No Matches
VPpredefines.hpp
Go to the documentation of this file.
1/**
2 * VPpredefines.h - pcannonProjectStandards
3 * Predefines for C and C++ projects
4 * STD Information: 20250723 - 1.0S
5 * NOTES:
6 * Renamed to `VPpredefines.hpp`
7 */
8
9#pragma once
10
11// Project setup
12#define VP_DEFAULT_CPP_STD 201703L
13
14// Versioning
15#define VP_VERSION_MAJOR 1
16#define VP_VERSION_MINOR 0
17#define VP_VERSION_PATCH 0
18
19#define VP_VERSION_STD 20251027
20
21// Version states:
22// * dev
23// * beta
24// * build
25#define VP_VERSION_STATE "build"
26
27#define VP_VERSION ((VP_VERSION_MAJOR<<16)|(VP_VERSION_MINOR<<8)|(VP_VERSION_PATCH)|(VP_VERSION_STATE << 24))
28
29#define VP_VERSION_CHECK(VP_VERSION_MAJOR, VP_VERSION_MINOR, VP_VERSION_PATCH, VP_VERSION_STATE) \
30 (((VP_VERSION_MAJOR)<<16)|((VP_VERSION_MINOR)<<8)|(VP_VERSION_PATCH)|((VP_VERSION_STATE) << 24))
31
32// Macro utils
33#define VP_STRINGIFY(x) #x
34#define VP_TOSTRING(x) VP_STRINGIFY(x)
35
36#ifndef VP_DEV
37# define VP_DEV true
38#endif
39
40#ifdef WIN32
41# define VP_OS_WIN32
42#elif defined(__APPLE__) || defined(__MACH__) || defined(Macintosh)
43# define VP_OS_MACOS
44#elif defined(__linux__) || defined(__unix) || defined(__unix__)
45# define VP_OS_UNIX_LINUX
46#elif defined(__FreeBSD__)
47# define VP_OS_FREEBSD
48#else
49# error "Current platform is not supported"
50#endif // defined(WIN32) // Platform check
51