Argx 1.2.2-build
Simple yet powerful argument parser made in C++
Loading...
Searching...
No Matches
macros.hpp
Go to the documentation of this file.
1#pragma once
2
3/*
4 * NOTE:
5 * Macro `ARGX_AS_PYTHON_PACKAGE` is for the Argx python module, DO NOT enable it if using C++
6 */
7
8// Versioning
9#define ARGX_VERSION_MAJOR 1
10#define ARGX_VERSION_MINOR 2
11#define ARGX_VERSION_PATCH 2
12
13#define ARGX_VERSION_STD 20250903
14#define ARGX_PY_REQUIRED_VERSION_STD 20250721
15
16// Version states:
17// * dev 0
18// * beta 1
19// * snap 2
20// * build (AKA: Release) 3
21#ifndef ARGX_AS_PYTHON_PACKAGE
22# define ARGX_VERSION_STATE "build"
23#else
24# define ARGX_VERSION_STATE 3
25#endif
26
27#define ARGX_VERSION ((ARGX_VERSION_MAJOR<<16)|(ARGX_VERSION_MINOR<<8)|(ARGX_VERSION_PATCH)|(ARGX_VERSION_STATE << 24))
28
29#define ARGX_VERSION_CHECK(ARGX_VERSION_MAJOR, ARGX_VERSION_MINOR, ARGX_VERSION_PATCH, ARGX_VERSION_STATE) \
30 (((ARGX_VERSION_MAJOR)<<16)|((ARGX_VERSION_MINOR)<<8)|(ARGX_VERSION_PATCH)|((ARGX_VERSION_STATE) << 24))
31
32// DEV or PROD
33#define ARGX_DEV false
34
35// Macro utils
36#define ARGX_STRINGIFY(x) #x
37#define ARGX_TOSTRING(x) ARGX_STRINGIFY(x)
38
39#if defined(ARGX_AS_PYTHON_PACKAGE) && ARGX_VERSION_STD != ARGX_PY_REQUIRED_VERSION_STD
40# error "This ARGX standard does not comply with the python package, make sure to have 20250721 as the default standard for ARGX python packages"
41#endif
42