initial commit
[rofl0r-TntUnicode.git] / Source / TntCompilers.inc
blob5ab13901bacc00ed7e16000a75976f11993e26d7
1 //----------------------------------------------------------------------------------------------------------------------\r
2 // Include file to determine which compiler is currently being used to build the project/component.\r
3 // This file uses ideas from Brad Stowers DFS.inc file (www.delphifreestuff.com).\r
4 //\r
5 // Portions created by Mike Lischke are Copyright\r
6 // (C) 1999-2002 Dipl. Ing. Mike Lischke. All Rights Reserved.\r
7 //----------------------------------------------------------------------------------------------------------------------\r
8 // The following symbols are defined:\r
9 //\r
10 // COMPILER_1    : Kylix/Delphi/BCB 1.x is the compiler.\r
11 // COMPILER_1_UP : Kylix/Delphi/BCB 1.x or higher is the compiler.\r
12 // COMPILER_2    : Kylix/Delphi 2.x or BCB 1.x is the compiler.\r
13 // COMPILER_2_UP : Kylix/Delphi 2.x or higher, or BCB 1.x or higher is the compiler.\r
14 // COMPILER_3    : Kylix/Delphi/BCB 3.x is the compiler.\r
15 // COMPILER_3_UP : Kylix/Delphi/BCB 3.x or higher is the compiler.\r
16 // COMPILER_4    : Kylix/Delphi/BCB 4.x is the compiler.\r
17 // COMPILER_4_UP : Kylix/Delphi/BCB 4.x or higher is the compiler.\r
18 // COMPILER_5    : Kylix/Delphi/BCB 5.x is the compiler.\r
19 // COMPILER_5_UP : Kylix/Delphi/BCB 5.x or higher is the compiler.\r
20 // COMPILER_6    : Kylix/Delphi/BCB 6.x is the compiler.\r
21 // COMPILER_6_UP : Kylix/Delphi/BCB 6.x or higher is the compiler.\r
22 // COMPILER_7    : Kylix/Delphi/BCB 7.x is the compiler.\r
23 // COMPILER_7_UP : Kylix/Delphi/BCB 7.x or higher is the compiler.\r
24 //\r
25 // Only defined if Windows is the target:\r
26 // CPPB        : Any version of BCB is being used.\r
27 // CPPB_1      : BCB v1.x is being used.\r
28 // CPPB_3      : BCB v3.x is being used.\r
29 // CPPB_3_UP   : BCB v3.x or higher is being used.\r
30 // CPPB_4      : BCB v4.x is being used.\r
31 // CPPB_4_UP   : BCB v4.x or higher is being used.\r
32 // CPPB_5      : BCB v5.x is being used.\r
33 // CPPB_5_UP   : BCB v5.x or higher is being used.\r
34 // CPPB_6      : BCB v6.x is being used.\r
35 // CPPB_6_UP   : BCB v6.x or higher is being used.\r
36 //\r
37 // Only defined if Windows is the target:\r
38 // DELPHI      : Any version of Delphi is being used.\r
39 // DELPHI_1    : Delphi v1.x is being used.\r
40 // DELPHI_2    : Delphi v2.x is being used.\r
41 // DELPHI_2_UP : Delphi v2.x or higher is being used.\r
42 // DELPHI_3    : Delphi v3.x is being used.\r
43 // DELPHI_3_UP : Delphi v3.x or higher is being used.\r
44 // DELPHI_4    : Delphi v4.x is being used.\r
45 // DELPHI_4_UP : Delphi v4.x or higher is being used.\r
46 // DELPHI_5    : Delphi v5.x is being used.\r
47 // DELPHI_5_UP : Delphi v5.x or higher is being used.\r
48 // DELPHI_6    : Delphi v6.x is being used.\r
49 // DELPHI_6_UP : Delphi v6.x or higher is being used.\r
50 // DELPHI_7    : Delphi v7.x is being used.\r
51 // DELPHI_7_UP : Delphi v7.x or higher is being used.\r
52 //\r
53 // Only defined if Linux is the target:\r
54 // KYLIX       : Any version of Kylix is being used.\r
55 // KYLIX_1     : Kylix 1.x is being used.\r
56 // KYLIX_1_UP  : Kylix 1.x or higher is being used.\r
57 // KYLIX_2     : Kylix 2.x is being used.\r
58 // KYLIX_2_UP  : Kylix 2.x or higher is being used.\r
59 // KYLIX_3     : Kylix 3.x is being used.\r
60 // KYLIX_3_UP  : Kylix 3.x or higher is being used.\r
61 //\r
62 // Only defined if Linux is the target:\r
63 // QT_CLX      : Trolltech's QT library is being used.\r
64 //----------------------------------------------------------------------------------------------------------------------\r
66 {$ifdef Win32}\r
68   {$ifdef VER180}\r
69     {$define COMPILER_10}\r
70     {$define DELPHI}\r
71     {$define DELPHI_10}\r
72   {$endif}\r
74   {$ifdef VER170}\r
75     {$define COMPILER_9}\r
76     {$define DELPHI}\r
77     {$define DELPHI_9}\r
78   {$endif}\r
80   {$ifdef VER150}        \r
81     {$define COMPILER_7}\r
82     {$define DELPHI}\r
83     {$define DELPHI_7}\r
84   {$endif}\r
86   {$ifdef VER140}\r
87     {$define COMPILER_6}\r
88     {$ifdef BCB}\r
89       {$define CPPB}\r
90       {$define CPPB_6}\r
91     {$else}\r
92       {$define DELPHI}\r
93       {$define DELPHI_6}\r
94     {$endif}\r
95   {$endif}\r
97   {$ifdef VER130}\r
98     {$define COMPILER_5}\r
99     {$ifdef BCB}\r
100       {$define CPPB}\r
101       {$define CPPB_5}\r
102     {$else}\r
103       {$define DELPHI}\r
104       {$define DELPHI_5}\r
105     {$endif}\r
106   {$endif}\r
108   {$ifdef VER125}\r
109     {$define COMPILER_4}\r
110     {$define CPPB}\r
111     {$define CPPB_4}\r
112   {$endif}\r
114   {$ifdef VER120}\r
115     {$define COMPILER_4}\r
116     {$define DELPHI}\r
117     {$define DELPHI_4}\r
118   {$endif}\r
120   {$ifdef VER110}\r
121     {$define COMPILER_3}\r
122     {$define CPPB}\r
123     {$define CPPB_3}\r
124   {$endif}\r
126   {$ifdef VER100}\r
127     {$define COMPILER_3}\r
128     {$define DELPHI}\r
129     {$define DELPHI_3}\r
130   {$endif}\r
132   {$ifdef VER93}\r
133     {$define COMPILER_2} // C++ Builder v1 compiler is really v2 \r
134     {$define CPPB}\r
135     {$define CPPB_1}\r
136   {$endif}\r
138   {$ifdef VER90}\r
139     {$define COMPILER_2}\r
140     {$define DELPHI}\r
141     {$define DELPHI_2}\r
142   {$endif}\r
144   {$ifdef VER80}\r
145     {$define COMPILER_1}\r
146     {$define DELPHI}\r
147     {$define DELPHI_1}\r
148   {$endif}\r
150   {$ifdef DELPHI_2}\r
151     {$define DELPHI_2_UP}\r
152   {$endif}\r
154   {$ifdef DELPHI_3}\r
155     {$define DELPHI_2_UP}\r
156     {$define DELPHI_3_UP}\r
157   {$endif}\r
159   {$ifdef DELPHI_4}\r
160     {$define DELPHI_2_UP}\r
161     {$define DELPHI_3_UP}\r
162     {$define DELPHI_4_UP}\r
163   {$endif}\r
165   {$ifdef DELPHI_5}\r
166     {$define DELPHI_2_UP}\r
167     {$define DELPHI_3_UP}\r
168     {$define DELPHI_4_UP}\r
169     {$define DELPHI_5_UP}\r
170   {$endif}\r
172   {$ifdef DELPHI_6}\r
173     {$define DELPHI_2_UP}\r
174     {$define DELPHI_3_UP}\r
175     {$define DELPHI_4_UP}\r
176     {$define DELPHI_5_UP}\r
177     {$define DELPHI_6_UP}\r
178   {$endif}\r
180   {$ifdef DELPHI_7}\r
181     {$define DELPHI_2_UP}\r
182     {$define DELPHI_3_UP}\r
183     {$define DELPHI_4_UP}\r
184     {$define DELPHI_5_UP}\r
185     {$define DELPHI_6_UP}\r
186     {$define DELPHI_7_UP}\r
187   {$endif}\r
189   {$ifdef DELPHI_9}\r
190     {$define DELPHI_2_UP}\r
191     {$define DELPHI_3_UP}\r
192     {$define DELPHI_4_UP}\r
193     {$define DELPHI_5_UP}\r
194     {$define DELPHI_6_UP}\r
195     {$define DELPHI_7_UP}\r
196     {$define DELPHI_9_UP}\r
197   {$endif}\r
199   {$ifdef DELPHI_10}\r
200     {$define DELPHI_2_UP}\r
201     {$define DELPHI_3_UP}\r
202     {$define DELPHI_4_UP}\r
203     {$define DELPHI_5_UP}\r
204     {$define DELPHI_6_UP}\r
205     {$define DELPHI_7_UP}\r
206     {$define DELPHI_9_UP}\r
207     {$define DELPHI_10_UP}\r
208   {$endif}\r
210   {$ifdef CPPB_3}\r
211     {$define CPPB_3_UP}\r
212   {$endif}\r
214   {$ifdef CPPB_4}\r
215     {$define CPPB_3_UP}\r
216     {$define CPPB_4_UP}\r
217   {$endif}\r
219   {$ifdef CPPB_5}\r
220     {$define CPPB_3_UP}\r
221     {$define CPPB_4_UP}\r
222     {$define CPPB_5_UP}\r
223   {$endif}\r
225   {$ifdef CPPB_6}\r
226     {$define CPPB_3_UP}\r
227     {$define CPPB_4_UP}\r
228     {$define CPPB_5_UP}\r
229     {$define CPPB_6_UP}\r
230   {$endif}\r
232   {$ifdef CPPB_3_UP}\r
233     // C++ Builder requires this if you use Delphi components in run-time packages.\r
234     {$ObjExportAll On}\r
235   {$endif}\r
237 {$else (not Windows)}\r
238   // Linux is the target\r
239   {$define QT_CLX}\r
241   {$define KYLIX}\r
242   {$define KYLIX_1}\r
243   {$define KYLIX_1_UP}\r
245   {$ifdef VER150}\r
246     {$define COMPILER_7}\r
247     {$define KYLIX_3}\r
248   {$endif}\r
250   {$ifdef VER140}\r
251     {$define COMPILER_6}\r
252     {$define KYLIX_2}\r
253   {$endif}\r
255   {$ifdef KYLIX_2}\r
256     {$define KYLIX_2_UP}\r
257   {$endif}\r
259   {$ifdef KYLIX_3}\r
260     {$define KYLIX_2_UP}\r
261     {$define KYLIX_3_UP}\r
262   {$endif}\r
264 {$endif}\r
266 // Compiler defines common to all platforms.\r
267 {$ifdef COMPILER_1}\r
268   {$define COMPILER_1_UP}\r
269 {$endif}\r
271 {$ifdef COMPILER_2}\r
272   {$define COMPILER_1_UP}\r
273   {$define COMPILER_2_UP}\r
274 {$endif}\r
276 {$ifdef COMPILER_3}\r
277   {$define COMPILER_1_UP}\r
278   {$define COMPILER_2_UP}\r
279   {$define COMPILER_3_UP}\r
280 {$endif}\r
282 {$ifdef COMPILER_4}\r
283   {$define COMPILER_1_UP}\r
284   {$define COMPILER_2_UP}\r
285   {$define COMPILER_3_UP}\r
286   {$define COMPILER_4_UP}\r
287 {$endif}\r
289 {$ifdef COMPILER_5}\r
290   {$define COMPILER_1_UP}\r
291   {$define COMPILER_2_UP}\r
292   {$define COMPILER_3_UP}\r
293   {$define COMPILER_4_UP}\r
294   {$define COMPILER_5_UP}\r
295 {$endif}\r
297 {$ifdef COMPILER_6}\r
298   {$define COMPILER_1_UP}\r
299   {$define COMPILER_2_UP}\r
300   {$define COMPILER_3_UP}\r
301   {$define COMPILER_4_UP}\r
302   {$define COMPILER_5_UP}\r
303   {$define COMPILER_6_UP}\r
304 {$endif}\r
306 {$ifdef COMPILER_7}\r
307   {$define COMPILER_1_UP}\r
308   {$define COMPILER_2_UP}\r
309   {$define COMPILER_3_UP}\r
310   {$define COMPILER_4_UP}\r
311   {$define COMPILER_5_UP}\r
312   {$define COMPILER_6_UP}\r
313   {$define COMPILER_7_UP}\r
314 {$endif}\r
316 {$ifdef COMPILER_9}\r
317   {$define COMPILER_1_UP}\r
318   {$define COMPILER_2_UP}\r
319   {$define COMPILER_3_UP}\r
320   {$define COMPILER_4_UP}\r
321   {$define COMPILER_5_UP}\r
322   {$define COMPILER_6_UP}\r
323   {$define COMPILER_7_UP}\r
324   {$define COMPILER_9_UP}\r
325 {$endif}\r
327 {$ifdef COMPILER_10}\r
328   {$define COMPILER_1_UP}\r
329   {$define COMPILER_2_UP}\r
330   {$define COMPILER_3_UP}\r
331   {$define COMPILER_4_UP}\r
332   {$define COMPILER_5_UP}\r
333   {$define COMPILER_6_UP}\r
334   {$define COMPILER_7_UP}\r
335   {$define COMPILER_9_UP}\r
336   {$define COMPILER_10_UP}\r
337 {$endif}\r
339 //----------------------------------------------------------------------------------------------------------------------\r
341 {$ALIGN ON}\r
342 {$BOOLEVAL OFF}\r
344 {$ifdef COMPILER_7_UP}\r
345   {$define THEME_7_UP} { Allows experimental theme support on pre-Delphi 7. }\r
346 {$endif}\r
348 {$IFDEF COMPILER_6_UP}\r
349 {$WARN SYMBOL_PLATFORM OFF} { We are going to use Win32 specific symbols! }\r
350 {$ENDIF}\r
352 {$IFDEF COMPILER_7_UP}\r
353 {$WARN UNSAFE_CODE OFF} { We are not going to be "safe"! }\r
354 {$WARN UNSAFE_TYPE OFF}\r
355 {$WARN UNSAFE_CAST OFF}\r
356 {$ENDIF}