-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathVersion.d.tpl
108 lines (90 loc) · 2.94 KB
/
Version.d.tpl
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*******************************************************************************
Version information generated at compile time.
This file is automatically generated.
DO NOT CHANGE, IT WILL BE OVERWRITTEN
DO NOT ADD TO THE REPOSITORY
Copyright:
Template source Copyright (c) 2014-2016 dunnhumby Germany GmbH.
Generated code based on this template is owned by the user who ran the
generation.
License:
Template source is distributed under Boost Software License Version 1.0.
Generated code based on this template is determined by the user who ran
the generation.
*******************************************************************************/
module @MODULE@;
string[string] version_info;
static this()
{
version_info["version"] = "@VERSION@";
version_info["build_date"] = "@DATE@";
version_info["build_author"] = "@AUTHOR@";
version_info["compiler"] = "@COMPILER@";
version_info["dflags"] = "@DFLAGS@";
version_info["flavour"] = "@FLAVOUR@";
@LIBRARIES@
buildPredefinedVersions();
}
/*******************************************************************************
Store predefined versions that are defined while compiling in the global
variable Versions.
*******************************************************************************/
private void buildPredefinedVersions()
{
mixin(Id!("DigitalMars"));
mixin(Id!("GNU"));
mixin(Id!("LDC"));
mixin(Id!("SDC"));
mixin(Id!("D_NET"));
mixin(Id!("Windows"));
mixin(Id!("Win32"));
mixin(Id!("Win64"));
mixin(Id!("linux"));
mixin(Id!("OSX"));
mixin(Id!("FreeBSD"));
mixin(Id!("OpenBSD"));
mixin(Id!("BSD"));
mixin(Id!("Solaris"));
mixin(Id!("Posix"));
mixin(Id!("AIX"));
mixin(Id!("SkyOS"));
mixin(Id!("SysV3"));
mixin(Id!("SysV4"));
mixin(Id!("Hurd"));
mixin(Id!("Cygwin"));
mixin(Id!("MinGW"));
mixin(Id!("X86"));
mixin(Id!("X86_64"));
mixin(Id!("ARM"));
mixin(Id!("PPC"));
mixin(Id!("PPC64"));
mixin(Id!("IA64"));
mixin(Id!("MIPS"));
mixin(Id!("MIPS64"));
mixin(Id!("SPARC"));
mixin(Id!("SPARC64"));
mixin(Id!("S390"));
mixin(Id!("S390X"));
mixin(Id!("HPPA"));
mixin(Id!("HPPA64"));
mixin(Id!("SH"));
mixin(Id!("SH64"));
mixin(Id!("Alpha"));
mixin(Id!("LittleEndian"));
mixin(Id!("BigEndian"));
mixin(Id!("D_Coverage"));
mixin(Id!("D_Ddoc"));
mixin(Id!("D_InlineAsm_X86"));
mixin(Id!("D_InlineAsm_X86_64"));
mixin(Id!("D_LP64"));
mixin(Id!("D_PIC"));
}
/*******************************************************************************
Adds the `name` to the `Version` global (key "ver_name", value "name") iff
version (name) is defined.
*******************************************************************************/
private template Id (string name)
{
static immutable Id = `version (` ~ name ~ `) version_info["ver_`
~ name ~ `"] = "` ~ name ~ `";`;
}