author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 12 Mar 2010 15:46:37 +0200 | |
branch | RCL_3 |
changeset 5 | d3bac044e0f0 |
parent 4 | 3b1da2848fc7 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the qmake application of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#ifndef MSVC_OBJECTMODEL_H |
|
43 |
#define MSVC_OBJECTMODEL_H |
|
44 |
||
45 |
#include "project.h" |
|
46 |
#include "xmloutput.h" |
|
47 |
#include <qatomic.h> |
|
48 |
#include <qlist.h> |
|
49 |
#include <qstring.h> |
|
50 |
#include <qstringlist.h> |
|
51 |
#include <qmap.h> |
|
52 |
#include <qdebug.h> |
|
53 |
||
54 |
QT_BEGIN_NAMESPACE |
|
55 |
||
56 |
enum DotNET { |
|
57 |
NETUnknown = 0, |
|
58 |
NET2002 = 0x70, |
|
59 |
NET2003 = 0x71, |
|
60 |
NET2005 = 0x80, |
|
61 |
NET2008 = 0x90 |
|
62 |
}; |
|
63 |
||
64 |
/* |
|
65 |
This Object model is of course VERY simplyfied, |
|
66 |
and does not actually follow the original MSVC |
|
67 |
object model. However, it fulfilles the basic |
|
68 |
needs for qmake |
|
69 |
*/ |
|
70 |
||
71 |
/* |
|
72 |
If a triState value is 'unset' then the |
|
73 |
corresponding property is not in the output, |
|
74 |
forcing the tool to utilize default values. |
|
75 |
False/True values will be in the output... |
|
76 |
*/ |
|
77 |
enum customBuildCheck { |
|
78 |
none, |
|
79 |
mocSrc, |
|
80 |
mocHdr, |
|
81 |
lexyacc |
|
82 |
}; |
|
83 |
enum triState { |
|
84 |
unset = -1, |
|
85 |
_False = 0, |
|
86 |
_True = 1 |
|
87 |
}; |
|
88 |
enum addressAwarenessType { |
|
89 |
addrAwareDefault, |
|
90 |
addrAwareNoLarge, |
|
91 |
addrAwareLarge |
|
92 |
}; |
|
93 |
enum asmListingOption { |
|
94 |
asmListingNone, |
|
95 |
asmListingAssemblyOnly, |
|
96 |
asmListingAsmMachineSrc, |
|
97 |
asmListingAsmMachine, |
|
98 |
asmListingAsmSrc |
|
99 |
}; |
|
100 |
enum basicRuntimeCheckOption { |
|
101 |
runtimeBasicCheckNone, |
|
102 |
runtimeCheckStackFrame, |
|
103 |
runtimeCheckUninitVariables, |
|
104 |
runtimeBasicCheckAll |
|
105 |
}; |
|
106 |
enum browseInfoOption { |
|
107 |
brInfoNone, |
|
108 |
brAllInfo, |
|
109 |
brNoLocalSymbols |
|
110 |
}; |
|
111 |
enum callingConventionOption { |
|
112 |
callConventionDefault = -1, |
|
113 |
callConventionCDecl, |
|
114 |
callConventionFastCall, |
|
115 |
callConventionStdCall |
|
116 |
}; |
|
117 |
enum charSet { |
|
118 |
charSetNotSet, |
|
119 |
charSetUnicode, |
|
120 |
charSetMBCS |
|
121 |
}; |
|
122 |
enum compileAsManagedOptions { |
|
123 |
managedDefault = -1, // Was: noAssembly |
|
124 |
managedAssembly = 1, |
|
125 |
managedAssemblyPure = 2, // Old was: Assembly |
|
126 |
managedAssemblySafe = 3, |
|
127 |
managedAssemblyOldSyntax = 4 |
|
128 |
}; |
|
129 |
enum CompileAsOptions{ |
|
130 |
compileAsDefault, |
|
131 |
compileAsC, |
|
132 |
compileAsCPlusPlus |
|
133 |
}; |
|
134 |
enum ConfigurationTypes { |
|
135 |
typeUnknown = 0, |
|
136 |
typeApplication = 1, |
|
137 |
typeDynamicLibrary = 2, |
|
138 |
typeStaticLibrary = 4, |
|
139 |
typeGeneric = 10 |
|
140 |
}; |
|
141 |
enum debugOption { |
|
142 |
debugUnknown = -1, |
|
143 |
debugDisabled, |
|
144 |
debugOldStyleInfo, |
|
145 |
debugLineInfoOnly, |
|
146 |
debugEnabled, |
|
147 |
debugEditAndContinue |
|
148 |
}; |
|
149 |
enum eAppProtectionOption { |
|
150 |
eAppProtectUnchanged, |
|
151 |
eAppProtectLow, |
|
152 |
eAppProtectMedium, |
|
153 |
eAppProtectHigh |
|
154 |
}; |
|
155 |
enum enhancedInstructionSetOption { |
|
156 |
archNotSet = 0, |
|
157 |
archSSE = 1, |
|
158 |
archSSE2 = 2 |
|
159 |
}; |
|
160 |
enum exceptionHandling { |
|
161 |
ehDefault = -1, |
|
162 |
ehNone = 0, |
|
163 |
ehNoSEH = 1, |
|
164 |
ehSEH = 2 |
|
165 |
}; |
|
166 |
enum enumResourceLangID { |
|
167 |
rcUseDefault = 0, |
|
168 |
rcAfrikaans = 1078, |
|
169 |
rcAlbanian = 1052, |
|
170 |
rcArabicAlgeria = 5121, |
|
171 |
rcArabicBahrain = 15361, |
|
172 |
rcArabicEgypt = 3073, |
|
173 |
rcArabicIraq = 2049, |
|
174 |
rcArabicJordan = 11265, |
|
175 |
rcArabicKuwait = 13313, |
|
176 |
rcArabicLebanon = 12289, |
|
177 |
rcArabicLibya = 4097, |
|
178 |
rcArabicMorocco = 6145, |
|
179 |
rcArabicOman = 8193, |
|
180 |
rcArabicQatar = 16385, |
|
181 |
rcArabicSaudi = 1025, |
|
182 |
rcArabicSyria = 10241, |
|
183 |
rcArabicTunisia = 7169, |
|
184 |
rcArabicUnitedArabEmirates = 14337, |
|
185 |
rcArabicYemen = 9217, |
|
186 |
rcBasque = 1069, |
|
187 |
rcBulgarian = 1026, |
|
188 |
rcByelorussian = 1059, |
|
189 |
rcCatalan = 1027, |
|
190 |
rcChineseHongKong = 3076, |
|
191 |
rcChinesePRC = 2052, |
|
192 |
rcChineseSingapore = 4100, |
|
193 |
rcChineseTaiwan = 1028, |
|
194 |
rcCroatian = 1050, |
|
195 |
rcCzech = 1029, |
|
196 |
rcDanish = 1030, |
|
197 |
rcDutchBelgium = 2067, |
|
198 |
rcDutchStandard = 1043, |
|
199 |
rcEnglishAustralia = 3081, |
|
200 |
rcEnglishBritain = 2057, |
|
201 |
rcEnglishCanada = 4105, |
|
202 |
RcEnglishCaribbean = 9225, |
|
203 |
rcEnglishIreland = 6153, |
|
204 |
rcEnglishJamaica = 8201, |
|
205 |
rcEnglishNewZealand = 5129, |
|
206 |
rcEnglishSouthAfrica = 7177, |
|
207 |
rcEnglishUS = 1033, |
|
208 |
rcEstonian = 1061, |
|
209 |
rcFarsi = 1065, |
|
210 |
rcFinnish = 1035, |
|
211 |
rcFrenchBelgium = 2060, |
|
212 |
rcFrenchCanada = 3084, |
|
213 |
rcFrenchLuxembourg = 5132, |
|
214 |
rcFrenchStandard = 1036, |
|
215 |
rcFrenchSwitzerland = 4108, |
|
216 |
rcGermanAustria = 3079, |
|
217 |
rcGermanLichtenstein = 5127, |
|
218 |
rcGermanLuxembourg = 4103, |
|
219 |
rcGermanStandard = 1031, |
|
220 |
rcGermanSwitzerland = 2055, |
|
221 |
rcGreek = 1032, |
|
222 |
rcHebrew = 1037, |
|
223 |
rcHungarian = 1038, |
|
224 |
rcIcelandic = 1039, |
|
225 |
rcIndonesian = 1057, |
|
226 |
rcItalianStandard = 1040, |
|
227 |
rcItalianSwitzerland = 2064, |
|
228 |
rcJapanese = 1041, |
|
229 |
rcKorean = 1042, |
|
230 |
rcKoreanJohab = 2066, |
|
231 |
rcLatvian = 1062, |
|
232 |
rcLithuanian = 1063, |
|
233 |
rcNorwegianBokmal = 1044, |
|
234 |
rcNorwegianNynorsk = 2068, |
|
235 |
rcPolish = 1045, |
|
236 |
rcPortugueseBrazilian = 1046, |
|
237 |
rcPortugueseStandard = 2070, |
|
238 |
rcRomanian = 1048, |
|
239 |
rcRussian = 1049, |
|
240 |
rcSerbian = 2074, |
|
241 |
rcSlovak = 1051, |
|
242 |
rcSpanishArgentina = 11274, |
|
243 |
rcSpanishBolivia = 16394, |
|
244 |
rcSpanishChile = 13322, |
|
245 |
rcSpanishColombia = 9226, |
|
246 |
rcSpanishCostaRica = 5130, |
|
247 |
rcSpanishDominicanRepublic = 7178, |
|
248 |
rcSpanishEcuador = 12298, |
|
249 |
rcSpanishGuatemala = 4106, |
|
250 |
rcSpanishMexico = 2058, |
|
251 |
rcSpanishModern = 3082, |
|
252 |
rcSpanishPanama = 6154, |
|
253 |
rcSpanishParaguay = 15370, |
|
254 |
rcSpanishPeru = 10250, |
|
255 |
rcSpanishTraditional = 1034, |
|
256 |
rcSpanishUruguay = 14346, |
|
257 |
rcSpanishVenezuela = 8202, |
|
258 |
rcSwedish = 1053, |
|
259 |
rcThai = 1054, |
|
260 |
rcTurkish = 1055, |
|
261 |
rcUkrainian = 1058, |
|
262 |
rcUrdu = 1056 |
|
263 |
}; |
|
264 |
enum enumSccEvent { |
|
265 |
eProjectInScc, |
|
266 |
ePreDirtyNotification |
|
267 |
}; |
|
268 |
enum favorSizeOrSpeedOption { |
|
269 |
favorNone, |
|
270 |
favorSpeed, |
|
271 |
favorSize |
|
272 |
}; |
|
273 |
enum floatingPointModel { |
|
274 |
floatingPointNotSet = -1, |
|
275 |
floatingPointPrecise, |
|
276 |
floatingPointStrict, |
|
277 |
floatingPointFast |
|
278 |
}; |
|
279 |
enum genProxyLanguage { |
|
280 |
genProxyNative, |
|
281 |
genProxyManaged |
|
282 |
}; |
|
283 |
enum inlineExpansionOption { |
|
284 |
expandDisable, |
|
285 |
expandOnlyInline, |
|
286 |
expandAnySuitable, |
|
287 |
expandDefault // Not useful number, but stops the output |
|
288 |
}; |
|
289 |
enum linkIncrementalType { |
|
290 |
linkIncrementalDefault, |
|
291 |
linkIncrementalNo, |
|
292 |
linkIncrementalYes |
|
293 |
}; |
|
294 |
enum linkProgressOption { |
|
295 |
linkProgressNotSet, |
|
296 |
linkProgressAll, |
|
297 |
linkProgressLibs |
|
298 |
}; |
|
299 |
enum machineTypeOption { |
|
300 |
machineNotSet, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
301 |
machineX86, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
302 |
machineX64 = 17 |
0 | 303 |
}; |
304 |
enum midlCharOption { |
|
305 |
midlCharUnsigned, |
|
306 |
midlCharSigned, |
|
307 |
midlCharAscii7 |
|
308 |
}; |
|
309 |
enum midlErrorCheckOption { |
|
310 |
midlEnableCustom, |
|
311 |
midlDisableAll, |
|
312 |
midlEnableAll |
|
313 |
}; |
|
314 |
enum midlStructMemberAlignOption { |
|
315 |
midlAlignNotSet, |
|
316 |
midlAlignSingleByte, |
|
317 |
midlAlignTwoBytes, |
|
318 |
midlAlignFourBytes, |
|
319 |
midlAlignEightBytes, |
|
320 |
midlAlignSixteenBytes |
|
321 |
}; |
|
322 |
enum midlTargetEnvironment { |
|
323 |
midlTargetNotSet, |
|
324 |
midlTargetWin32, |
|
325 |
midlTargetWin64 |
|
326 |
}; |
|
327 |
enum midlWarningLevelOption { |
|
328 |
midlWarningLevel_0, |
|
329 |
midlWarningLevel_1, |
|
330 |
midlWarningLevel_2, |
|
331 |
midlWarningLevel_3, |
|
332 |
midlWarningLevel_4 |
|
333 |
}; |
|
334 |
enum optFoldingType { |
|
335 |
optFoldingDefault, |
|
336 |
optNoFolding, |
|
337 |
optFolding |
|
338 |
}; |
|
339 |
enum optimizeOption { |
|
340 |
optimizeDisabled, |
|
341 |
optimizeMinSpace, |
|
342 |
optimizeMaxSpeed, |
|
343 |
optimizeFull, |
|
344 |
optimizeCustom, |
|
345 |
optimizeDefault // Not useful number, but stops the output |
|
346 |
}; |
|
347 |
enum optRefType { |
|
348 |
optReferencesDefault, |
|
349 |
optNoReferences, |
|
350 |
optReferences |
|
351 |
}; |
|
352 |
enum optWin98Type { |
|
353 |
optWin98Default, |
|
354 |
optWin98No, |
|
355 |
optWin98Yes |
|
356 |
}; |
|
357 |
enum optLinkTimeCodeGenType { |
|
358 |
optLTCGDefault, |
|
359 |
optLTCGEnabled, |
|
360 |
optLTCGInstrument, |
|
361 |
optLTCGOptimize, |
|
362 |
optLTCGUpdate |
|
363 |
}; |
|
364 |
enum pchOption { |
|
365 |
pchNone, |
|
366 |
pchCreateUsingSpecific, |
|
367 |
pchGenerateAuto, |
|
368 |
pchUseUsingSpecific |
|
369 |
}; |
|
370 |
enum preprocessOption { |
|
371 |
preprocessUnknown = -1, |
|
372 |
preprocessNo, |
|
373 |
preprocessYes, |
|
374 |
preprocessNoLineNumbers |
|
375 |
}; |
|
376 |
enum ProcessorOptimizeOption { |
|
377 |
procOptimizeBlended, //GB |
|
378 |
procOptimizePentium, //G5 |
|
379 |
procOptimizePentiumProAndAbove, //G6 |
|
380 |
procOptimizePentium4AndAbove //G7 |
|
381 |
}; |
|
382 |
enum RegisterDeployOption { |
|
383 |
registerNo = 0, |
|
384 |
registerYes |
|
385 |
}; |
|
386 |
enum RemoteDebuggerType { |
|
387 |
DbgLocal, |
|
388 |
DbgRemote, |
|
389 |
DbgRemoteTCPIP |
|
390 |
}; |
|
391 |
enum runtimeLibraryOption { |
|
392 |
rtUnknown = -1, |
|
393 |
rtMultiThreaded, |
|
394 |
rtMultiThreadedDebug, |
|
395 |
rtMultiThreadedDLL, |
|
396 |
rtMultiThreadedDebugDLL, |
|
397 |
rtSingleThreaded, |
|
398 |
rtSingleThreadedDebug |
|
399 |
}; |
|
400 |
enum structMemberAlignOption { |
|
401 |
alignNotSet, |
|
402 |
alignSingleByte, |
|
403 |
alignTwoBytes, |
|
404 |
alignFourBytes, |
|
405 |
alignEightBytes, |
|
406 |
alignSixteenBytes |
|
407 |
}; |
|
408 |
enum subSystemOption { |
|
409 |
subSystemNotSet, |
|
410 |
subSystemConsole, |
|
411 |
subSystemWindows |
|
412 |
}; |
|
413 |
enum termSvrAwarenessType { |
|
414 |
termSvrAwareDefault, |
|
415 |
termSvrAwareNo, |
|
416 |
termSvrAwareYes |
|
417 |
}; |
|
418 |
enum toolSetType { |
|
419 |
toolSetUtility, |
|
420 |
toolSetMakefile, |
|
421 |
toolSetLinker, |
|
422 |
toolSetLibrarian, |
|
423 |
toolSetAll |
|
424 |
}; |
|
425 |
enum TypeOfDebugger { |
|
426 |
DbgNativeOnly, |
|
427 |
DbgManagedOnly, |
|
428 |
DbgMixed, |
|
429 |
DbgAuto |
|
430 |
}; |
|
431 |
enum useOfATL { |
|
432 |
useATLNotSet, |
|
433 |
useATLStatic, |
|
434 |
useATLDynamic |
|
435 |
}; |
|
436 |
enum useOfMfc { |
|
437 |
useMfcStdWin, |
|
438 |
useMfcStatic, |
|
439 |
useMfcDynamic |
|
440 |
}; |
|
441 |
enum useOfArchitecture { |
|
442 |
archUnknown = -1, |
|
443 |
archArmv4, |
|
444 |
archArmv5, |
|
445 |
archArmv4T, |
|
446 |
archArmv5T, |
|
447 |
archMips1 = 0, |
|
448 |
archMips2 = 1, |
|
449 |
archMips3 = 2, |
|
450 |
archMips4 = 3, |
|
451 |
archMips5 = 4, |
|
452 |
archMips16 = 5, |
|
453 |
archMips32 = 6, |
|
454 |
archMips64 = 7 |
|
455 |
}; |
|
456 |
enum warningLevelOption { |
|
457 |
warningLevelUnknown = -1, |
|
458 |
warningLevel_0, |
|
459 |
warningLevel_1, |
|
460 |
warningLevel_2, |
|
461 |
warningLevel_3, |
|
462 |
warningLevel_4 |
|
463 |
}; |
|
464 |
||
465 |
||
466 |
class VCToolBase { |
|
467 |
protected: |
|
468 |
// Functions |
|
469 |
VCToolBase(){}; |
|
470 |
virtual ~VCToolBase(){} |
|
471 |
virtual bool parseOption(const char* option) = 0; |
|
472 |
public: |
|
473 |
void parseOptions(QStringList& options) { |
|
474 |
for (QStringList::ConstIterator it=options.begin(); (it!=options.end()); it++) |
|
475 |
parseOption((*it).toLatin1()); |
|
476 |
} |
|
477 |
}; |
|
478 |
||
479 |
class VCConfiguration; |
|
480 |
class VCProject; |
|
481 |
||
482 |
class VCCLCompilerTool : public VCToolBase |
|
483 |
{ |
|
484 |
public: |
|
485 |
// Functions |
|
486 |
VCCLCompilerTool(); |
|
487 |
virtual ~VCCLCompilerTool(){} |
|
488 |
bool parseOption(const char* option); |
|
489 |
||
490 |
// Variables |
|
491 |
QStringList AdditionalIncludeDirectories; |
|
492 |
QStringList AdditionalOptions; |
|
493 |
QStringList AdditionalUsingDirectories; |
|
494 |
QString AssemblerListingLocation; |
|
495 |
asmListingOption AssemblerOutput; |
|
496 |
basicRuntimeCheckOption BasicRuntimeChecks; |
|
497 |
browseInfoOption BrowseInformation; |
|
498 |
QString BrowseInformationFile; |
|
499 |
triState BufferSecurityCheck; |
|
500 |
callingConventionOption CallingConvention; |
|
501 |
CompileAsOptions CompileAs; |
|
502 |
compileAsManagedOptions CompileAsManaged; |
|
503 |
triState CompileOnly; |
|
504 |
debugOption DebugInformationFormat; |
|
505 |
triState DefaultCharIsUnsigned; |
|
506 |
triState Detect64BitPortabilityProblems; |
|
507 |
triState DisableLanguageExtensions; |
|
508 |
QStringList DisableSpecificWarnings; |
|
509 |
enhancedInstructionSetOption EnableEnhancedInstructionSet; |
|
510 |
triState EnableFiberSafeOptimizations; |
|
511 |
triState EnableFunctionLevelLinking; |
|
512 |
triState EnableIntrinsicFunctions; |
|
513 |
exceptionHandling ExceptionHandling; |
|
514 |
triState ExpandAttributedSource; |
|
515 |
favorSizeOrSpeedOption FavorSizeOrSpeed; |
|
516 |
floatingPointModel FloatingPointModel; |
|
517 |
triState FloatingPointExceptions; |
|
518 |
triState ForceConformanceInForLoopScope; |
|
519 |
QStringList ForcedIncludeFiles; |
|
520 |
QStringList ForcedUsingFiles; |
|
521 |
preprocessOption GeneratePreprocessedFile; |
|
522 |
triState GlobalOptimizations; |
|
523 |
triState IgnoreStandardIncludePath; |
|
524 |
triState ImproveFloatingPointConsistency; |
|
525 |
inlineExpansionOption InlineFunctionExpansion; |
|
526 |
triState KeepComments; |
|
527 |
triState MinimalRebuild; |
|
528 |
QString ObjectFile; |
|
529 |
triState OmitFramePointers; |
|
530 |
triState OpenMP; |
|
531 |
optimizeOption Optimization; |
|
532 |
ProcessorOptimizeOption OptimizeForProcessor; |
|
533 |
triState OptimizeForWindowsApplication; |
|
534 |
QString OutputFile; |
|
535 |
QString PrecompiledHeaderFile; |
|
536 |
QString PrecompiledHeaderThrough; |
|
537 |
QStringList PreprocessorDefinitions; |
|
538 |
QString ProgramDataBaseFileName; |
|
539 |
runtimeLibraryOption RuntimeLibrary; |
|
540 |
triState RuntimeTypeInfo; |
|
541 |
triState ShowIncludes; |
|
542 |
triState SmallerTypeCheck; |
|
543 |
triState StringPooling; |
|
544 |
structMemberAlignOption StructMemberAlignment; |
|
545 |
triState SuppressStartupBanner; |
|
546 |
triState TreatWChar_tAsBuiltInType; |
|
547 |
triState TurnOffAssemblyGeneration; |
|
548 |
triState UndefineAllPreprocessorDefinitions; |
|
549 |
QStringList UndefinePreprocessorDefinitions; |
|
550 |
pchOption UsePrecompiledHeader; |
|
551 |
triState WarnAsError; |
|
552 |
warningLevelOption WarningLevel; |
|
553 |
triState WholeProgramOptimization; |
|
554 |
useOfArchitecture CompileForArchitecture; |
|
555 |
triState InterworkCalls; |
|
556 |
VCConfiguration* config; |
|
557 |
}; |
|
558 |
||
559 |
class VCLinkerTool : public VCToolBase |
|
560 |
{ |
|
561 |
public: |
|
562 |
// Functions |
|
563 |
VCLinkerTool(); |
|
564 |
virtual ~VCLinkerTool(){} |
|
565 |
bool parseOption(const char* option); |
|
566 |
||
567 |
// Variables |
|
568 |
QStringList AdditionalDependencies; |
|
569 |
QStringList AdditionalLibraryDirectories; |
|
570 |
QStringList AdditionalOptions; |
|
571 |
QStringList AddModuleNamesToAssembly; |
|
572 |
QString BaseAddress; |
|
573 |
QStringList DelayLoadDLLs; |
|
574 |
optFoldingType EnableCOMDATFolding; |
|
575 |
QString EntryPointSymbol; |
|
576 |
QStringList ForceSymbolReferences; |
|
577 |
QString FunctionOrder; |
|
578 |
triState GenerateDebugInformation; |
|
579 |
triState GenerateMapFile; |
|
580 |
qlonglong HeapCommitSize; |
|
581 |
qlonglong HeapReserveSize; |
|
582 |
triState IgnoreAllDefaultLibraries; |
|
583 |
QStringList IgnoreDefaultLibraryNames; |
|
584 |
triState IgnoreEmbeddedIDL; |
|
585 |
triState IgnoreImportLibrary; |
|
586 |
QString ImportLibrary; |
|
587 |
addressAwarenessType LargeAddressAware; |
|
588 |
triState LinkDLL; |
|
589 |
linkIncrementalType LinkIncremental; |
|
590 |
optLinkTimeCodeGenType LinkTimeCodeGeneration; |
|
591 |
QString LinkToManagedResourceFile; |
|
592 |
triState MapExports; |
|
593 |
QString MapFileName; |
|
594 |
triState MapLines; |
|
595 |
QString MergedIDLBaseFileName; |
|
596 |
QString MergeSections; // Should be list? |
|
597 |
QString MidlCommandFile; |
|
598 |
QString ModuleDefinitionFile; // Should be list? |
|
599 |
optWin98Type OptimizeForWindows98; |
|
600 |
optRefType OptimizeReferences; |
|
601 |
QString OutputFile; |
|
602 |
QString ProgramDatabaseFile; |
|
603 |
triState RegisterOutput; |
|
604 |
triState ResourceOnlyDLL; |
|
605 |
triState SetChecksum; |
|
606 |
linkProgressOption ShowProgress; |
|
607 |
qlonglong StackCommitSize; |
|
608 |
qlonglong StackReserveSize; |
|
609 |
QString StripPrivateSymbols; // Should be list? |
|
610 |
subSystemOption SubSystem; |
|
611 |
triState SupportUnloadOfDelayLoadedDLL; |
|
612 |
triState SuppressStartupBanner; |
|
613 |
triState SwapRunFromCD; |
|
614 |
triState SwapRunFromNet; |
|
615 |
machineTypeOption TargetMachine; |
|
616 |
termSvrAwarenessType TerminalServerAware; |
|
617 |
triState TurnOffAssemblyGeneration; |
|
618 |
QString TypeLibraryFile; |
|
619 |
qlonglong TypeLibraryResourceID; |
|
620 |
QString Version; |
|
621 |
VCConfiguration* config; |
|
622 |
}; |
|
623 |
||
624 |
class VCMIDLTool : public VCToolBase |
|
625 |
{ |
|
626 |
public: |
|
627 |
// Functions |
|
628 |
VCMIDLTool(); |
|
629 |
virtual ~VCMIDLTool(){} |
|
630 |
bool parseOption(const char* option); |
|
631 |
||
632 |
// Variables |
|
633 |
QStringList AdditionalIncludeDirectories; |
|
634 |
QStringList AdditionalOptions; |
|
635 |
QStringList CPreprocessOptions; |
|
636 |
midlCharOption DefaultCharType; |
|
637 |
QString DLLDataFileName; // Should be list? |
|
638 |
midlErrorCheckOption EnableErrorChecks; |
|
639 |
triState ErrorCheckAllocations; |
|
640 |
triState ErrorCheckBounds; |
|
641 |
triState ErrorCheckEnumRange; |
|
642 |
triState ErrorCheckRefPointers; |
|
643 |
triState ErrorCheckStubData; |
|
644 |
QStringList FullIncludePath; |
|
645 |
triState GenerateStublessProxies; |
|
646 |
triState GenerateTypeLibrary; |
|
647 |
QString HeaderFileName; |
|
648 |
triState IgnoreStandardIncludePath; |
|
649 |
QString InterfaceIdentifierFileName; |
|
650 |
triState MkTypLibCompatible; |
|
651 |
QString OutputDirectory; |
|
652 |
QStringList PreprocessorDefinitions; |
|
653 |
QString ProxyFileName; |
|
654 |
QString RedirectOutputAndErrors; |
|
655 |
midlStructMemberAlignOption StructMemberAlignment; |
|
656 |
triState SuppressStartupBanner; |
|
657 |
midlTargetEnvironment TargetEnvironment; |
|
658 |
QString TypeLibraryName; |
|
659 |
QStringList UndefinePreprocessorDefinitions; |
|
660 |
triState ValidateParameters; |
|
661 |
triState WarnAsError; |
|
662 |
midlWarningLevelOption WarningLevel; |
|
663 |
VCConfiguration* config; |
|
664 |
}; |
|
665 |
||
666 |
class VCLibrarianTool : public VCToolBase |
|
667 |
{ |
|
668 |
public: |
|
669 |
// Functions |
|
670 |
VCLibrarianTool(); |
|
671 |
virtual ~VCLibrarianTool(){} |
|
672 |
bool parseOption(const char*){ return false; }; |
|
673 |
||
674 |
// Variables |
|
675 |
QStringList AdditionalDependencies; |
|
676 |
QStringList AdditionalLibraryDirectories; |
|
677 |
QStringList AdditionalOptions; |
|
678 |
QStringList ExportNamedFunctions; |
|
679 |
QStringList ForceSymbolReferences; |
|
680 |
triState IgnoreAllDefaultLibraries; |
|
681 |
QStringList IgnoreDefaultLibraryNames; |
|
682 |
QString ModuleDefinitionFile; |
|
683 |
QString OutputFile; |
|
684 |
triState SuppressStartupBanner; |
|
685 |
}; |
|
686 |
||
687 |
class VCCustomBuildTool : public VCToolBase |
|
688 |
{ |
|
689 |
public: |
|
690 |
// Functions |
|
691 |
VCCustomBuildTool(); |
|
692 |
virtual ~VCCustomBuildTool(){} |
|
693 |
bool parseOption(const char*){ return false; }; |
|
694 |
||
695 |
// Variables |
|
696 |
QStringList AdditionalDependencies; |
|
697 |
QStringList CommandLine; |
|
698 |
QString Description; |
|
699 |
QStringList Outputs; |
|
700 |
QString ToolName; |
|
701 |
QString ToolPath; |
|
702 |
}; |
|
703 |
||
704 |
class VCResourceCompilerTool : public VCToolBase |
|
705 |
{ |
|
706 |
public: |
|
707 |
// Functions |
|
708 |
VCResourceCompilerTool(); |
|
709 |
virtual ~VCResourceCompilerTool(){} |
|
710 |
bool parseOption(const char*){ return false; }; |
|
711 |
||
712 |
// Variables |
|
713 |
QStringList AdditionalIncludeDirectories; |
|
714 |
QStringList AdditionalOptions; |
|
715 |
enumResourceLangID Culture; |
|
716 |
QStringList FullIncludePath; |
|
717 |
triState IgnoreStandardIncludePath; |
|
718 |
QStringList PreprocessorDefinitions; |
|
719 |
QString ResourceOutputFileName; |
|
720 |
linkProgressOption ShowProgress; |
|
721 |
QString ToolPath; |
|
722 |
}; |
|
723 |
||
724 |
class VCDeploymentTool |
|
725 |
{ |
|
726 |
public: |
|
727 |
// Functions |
|
728 |
VCDeploymentTool(); |
|
729 |
virtual ~VCDeploymentTool() {} |
|
730 |
||
731 |
// Variables |
|
732 |
QString DeploymentTag; |
|
733 |
QString RemoteDirectory; |
|
734 |
RegisterDeployOption RegisterOutput; |
|
735 |
QString AdditionalFiles; |
|
736 |
}; |
|
737 |
||
738 |
class VCEventTool : public VCToolBase |
|
739 |
{ |
|
740 |
protected: |
|
741 |
// Functions |
|
742 |
VCEventTool() : ExcludedFromBuild(unset){}; |
|
743 |
virtual ~VCEventTool(){} |
|
744 |
bool parseOption(const char*){ return false; }; |
|
745 |
||
746 |
public: |
|
747 |
// Variables |
|
748 |
QString CommandLine; |
|
749 |
QString Description; |
|
750 |
triState ExcludedFromBuild; |
|
751 |
QString ToolName; |
|
752 |
QString ToolPath; |
|
753 |
}; |
|
754 |
||
755 |
class VCPostBuildEventTool : public VCEventTool |
|
756 |
{ |
|
757 |
public: |
|
758 |
VCPostBuildEventTool(); |
|
759 |
~VCPostBuildEventTool(){} |
|
760 |
}; |
|
761 |
||
762 |
class VCPreBuildEventTool : public VCEventTool |
|
763 |
{ |
|
764 |
public: |
|
765 |
VCPreBuildEventTool(); |
|
766 |
~VCPreBuildEventTool(){} |
|
767 |
}; |
|
768 |
||
769 |
class VCPreLinkEventTool : public VCEventTool |
|
770 |
{ |
|
771 |
public: |
|
772 |
VCPreLinkEventTool(); |
|
773 |
~VCPreLinkEventTool(){} |
|
774 |
}; |
|
775 |
||
776 |
class VCConfiguration |
|
777 |
{ |
|
778 |
public: |
|
779 |
// Functions |
|
780 |
VCConfiguration(); |
|
781 |
~VCConfiguration(){} |
|
782 |
||
783 |
DotNET CompilerVersion; |
|
784 |
||
785 |
// Variables |
|
786 |
triState ATLMinimizesCRunTimeLibraryUsage; |
|
787 |
triState BuildBrowserInformation; |
|
788 |
charSet CharacterSet; |
|
789 |
ConfigurationTypes ConfigurationType; |
|
790 |
QString DeleteExtensionsOnClean; |
|
791 |
QString ImportLibrary; |
|
792 |
QString IntermediateDirectory; |
|
793 |
QString Name; |
|
794 |
QString OutputDirectory; |
|
795 |
QString PrimaryOutput; |
|
796 |
QString ProgramDatabase; |
|
797 |
triState RegisterOutput; |
|
798 |
useOfATL UseOfATL; |
|
799 |
useOfMfc UseOfMfc; |
|
800 |
triState WholeProgramOptimization; |
|
801 |
||
802 |
// XML sub-parts |
|
803 |
VCCLCompilerTool compiler; |
|
804 |
VCLinkerTool linker; |
|
805 |
VCLibrarianTool librarian; |
|
806 |
VCCustomBuildTool custom; |
|
807 |
VCMIDLTool idl; |
|
808 |
VCPostBuildEventTool postBuild; |
|
809 |
VCPreBuildEventTool preBuild; |
|
810 |
VCDeploymentTool deployment; |
|
811 |
VCPreLinkEventTool preLink; |
|
812 |
VCResourceCompilerTool resource; |
|
813 |
}; |
|
814 |
||
815 |
struct VCFilterFile |
|
816 |
{ |
|
817 |
VCFilterFile() |
|
818 |
{ excludeFromBuild = false; } |
|
819 |
VCFilterFile(const QString &filename, bool exclude = false ) |
|
820 |
{ file = filename; excludeFromBuild = exclude; } |
|
821 |
VCFilterFile(const QString &filename, const QString &additional, bool exclude = false ) |
|
822 |
{ file = filename; excludeFromBuild = exclude; additionalFile = additional; } |
|
823 |
bool operator==(const VCFilterFile &other){ |
|
824 |
return file == other.file |
|
825 |
&& additionalFile == other.additionalFile |
|
826 |
&& excludeFromBuild == other.excludeFromBuild; |
|
827 |
} |
|
828 |
||
829 |
bool excludeFromBuild; |
|
830 |
QString file; |
|
831 |
QString additionalFile; // For tools like MOC |
|
832 |
}; |
|
833 |
||
834 |
#ifndef QT_NO_DEBUG_OUTPUT |
|
835 |
inline QDebug operator<<(QDebug dbg, const VCFilterFile &p) |
|
836 |
{ |
|
837 |
dbg.nospace() << "VCFilterFile(file(" << p.file |
|
838 |
<< ") additionalFile(" << p.additionalFile |
|
839 |
<< ") excludeFromBuild(" << p.excludeFromBuild << "))" << endl; |
|
840 |
return dbg.space(); |
|
841 |
} |
|
842 |
#endif |
|
843 |
||
844 |
class VcprojGenerator; |
|
845 |
class VCFilter |
|
846 |
{ |
|
847 |
public: |
|
848 |
// Functions |
|
849 |
VCFilter(); |
|
850 |
~VCFilter(){}; |
|
851 |
||
852 |
void addFile(const QString& filename); |
|
853 |
void addFile(const VCFilterFile& fileInfo); |
|
854 |
void addFiles(const QStringList& fileList); |
|
855 |
bool addExtraCompiler(const VCFilterFile &info); |
|
856 |
void modifyPCHstage(QString str); |
|
857 |
void outputFileConfig(XmlOutput &xml, const QString &filename); |
|
858 |
||
859 |
// Variables |
|
860 |
QString Name; |
|
861 |
QString Filter; |
|
862 |
QString Guid; |
|
863 |
triState ParseFiles; |
|
864 |
VcprojGenerator* Project; |
|
865 |
VCConfiguration* Config; |
|
866 |
QList<VCFilterFile> Files; |
|
867 |
||
868 |
customBuildCheck CustomBuild; |
|
869 |
||
870 |
bool useCustomBuildTool; |
|
871 |
VCCustomBuildTool CustomBuildTool; |
|
872 |
||
873 |
bool useCompilerTool; |
|
874 |
VCCLCompilerTool CompilerTool; |
|
875 |
||
876 |
private: |
|
877 |
friend XmlOutput &operator<<(XmlOutput &xml, VCFilter &tool); |
|
878 |
}; |
|
879 |
||
880 |
typedef QList<VCFilter> VCFilterList; |
|
881 |
class VCProjectSingleConfig |
|
882 |
{ |
|
883 |
public: |
|
884 |
enum FilterTypes { |
|
885 |
None, |
|
886 |
Source, |
|
887 |
Header, |
|
888 |
Generated, |
|
889 |
LexYacc, |
|
890 |
Translation, |
|
891 |
Resources, |
|
892 |
Extras |
|
893 |
}; |
|
894 |
// Functions |
|
895 |
VCProjectSingleConfig(){}; |
|
896 |
~VCProjectSingleConfig(){} |
|
897 |
||
898 |
// Variables |
|
899 |
QString Name; |
|
900 |
QString Version; |
|
901 |
QString ProjectGUID; |
|
902 |
QString Keyword; |
|
903 |
QString SccProjectName; |
|
904 |
QString SccLocalPath; |
|
905 |
QString PlatformName; |
|
906 |
||
907 |
// XML sub-parts |
|
908 |
VCConfiguration Configuration; |
|
909 |
VCFilter RootFiles; |
|
910 |
VCFilter SourceFiles; |
|
911 |
VCFilter HeaderFiles; |
|
912 |
VCFilter GeneratedFiles; |
|
913 |
VCFilter LexYaccFiles; |
|
914 |
VCFilter TranslationFiles; |
|
915 |
VCFilter FormFiles; |
|
916 |
VCFilter ResourceFiles; |
|
917 |
VCFilterList ExtraCompilersFiles; |
|
918 |
||
919 |
bool flat_files; |
|
920 |
||
921 |
// Accessor for extracompilers |
|
922 |
VCFilter &filterForExtraCompiler(const QString &compilerName); |
|
923 |
}; |
|
924 |
||
925 |
||
926 |
||
927 |
// Tree & Flat view of files -------------------------------------------------- |
|
928 |
class VCFilter; |
|
929 |
class Node |
|
930 |
{ |
|
931 |
public: |
|
932 |
virtual ~Node() { } |
|
933 |
void addElement(const VCFilterFile &file) { |
|
934 |
addElement(file.file, file); |
|
935 |
} |
|
936 |
virtual void addElement(const QString &filepath, const VCFilterFile &allInfo) = 0; |
|
937 |
virtual void removeElements()= 0; |
|
938 |
virtual void generateXML(XmlOutput &xml, const QString &tagName, VCProject &tool, const QString &filter) = 0; |
|
939 |
virtual bool hasElements() = 0; |
|
940 |
}; |
|
941 |
||
942 |
class TreeNode : public Node |
|
943 |
{ |
|
944 |
typedef QMap<QString, TreeNode*> ChildrenMap; |
|
945 |
VCFilterFile info; |
|
946 |
ChildrenMap children; |
|
947 |
||
948 |
public: |
|
949 |
virtual ~TreeNode() { removeElements(); } |
|
950 |
||
951 |
int pathIndex(const QString &filepath) { |
|
952 |
int Windex = filepath.indexOf("\\"); |
|
953 |
int Uindex = filepath.indexOf("/"); |
|
954 |
if (Windex != -1 && Uindex != -1) |
|
955 |
return qMin(Windex, Uindex); |
|
956 |
else if (Windex != -1) |
|
957 |
return Windex; |
|
958 |
return Uindex; |
|
959 |
} |
|
960 |
||
961 |
void addElement(const QString &filepath, const VCFilterFile &allInfo){ |
|
962 |
QString newNodeName(filepath); |
|
963 |
||
964 |
int index = pathIndex(filepath); |
|
965 |
if (index != -1) |
|
966 |
newNodeName = filepath.left(index); |
|
967 |
||
968 |
TreeNode *n = children.value(newNodeName); |
|
969 |
if (!n) { |
|
970 |
n = new TreeNode; |
|
971 |
n->info = allInfo; |
|
972 |
children.insert(newNodeName, n); |
|
973 |
} |
|
974 |
if (index != -1) |
|
975 |
n->addElement(filepath.mid(index+1), allInfo); |
|
976 |
} |
|
977 |
||
978 |
void removeElements() { |
|
979 |
ChildrenMap::ConstIterator it = children.constBegin(); |
|
980 |
ChildrenMap::ConstIterator end = children.constEnd(); |
|
981 |
for( ; it != end; it++) { |
|
982 |
(*it)->removeElements(); |
|
983 |
delete it.value(); |
|
984 |
} |
|
985 |
children.clear(); |
|
986 |
} |
|
987 |
||
988 |
void generateXML(XmlOutput &xml, const QString &tagName, VCProject &tool, const QString &filter); |
|
989 |
bool hasElements() { |
|
990 |
return children.size() != 0; |
|
991 |
} |
|
992 |
}; |
|
993 |
||
994 |
class FlatNode : public Node |
|
995 |
{ |
|
996 |
typedef QMap<QString, VCFilterFile> ChildrenMapFlat; |
|
997 |
ChildrenMapFlat children; |
|
998 |
||
999 |
public: |
|
1000 |
virtual ~FlatNode() { removeElements(); } |
|
1001 |
||
1002 |
int pathIndex(const QString &filepath) { |
|
1003 |
int Windex = filepath.lastIndexOf("\\"); |
|
1004 |
int Uindex = filepath.lastIndexOf("/"); |
|
1005 |
if (Windex != -1 && Uindex != -1) |
|
1006 |
return qMax(Windex, Uindex); |
|
1007 |
else if (Windex != -1) |
|
1008 |
return Windex; |
|
1009 |
return Uindex; |
|
1010 |
} |
|
1011 |
||
1012 |
void addElement(const QString &filepath, const VCFilterFile &allInfo){ |
|
1013 |
QString newKey(filepath); |
|
1014 |
||
1015 |
int index = pathIndex(filepath); |
|
1016 |
if (index != -1) |
|
1017 |
newKey = filepath.mid(index+1); |
|
1018 |
||
1019 |
// Key designed to sort files with same |
|
1020 |
// name in different paths correctly |
|
1021 |
children.insert(newKey + "\0" + allInfo.file, allInfo); |
|
1022 |
} |
|
1023 |
||
1024 |
void removeElements() { |
|
1025 |
children.clear(); |
|
1026 |
} |
|
1027 |
||
1028 |
void generateXML(XmlOutput &xml, const QString &tagName, VCProject &proj, const QString &filter); |
|
1029 |
bool hasElements() { |
|
1030 |
return children.size() != 0; |
|
1031 |
} |
|
1032 |
}; |
|
1033 |
// ---------------------------------------------------------------------------- |
|
1034 |
||
1035 |
class VCProject |
|
1036 |
{ |
|
1037 |
public: |
|
1038 |
// Variables |
|
1039 |
QString Name; |
|
1040 |
QString Version; |
|
1041 |
QString ProjectGUID; |
|
1042 |
QString Keyword; |
|
1043 |
QString SccProjectName; |
|
1044 |
QString SccLocalPath; |
|
1045 |
QString PlatformName; |
|
1046 |
||
1047 |
// Single projects |
|
1048 |
QList<VCProjectSingleConfig> SingleProjects; |
|
1049 |
||
1050 |
// List of all extracompilers |
|
1051 |
QStringList ExtraCompilers; |
|
1052 |
||
1053 |
// Functions |
|
1054 |
void outputFilter(XmlOutput &xml, |
|
1055 |
// VCProjectSingleConfig::FilterTypes type, |
|
1056 |
const QString &filtername); |
|
1057 |
||
1058 |
void outputFileConfigs(XmlOutput &xml, |
|
1059 |
// VCProjectSingleConfig::FilterTypes type, |
|
1060 |
const VCFilterFile &info, |
|
1061 |
const QString &filtername); |
|
1062 |
}; |
|
1063 |
||
1064 |
XmlOutput &operator<<(XmlOutput &, const VCCLCompilerTool &); |
|
1065 |
XmlOutput &operator<<(XmlOutput &, const VCLinkerTool &); |
|
1066 |
XmlOutput &operator<<(XmlOutput &, const VCMIDLTool &); |
|
1067 |
XmlOutput &operator<<(XmlOutput &, const VCCustomBuildTool &); |
|
1068 |
XmlOutput &operator<<(XmlOutput &, const VCLibrarianTool &); |
|
1069 |
XmlOutput &operator<<(XmlOutput &, const VCResourceCompilerTool &); |
|
1070 |
XmlOutput &operator<<(XmlOutput &, const VCEventTool &); |
|
1071 |
XmlOutput &operator<<(XmlOutput &, const VCDeploymentTool &); |
|
1072 |
XmlOutput &operator<<(XmlOutput &, const VCConfiguration &); |
|
1073 |
XmlOutput &operator<<(XmlOutput &, VCFilter &); |
|
1074 |
XmlOutput &operator<<(XmlOutput &, const VCProjectSingleConfig &); |
|
1075 |
XmlOutput &operator<<(XmlOutput &, VCProject &); |
|
1076 |
||
1077 |
QT_END_NAMESPACE |
|
1078 |
||
1079 |
#endif // MSVC_OBJECTMODEL_H |