Xyris  0.5
defines.hpp
Go to the documentation of this file.
1 /**
2  * @file defines.hpp
3  * @author Keeton Feavel ([email protected])
4  * @brief Compiler pre-processor definitions
5  * @version 0.1
6  * @date 2021-07-20
7  *
8  * @copyright Copyright the Xyris Contributors (c) 2021
9  *
10  */
11 #pragma once
12 
13 // Define the Git commit version if not declared by compiler
14 #ifndef COMMIT
15  #define COMMIT "unknown"
16 #endif
17 // Assume that if major isn't set none of them are
18 #ifndef VER_MAJOR
19  #define VER_MAJOR '0'
20  #define VER_MINOR '0'
21  #define VER_PATCH '0'
22 #endif
23 // Xyris release name
24 #ifndef VER_NAME
25  #define VER_NAME "unknown"
26 #endif
27 #ifndef REPO_URL
28  #define REPO_URL "(unknown)"
29 #endif
30 #ifndef BUILD_DATE
31 #define BUILD_DATE \
32  (((__DATE__)[7] - '0') * 1000 + \
33  ((__DATE__)[8] - '0') * 100 + \
34  ((__DATE__)[9] - '0') * 10 + \
35  ((__DATE__)[10] - '0') * 1)
36 #endif