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
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
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
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
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
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
62 // Only defined if Linux is the target:
\r
63 // QT_CLX : Trolltech's QT library is being used.
\r
64 //----------------------------------------------------------------------------------------------------------------------
\r
69 {$define COMPILER_10}
\r
75 {$define COMPILER_9}
\r
81 {$define COMPILER_7}
\r
87 {$define COMPILER_6}
\r
98 {$define COMPILER_5}
\r
109 {$define COMPILER_4}
\r
115 {$define COMPILER_4}
\r
121 {$define COMPILER_3}
\r
127 {$define COMPILER_3}
\r
133 {$define COMPILER_2} // C++ Builder v1 compiler is really v2
\r
139 {$define COMPILER_2}
\r
145 {$define COMPILER_1}
\r
151 {$define DELPHI_2_UP}
\r
155 {$define DELPHI_2_UP}
\r
156 {$define DELPHI_3_UP}
\r
160 {$define DELPHI_2_UP}
\r
161 {$define DELPHI_3_UP}
\r
162 {$define DELPHI_4_UP}
\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
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
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
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
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
211 {$define CPPB_3_UP}
\r
215 {$define CPPB_3_UP}
\r
216 {$define CPPB_4_UP}
\r
220 {$define CPPB_3_UP}
\r
221 {$define CPPB_4_UP}
\r
222 {$define CPPB_5_UP}
\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
233 // C++ Builder requires this if you use Delphi components in run-time packages.
\r
237 {$else (not Windows)}
\r
238 // Linux is the target
\r
243 {$define KYLIX_1_UP}
\r
246 {$define COMPILER_7}
\r
251 {$define COMPILER_6}
\r
256 {$define KYLIX_2_UP}
\r
260 {$define KYLIX_2_UP}
\r
261 {$define KYLIX_3_UP}
\r
266 // Compiler defines common to all platforms.
\r
267 {$ifdef COMPILER_1}
\r
268 {$define COMPILER_1_UP}
\r
271 {$ifdef COMPILER_2}
\r
272 {$define COMPILER_1_UP}
\r
273 {$define COMPILER_2_UP}
\r
276 {$ifdef COMPILER_3}
\r
277 {$define COMPILER_1_UP}
\r
278 {$define COMPILER_2_UP}
\r
279 {$define COMPILER_3_UP}
\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
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
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
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
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
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
339 //----------------------------------------------------------------------------------------------------------------------
\r
344 {$ifdef COMPILER_7_UP}
\r
345 {$define THEME_7_UP} { Allows experimental theme support on pre-Delphi 7. }
\r
348 {$IFDEF COMPILER_6_UP}
\r
349 {$WARN SYMBOL_PLATFORM OFF} { We are going to use Win32 specific symbols! }
\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