Mercurial > projects > dstep
comparison dstep/internal/Version.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | 07194b026fa4 |
children |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
4 * Version: Initial created: Mar 28, 2009 | 4 * Version: Initial created: Mar 28, 2009 |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | 5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) |
6 */ | 6 */ |
7 module dstep.internal.Version; | 7 module dstep.internal.Version; |
8 | 8 |
9 public import mambo.util.Version; | 9 |
10 template Version (char[] V) | |
11 { | |
12 mixin( | |
13 "version(" ~ V ~ ") | |
14 { | |
15 const bool Version = true; | |
16 } | |
17 else | |
18 { | |
19 const bool Version = false; | |
20 }"); | |
21 } | |
22 | |
23 version (GNU) | |
24 { | |
25 version (darwin) | |
26 version = OSX; | |
27 | |
28 static if ((void*).sizeof > int.sizeof) | |
29 version = D_LP64; | |
30 } | |
31 | |
32 version (DigitalMars) | |
33 version (OSX) | |
34 version = darwin; | |
35 | |
36 //Compiler Vendors | |
37 version (DigitalMars) const bool DigitalMars = true; | |
38 else const bool DigitalMars = false; | |
39 | |
40 version (GNU) const bool GNU = true; | |
41 else const bool GNU = false; | |
42 | |
43 version (LDC) const bool LDC = true; | |
44 else const bool LDC = false; | |
45 | |
46 version (LLVM) const bool LLVM = true; | |
47 else const bool LLVM = false; | |
48 | |
49 | |
50 | |
51 //Processors | |
52 version (PPC) const bool PPC = true; | |
53 else const bool PPC = false; | |
54 | |
55 version (PPC64) const bool PPC64 = true; | |
56 else const bool PPC64 = false; | |
57 | |
58 version (SPARC) const bool SPARC = true; | |
59 else const bool SPARC = false; | |
60 | |
61 version (SPARC64) const bool SPARC64 = true; | |
62 else const bool SPARC64 = false; | |
63 | |
64 version (X86) const bool X86 = true; | |
65 else const bool X86 = false; | |
66 | |
67 version (X86_64) const bool X86_64 = true; | |
68 else const bool X86_64 = false; | |
69 | |
70 | |
71 | |
72 //Operating Systems | |
73 version (aix) const bool aix = true; | |
74 else const bool aix = false; | |
75 | |
76 version (cygwin) const bool cygwin = true; | |
77 else const bool cygwin = false; | |
78 | |
79 version (darwin) const bool darwin = true; | |
80 else const bool darwin = false; | |
81 | |
82 version (OSX) const bool OSX = true; | |
83 else const bool OSX = false; | |
84 | |
85 version (freebsd) const bool freebsd = true; | |
86 else const bool freebsd = false; | |
87 | |
88 version (linux) const bool linux = true; | |
89 else const bool linux = false; | |
90 | |
91 version (solaris) const bool solaris = true; | |
92 else const bool solaris = false; | |
93 | |
94 version (Unix) const bool Unix = true; | |
95 else const bool Unix = false; | |
96 | |
97 version (Win32) const bool Win32 = true; | |
98 else const bool Win32 = false; | |
99 | |
100 version (Win64) const bool Win64 = true; | |
101 else const bool Win64 = false; | |
102 | |
103 version (Windows) const bool Windows = true; | |
104 else const bool Windows = false; | |
105 | |
106 | |
107 | |
108 //Rest | |
109 version (BigEndian) const bool BigEndian = true; | |
110 else const bool BigEndian = false; | |
111 | |
112 version (LittleEndian) const bool LittleEndian = true; | |
113 else const bool LittleEndian = false; | |
114 | |
115 version (D_Coverage) const bool D_Coverage = true; | |
116 else const bool D_Coverage = false; | |
117 | |
118 version (D_Ddoc) const bool D_Ddoc = true; | |
119 else const bool D_Ddoc = false; | |
120 | |
121 version (D_InlineAsm_X86) const bool D_InlineAsm_X86 = true; | |
122 else const bool D_InlineAsm_X86 = false; | |
123 | |
124 version (D_InlineAsm_X86_64) const bool D_InlineAsm_X86_64 = true; | |
125 else const bool D_InlineAsm_X86_64 = false; | |
126 | |
127 version (D_LP64) const bool D_LP64 = true; | |
128 else const bool D_LP64 = false; | |
129 | |
130 version (D_PIC) const bool D_PIC = true; | |
131 else const bool D_PIC = false; | |
132 | |
133 version (GNU_BitsPerPointer32) const bool GNU_BitsPerPointer32 = true; | |
134 else const bool GNU_BitsPerPointer32 = false; | |
135 | |
136 version (GNU_BitsPerPointer64) const bool GNU_BitsPerPointer64 = true; | |
137 else const bool GNU_BitsPerPointer64 = false; | |
138 | |
139 version (all) const bool all = true; | |
140 else const bool D_InlineAsm_X86_64 = false; | |
141 | |
142 version (none) const bool D_InlineAsm_X86_64 = true; | |
143 else const bool none = false; | |
144 | |
145 version (Tango) | |
146 { | |
147 const bool Tango = true; | |
148 const bool Phobos = false; | |
149 } | |
150 | |
151 else | |
152 { | |
153 const bool Tango = false; | |
154 const bool Phobos = true; | |
155 } |