forked from andrew-hardin/cmake-git-version-tracking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git_info.h.in
40 lines (33 loc) · 1.04 KB
/
git_info.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _GIT_INFO_H_INCLUDED_
#define _GIT_INFO_H_INCLUDED_
@GTML_INFO@
// based on https://raw.githubusercontent.com/andrew-hardin/cmake-git-version-tracking/master/git.h
// > Released under the MIT License.
// > https://raw.githubusercontent.com/andrew-hardin/cmake-git-version-tracking/master/LICENSE
#include <cstdint>
#include <optional>
namespace nbl::gtml {
struct GitInfo {
bool isPopulated;
std::optional<bool> hasUncommittedChanges;
const char* commitAuthorName;
const char* commitAuthorEmail;
const char* commitHash;
const char* commitShortHash;
const char* commitDate;
const char* commitSubject;
const char* commitBody;
const char* describe;
const char* branchName;
const char* latestTag;
const char* latestTagName;
};
enum E_GIT_REPO_META : uint8_t
{
@GTML_ENUMS@,
EGRM_COUNT
};
extern const GitInfo gitMeta[EGRM_COUNT];
@GTML_EXTERNS@;
} // namespece nbl::gtml
#endif //_GIT_INFO_H_INCLUDED_