QtBase  v6.3.1
msvc_objectmodel.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the qmake application of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21 ** included in the packaging of this file. Please review the following
22 ** information to ensure the GNU General Public License requirements will
23 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24 **
25 ** $QT_END_LICENSE$
26 **
27 ****************************************************************************/
28 
29 #include "msvc_objectmodel.h"
30 #include "msvc_vcproj.h"
31 #include "msvc_vcxproj.h"
32 
33 #include <ioutils.h>
34 
35 #include <qscopedpointer.h>
36 #include <qfileinfo.h>
37 #include <qregularexpression.h>
38 
39 using namespace QMakeInternal;
40 
42 
43 DotNET vsVersionFromString(const ProString &versionString)
44 {
45  int idx = versionString.indexOf(QLatin1Char('.'));
46  if (idx == -1)
47  return NETUnknown;
48 
49  QStringView versionView = versionString.toQStringView();
50  int versionMajor = versionView.left(idx).toInt();
51  int versionMinor = versionView.mid(idx + 1).toInt();
52 
53  if (versionMajor == 17)
54  return NET2022;
55  if (versionMajor == 16)
56  return NET2019;
57  if (versionMajor == 15)
58  return NET2017;
59  if (versionMajor == 14)
60  return NET2015;
61  if (versionMajor == 12)
62  return NET2013;
63  if (versionMajor == 11)
64  return NET2012;
65  if (versionMajor == 10)
66  return NET2010;
67  if (versionMajor == 9)
68  return NET2008;
69  if (versionMajor == 8)
70  return NET2005;
71  if (versionMajor == 7) {
72  if (versionMinor == 0)
73  return NET2002;
74  if (versionMinor == 1)
75  return NET2003;
76  }
77 
78  return NETUnknown;
79 }
80 
81 // XML Tags ---------------------------------------------------------
82 const char _Configuration[] = "Configuration";
83 const char _Configurations[] = "Configurations";
84 const char q_File[] = "File";
85 const char _FileConfiguration[] = "FileConfiguration";
86 const char q_Files[] = "Files";
87 const char _Filter[] = "Filter";
88 const char _Globals[] = "Globals";
89 const char _Platform[] = "Platform";
90 const char _Platforms[] = "Platforms";
91 const char _Tool[] = "Tool";
92 const char _VisualStudioProject[] = "VisualStudioProject";
93 
94 // XML Properties ---------------------------------------------------
95 const char _AddModuleNamesToAssembly[] = "AddModuleNamesToAssembly";
96 const char _AdditionalDependencies[] = "AdditionalDependencies";
97 const char _AdditionalFiles[] = "AdditionalFiles";
98 const char _AdditionalIncludeDirectories[] = "AdditionalIncludeDirectories";
99 const char _AdditionalLibraryDirectories[] = "AdditionalLibraryDirectories";
100 const char _AdditionalOptions[] = "AdditionalOptions";
101 const char _AdditionalUsingDirectories[] = "AdditionalUsingDirectories";
102 const char _AssemblerListingLocation[] = "AssemblerListingLocation";
103 const char _AssemblerOutput[] = "AssemblerOutput";
104 const char _ATLMinimizesCRunTimeLibraryUsage[] = "ATLMinimizesCRunTimeLibraryUsage";
105 const char _BaseAddress[] = "BaseAddress";
106 const char _BasicRuntimeChecks[] = "BasicRuntimeChecks";
107 const char _BrowseInformation[] = "BrowseInformation";
108 const char _BrowseInformationFile[] = "BrowseInformationFile";
109 const char _BufferSecurityCheck[] = "BufferSecurityCheck";
110 const char _BuildBrowserInformation[] = "BuildBrowserInformation";
111 const char _CPreprocessOptions[] = "CPreprocessOptions";
112 const char _CallingConvention[] = "CallingConvention";
113 const char _CharacterSet[] = "CharacterSet";
114 const char _CommandLine[] = "CommandLine";
115 const char _CompileAs[] = "CompileAs";
116 const char _CompileAsManaged[] = "CompileAsManaged";
117 const char _CompileOnly[] = "CompileOnly";
118 const char _ConfigurationType[] = "ConfigurationType";
119 const char _Culture[] = "Culture";
120 const char _DLLDataFileName[] = "DLLDataFileName";
121 const char _DataExecutionPrevention[] = "DataExecutionPrevention";
122 const char _DebugInformationFormat[] = "DebugInformationFormat";
123 const char _DefaultCharType[] = "DefaultCharType";
124 const char _DelayLoadDLLs[] = "DelayLoadDLLs";
125 const char _DeleteExtensionsOnClean[] = "DeleteExtensionsOnClean";
126 const char _Description[] = "Description";
127 const char _Detect64BitPortabilityProblems[] = "Detect64BitPortabilityProblems";
128 const char _DisableLanguageExtensions[] = "DisableLanguageExtensions";
129 const char _DisableSpecificWarnings[] = "DisableSpecificWarnings";
130 const char _EmbedManifest[] = "EmbedManifest";
131 const char _EnableCOMDATFolding[] = "EnableCOMDATFolding";
132 const char _EnableErrorChecks[] = "EnableErrorChecks";
133 const char _EnableEnhancedInstructionSet[] = "EnableEnhancedInstructionSet";
134 const char _EnableFiberSafeOptimizations[] = "EnableFiberSafeOptimizations";
135 const char _EnableFunctionLevelLinking[] = "EnableFunctionLevelLinking";
136 const char _EnableIntrinsicFunctions[] = "EnableIntrinsicFunctions";
137 const char _EntryPointSymbol[] = "EntryPointSymbol";
138 const char _ErrorCheckAllocations[] = "ErrorCheckAllocations";
139 const char _ErrorCheckBounds[] = "ErrorCheckBounds";
140 const char _ErrorCheckEnumRange[] = "ErrorCheckEnumRange";
141 const char _ErrorCheckRefPointers[] = "ErrorCheckRefPointers";
142 const char _ErrorCheckStubData[] = "ErrorCheckStubData";
143 const char _ExceptionHandling[] = "ExceptionHandling";
144 const char _ExcludedFromBuild[] = "ExcludedFromBuild";
145 const char _ExpandAttributedSource[] = "ExpandAttributedSource";
146 const char _ExportNamedFunctions[] = "ExportNamedFunctions";
147 const char _FavorSizeOrSpeed[] = "FavorSizeOrSpeed";
148 const char _FloatingPointModel[] = "FloatingPointModel";
149 const char _FloatingPointExceptions[] = "FloatingPointExceptions";
150 const char _ForceConformanceInForLoopScope[] = "ForceConformanceInForLoopScope";
151 const char _ForceSymbolReferences[] = "ForceSymbolReferences";
152 const char _ForcedIncludeFiles[] = "ForcedIncludeFiles";
153 const char _ForcedUsingFiles[] = "ForcedUsingFiles";
154 const char _FullIncludePath[] = "FullIncludePath";
155 const char _FunctionOrder[] = "FunctionOrder";
156 const char _GenerateDebugInformation[] = "GenerateDebugInformation";
157 const char _GenerateMapFile[] = "GenerateMapFile";
158 const char _GeneratePreprocessedFile[] = "GeneratePreprocessedFile";
159 const char _GenerateStublessProxies[] = "GenerateStublessProxies";
160 const char _GenerateTypeLibrary[] = "GenerateTypeLibrary";
161 const char _GlobalOptimizations[] = "GlobalOptimizations";
162 const char _HeaderFileName[] = "HeaderFileName";
163 const char _HeapCommitSize[] = "HeapCommitSize";
164 const char _HeapReserveSize[] = "HeapReserveSize";
165 const char _IgnoreAllDefaultLibraries[] = "IgnoreAllDefaultLibraries";
166 const char _IgnoreDefaultLibraryNames[] = "IgnoreDefaultLibraryNames";
167 const char _IgnoreEmbeddedIDL[] = "IgnoreEmbeddedIDL";
168 const char _IgnoreImportLibrary[] = "IgnoreImportLibrary";
169 const char _IgnoreStandardIncludePath[] = "IgnoreStandardIncludePath";
170 const char _ImportLibrary[] = "ImportLibrary";
171 const char _ImproveFloatingPointConsistency[] = "ImproveFloatingPointConsistency";
172 const char _InlineFunctionExpansion[] = "InlineFunctionExpansion";
173 const char _InterfaceIdentifierFileName[] = "InterfaceIdentifierFileName";
174 const char _IntermediateDirectory[] = "IntermediateDirectory";
175 const char _KeepComments[] = "KeepComments";
176 const char _LargeAddressAware[] = "LargeAddressAware";
177 const char _LinkDLL[] = "LinkDLL";
178 const char _LinkIncremental[] = "LinkIncremental";
179 const char _LinkTimeCodeGeneration[] = "LinkTimeCodeGeneration";
180 const char _LinkToManagedResourceFile[] = "LinkToManagedResourceFile";
181 const char _MapExports[] = "MapExports";
182 const char _MapFileName[] = "MapFileName";
183 const char _MapLines[] = "MapLines ";
184 const char _MergeSections[] = "MergeSections";
185 const char _MergedIDLBaseFileName[] = "MergedIDLBaseFileName";
186 const char _MidlCommandFile[] = "MidlCommandFile";
187 const char _MinimalRebuild[] = "MinimalRebuild";
188 const char _MkTypLibCompatible[] = "MkTypLibCompatible";
189 const char _ModuleDefinitionFile[] = "ModuleDefinitionFile";
190 const char _Name[] = "Name";
191 const char _ObjectFile[] = "ObjectFile";
192 const char _OmitFramePointers[] = "OmitFramePointers";
193 const char _OpenMP[] = "OpenMP";
194 const char _Optimization[] = "Optimization ";
195 const char _OptimizeForProcessor[] = "OptimizeForProcessor";
196 const char _OptimizeForWindows98[] = "OptimizeForWindows98";
197 const char _OptimizeForWindowsApplication[] = "OptimizeForWindowsApplication";
198 const char _OptimizeReferences[] = "OptimizeReferences";
199 const char _OutputDirectory[] = "OutputDirectory";
200 const char _OutputFile[] = "OutputFile";
201 const char _Outputs[] = "Outputs";
202 const char _ParseFiles[] = "ParseFiles";
203 const char _PrecompiledHeaderFile[] = "PrecompiledHeaderFile";
204 const char _PrecompiledHeaderThrough[] = "PrecompiledHeaderThrough";
205 const char _PreprocessorDefinitions[] = "PreprocessorDefinitions";
206 const char _PrimaryOutput[] = "PrimaryOutput";
207 const char _ProjectGUID[] = "ProjectGUID";
208 const char _Keyword[] = "Keyword";
209 const char _ProjectType[] = "ProjectType";
210 const char _ProgramDatabase[] = "ProgramDatabase";
211 const char _ProgramDataBaseFileName[] = "ProgramDataBaseFileName";
212 const char _ProgramDatabaseFile[] = "ProgramDatabaseFile";
213 const char _ProxyFileName[] = "ProxyFileName";
214 const char _RandomizedBaseAddress[] = "RandomizedBaseAddress";
215 const char _RedirectOutputAndErrors[] = "RedirectOutputAndErrors";
216 const char _RegisterOutput[] = "RegisterOutput";
217 const char _RelativePath[] = "RelativePath";
218 const char _RemoteDirectory[] = "RemoteDirectory";
219 const char _ResourceOnlyDLL[] = "ResourceOnlyDLL";
220 const char _ResourceOutputFileName[] = "ResourceOutputFileName";
221 const char _RuntimeLibrary[] = "RuntimeLibrary";
222 const char _RuntimeTypeInfo[] = "RuntimeTypeInfo";
223 const char _SccProjectName[] = "SccProjectName";
224 const char _SccLocalPath[] = "SccLocalPath";
225 const char _SetChecksum[] = "SetChecksum";
226 const char _ShowIncludes[] = "ShowIncludes";
227 const char _ShowProgress[] = "ShowProgress";
228 const char _SmallerTypeCheck[] = "SmallerTypeCheck";
229 const char _StackCommitSize[] = "StackCommitSize";
230 const char _StackReserveSize[] = "StackReserveSize";
231 const char _StringPooling[] = "StringPooling";
232 const char _StripPrivateSymbols[] = "StripPrivateSymbols";
233 const char _StructMemberAlignment[] = "StructMemberAlignment";
234 const char _SubSystem[] = "SubSystem";
235 const char _SupportUnloadOfDelayLoadedDLL[] = "SupportUnloadOfDelayLoadedDLL";
236 const char _SuppressStartupBanner[] = "SuppressStartupBanner";
237 const char _SwapRunFromCD[] = "SwapRunFromCD";
238 const char _SwapRunFromNet[] = "SwapRunFromNet";
239 const char _TargetEnvironment[] = "TargetEnvironment";
240 const char _TargetMachine[] = "TargetMachine";
241 const char _TerminalServerAware[] = "TerminalServerAware";
242 const char _Path[] = "Path";
243 const char _TreatWChar_tAsBuiltInType[] = "TreatWChar_tAsBuiltInType";
244 const char _TurnOffAssemblyGeneration[] = "TurnOffAssemblyGeneration";
245 const char _TypeLibraryFile[] = "TypeLibraryFile";
246 const char _TypeLibraryName[] = "TypeLibraryName";
247 const char _TypeLibraryResourceID[] = "TypeLibraryResourceID";
248 const char _UndefineAllPreprocessorDefinitions[]= "UndefineAllPreprocessorDefinitions";
249 const char _UndefinePreprocessorDefinitions[] = "UndefinePreprocessorDefinitions";
250 const char _UniqueIdentifier[] = "UniqueIdentifier";
251 const char _UseOfATL[] = "UseOfATL";
252 const char _UseOfMfc[] = "UseOfMfc";
253 const char _UsePrecompiledHeader[] = "UsePrecompiledHeader";
254 const char _ValidateParameters[] = "ValidateParameters";
255 const char _VCCLCompilerTool[] = "VCCLCompilerTool";
256 const char _VCLibrarianTool[] = "VCLibrarianTool";
257 const char _VCLinkerTool[] = "VCLinkerTool";
258 const char _VCManifestTool[] = "VCManifestTool";
259 const char _VCCustomBuildTool[] = "VCCustomBuildTool";
260 const char _VCResourceCompilerTool[] = "VCResourceCompilerTool";
261 const char _VCMIDLTool[] = "VCMIDLTool";
262 const char _Version[] = "Version";
263 const char _WarnAsError[] = "WarnAsError";
264 const char _WarningLevel[] = "WarningLevel";
265 const char _WholeProgramOptimization[] = "WholeProgramOptimization";
266 const char _CompileForArchitecture[] = "CompileForArchitecture";
267 const char _InterworkCalls[] = "InterworkCalls";
268 const char _GenerateManifest[] = "GenerateManifest";
269 
270 // XmlOutput stream functions ------------------------------
271 inline XmlOutput::xml_output attrT(const char *name, const triState v)
272 {
273  if(v == unset)
274  return noxml();
275  return attr(name, (v == _True ? "true" : "false"));
276 }
277 
278 inline XmlOutput::xml_output attrE(const char *name, int v)
279 {
280  return attr(name, QString::number(v));
281 }
282 
283 /*ifNot version*/
284 inline XmlOutput::xml_output attrE(const char *name, int v, int ifn)
285 {
286  if (v == ifn)
287  return noxml();
288  return attr(name, QString::number(v));
289 }
290 
292 {
293  return attr(name, QString::number(v));
294 }
295 
296 /*ifNot version*/
297 inline XmlOutput::xml_output attrL(const char *name, qint64 v, qint64 ifn)
298 {
299  if (v == ifn)
300  return noxml();
301  return attr(name, QString::number(v));
302 }
303 
304 inline XmlOutput::xml_output attrS(const char *name, const QString &v)
305 {
306  if(v.isEmpty())
307  return noxml();
308  return attr(name, v);
309 }
310 
311 inline XmlOutput::xml_output attrX(const char *name, const QStringList &v, const char *s = ",")
312 {
313  if(v.isEmpty())
314  return noxml();
315  return attr(name, v.join(s));
316 }
317 
319 {
320  if (rhs == unset)
321  return rhs;
322  triState lhs = (rhs == _True ? _False : _True);
323  return lhs;
324 }
325 
326 // VCToolBase -------------------------------------------------
328 {
329  // The splitting regexp is a bit bizarre for backwards compat reasons (why else ...).
330  return input.split(QRegularExpression(QLatin1String("(\n\t|\r\\\\h|\r\n)\\s*")));
331 }
332 
333 static QString vcCommandSeparator()
334 {
335  // MSVC transforms the build tree into a single batch file, simply pasting the contents
336  // of the custom commands into it, and putting an "if errorlevel goto" statement behind it.
337  // As we want every sub-command to be error-checked (as is done by makefile-based
338  // backends), we insert the checks ourselves, using the undocumented jump target.
339  static QString cmdSep =
340  QLatin1String("&#x000D;&#x000A;if errorlevel 1 goto VCReportError&#x000D;&#x000A;");
341  return cmdSep;
342 }
343 
344 static void unknownOptionWarning(const char *tool, const char *option)
345 {
346  static bool firstCall = true;
347  warn_msg(WarnLogic, "Could not parse %s option '%s'; added to AdditionalOptions.", tool, option);
348  if (firstCall) {
349  firstCall = false;
351  "You can suppress these warnings with CONFIG+=suppress_vcproj_warnings.");
352  }
353 }
354 
355 
356 // VCCLCompilerTool -------------------------------------------------
358  : AssemblerOutput(asmListingNone),
359  BasicRuntimeChecks(runtimeBasicCheckNone),
360  BrowseInformation(brInfoNone),
361  BufferSecurityCheck(unset),
362  CallingConvention(callConventionDefault),
363  CompileAs(compileAsDefault),
364  CompileAsManaged(managedDefault),
365  CompileAsWinRT(unset),
366  CompileOnly(unset),
367  DebugInformationFormat(debugDisabled),
368  Detect64BitPortabilityProblems(unset),
369  DisableLanguageExtensions(unset),
370  EnableEnhancedInstructionSet(archNotSet),
371  EnableFiberSafeOptimizations(unset),
372  EnableFunctionLevelLinking(unset),
373  EnableIntrinsicFunctions(unset),
374  ExceptionHandling(ehDefault),
375  ExpandAttributedSource(unset),
376  FavorSizeOrSpeed(favorNone),
377  FloatingPointModel(floatingPointNotSet),
378  FloatingPointExceptions(unset),
379  ForceConformanceInForLoopScope(unset),
380  GeneratePreprocessedFile(preprocessNo),
381  PreprocessSuppressLineNumbers(unset),
382  GlobalOptimizations(unset),
383  IgnoreStandardIncludePath(unset),
384  ImproveFloatingPointConsistency(unset),
385  InlineFunctionExpansion(expandDefault),
386  KeepComments(unset),
387  MinimalRebuild(unset),
388  OmitDefaultLibName(unset),
389  OmitFramePointers(unset),
390  OpenMP(unset),
391  Optimization(optimizeCustom),
392  OptimizeForProcessor(procOptimizeBlended),
393  OptimizeForWindowsApplication(unset),
394  ProgramDataBaseFileName(""),
395  RuntimeLibrary(rtMultiThreaded),
396  RuntimeTypeInfo(unset),
397  ShowIncludes(unset),
398  SmallerTypeCheck(unset),
399  StringPooling(unset),
400  StructMemberAlignment(alignNotSet),
401  SuppressStartupBanner(unset),
402  TreatWChar_tAsBuiltInType(unset),
403  TurnOffAssemblyGeneration(unset),
404  UndefineAllPreprocessorDefinitions(unset),
405  UsePrecompiledHeader(pchUnset),
406  UseUnicodeForAssemblerListing(unset),
407  WarnAsError(unset),
408  WarningLevel(warningLevel_0),
409  WholeProgramOptimization(unset),
410  CompileForArchitecture(archUnknown),
411  InterworkCalls(unset),
412  EnablePREfast(unset),
413  DisplayFullPaths(unset),
414  MultiProcessorCompilation(unset),
415  GenerateXMLDocumentationFiles(unset),
416  CreateHotpatchableImage(unset)
417 {
418 }
419 
420 /*
421  * Some values for the attribute UsePrecompiledHeader have changed from VS 2003 to VS 2005,
422  * see the following chart, so we need a function that transforms those values if we are
423  * using NET2005:
424  *
425  * Meaning 2003 2005
426  * -----------------------------------------
427  * Don't use PCH 0 0
428  * Create PCH (/Yc) 1 1
429  * Automatically generate (/YX) 2 (seems that it was removed)
430  * Use specific PCH (/Yu) 3 2
431  *
432  */
434 {
435  if (compilerVersion >= NET2005) {
436  if (whatPch == pchGenerateAuto) whatPch = (pchOption)0;
437  if (whatPch == pchUseUsingSpecific) whatPch = (pchOption)2;
438  }
439  return attrE(_UsePrecompiledHeader, whatPch, /*ifNot*/ pchUnset);
440 }
441 
443 {
444  if (eh == ehDefault)
445  return noxml();
446 
447  if (compilerVersion >= NET2005)
448  return attrE(_ExceptionHandling, eh);
449 
450  return attrS(_ExceptionHandling, (eh == ehNoSEH ? "true" : "false"));
451 }
452 
454 {
455  // skip index 0 ('/' or '-')
456  char first = option[1];
457  char second = option[2];
458  char third = option[3];
459  char fourth = option[4];
460  bool found = true;
461 
462  switch (first) {
463  case '?':
464  case 'h':
465  if(second == 'o' && third == 't' && fourth == 'p') {
467  break;
468  }
469  qWarning("Generator: Option '/?', '/help': MSVC.NET projects do not support outputting help info");
470  found = false;
471  break;
472  case '@':
473  qWarning("Generator: Option '/@': MSVC.NET projects do not support the use of a response file");
474  found = false;
475  break;
476  case 'l':
477  qWarning("Generator: Option '/link': qmake generator does not support passing link options through the compiler tool");
478  found = false;
479  break;
480  case 'A':
481  if(second != 'I') {
482  found = false; break;
483  }
485  break;
486  case 'C':
488  break;
489  case 'D':
491  break;
492  case 'E':
493  if(second == 'H') {
494  QByteArray opt(option + 2);
495  if (opt.contains('a') && !opt.contains('s') && !opt.contains('c'))
497  else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-"))
499  else if (!opt.contains('a') && opt.contains('s') && opt.contains('c'))
501  else {
502  // ExceptionHandling must be false, or it will override
503  // with an /EHsc option
506  }
507  if (config->CompilerVersion < NET2005
508  && ExceptionHandling == ehSEH) {
511  }
512  break;
513  } else if (second == 'P') {
515  }
517  break;
518  case 'F':
519  if(second <= '9' && second >= '0') {
521  break;
522  } else {
523  switch (second) {
524  case 'A':
525  if(third == 'c') {
527  if(fourth == 's')
529  } else if(third == 's') {
531  } else if (third == 'u') {
533  } else {
535  }
536  break;
537  case 'C':
539  break;
540  case 'a':
542  break;
543  case 'I':
545  break;
546  case 'i':
548  break;
549  case 'R':
552  break;
553  case 'S':
554  if (config->CompilerVersion < NET2013)
555  found = false;
556  // Ignore this flag. Visual Studio 2013 takes care of this setting.
557  break;
558  case 'r':
561  break;
562  case 'U':
564  break;
565  case 'd':
567  break;
568  case 'e':
569  OutputFile = option+3;
570  break;
571  case 'm':
573  break;
574  case 'o':
575  ObjectFile = option+3;
576  break;
577  case 'p':
579  break;
580  case 'x':
582  break;
583  default:
584  found = false; break;
585  }
586  }
587  break;
588  case 'G':
589  switch (second) {
590  case '3':
591  case '4':
592  qWarning("Option '/G3' and '/G4' were phased out in Visual C++ 5.0");
593  found = false; break;
594  case '5':
596  break;
597  case '6':
598  case 'B':
600  break;
601  case '7':
603  break;
604  case 'A':
606  break;
607  case 'F':
609  break;
610  case 'H':
612  break;
613  case 'L':
615  if(third == '-')
617  break;
618  case 'R':
620  if(third == '-')
622  break;
623  case 'S':
625  if(third == '-')
627  break;
628  case 'T':
630  break;
631  case 'X':
632  // Same as the /EHsc option, which is Exception Handling without SEH
634  if (third == '-')
636  break;
637  case 'Z':
638  case 'e':
639  case 'h':
641  break;
642  case 'd':
644  break;
645  case 'f':
648  break;
649  case 'm':
651  if(third == '-')
653  break;
654  case 'r':
656  break;
657  case 's':
659  break;
660  case 'y':
662  break;
663  case 'z':
665  break;
666  default:
667  found = false; break;
668  }
669  break;
670  case 'H':
672  break;
673  case 'I':
675  break;
676  case 'J':
678  break;
679  case 'L':
680  if(second == 'D') {
682  break;
683  }
684  found = false; break;
685  case 'M':
686  if(second == 'D') {
688  if(third == 'd')
690  break;
691  } else if(second == 'L') {
693  if(third == 'd')
695  break;
696  } else if(second == 'T') {
698  if(third == 'd')
700  break;
701  } else if (second == 'P') {
702  if (config->CompilerVersion >= NET2010) {
705  } else if (config->CompilerVersion >= NET2005) {
707  } else {
708  warn_msg(WarnLogic, "/MP option is not supported in Visual C++ < 2005, ignoring.");
709  }
710  break;
711  }
712  found = false; break;
713  case 'O':
714  switch (second) {
715  case '1':
717  break;
718  case '2':
720  break;
721  case 'a':
723  break;
724  case 'b':
725  if(third == '0')
727  else if(third == '1')
729  else if(third == '2')
731  else
732  found = false;
733  break;
734  case 'd':
736  break;
737  case 'g':
739  break;
740  case 'i':
742  break;
743  case 'p':
745  if(third == '-')
747  break;
748  case 's':
750  break;
751  case 't':
753  break;
754  case 'w':
756  break;
757  case 'x':
759  break;
760  case 'y':
762  if(third == '-')
764  break;
765  default:
766  found = false; break;
767  }
768  break;
769  case 'P':
771  break;
772  case 'Q':
773  if(second == 'I') {
775  break;
776  } else if (second == 'R') {
777  QString opt = option + 3;
778  if (opt == "interwork-return") {
780  break;
781  } else if (opt == "arch4") {
783  break;
784  } else if (opt == "arch5") {
786  break;
787  } else if (opt == "arch4T") {
789  break;
790  } else if (opt == "arch5T") {
792  break;
793  }
794  } else if (second == 'M') {
795  QString opt = option + 3;
796  if (opt == "mips1") {
798  break;
799  }
800  else if (opt == "mips2") {
802  break;
803  }
804  else if (opt == "mips3") {
806  break;
807  }
808  else if (opt == "mips4") {
810  break;
811  }
812  else if (opt == "mips5") {
814  break;
815  }
816  else if (opt == "mips16") {
818  break;
819  }
820  else if (opt == "mips32") {
822  break;
823  }
824  else if (opt == "mips64") {
826  break;
827  }
828  }
829  found = false; break;
830  case 'R':
831  if(second == 'T' && third == 'C') {
832  int rtc = BasicRuntimeChecks;
833  for (size_t i = 4; option[i]; ++i) {
834  if (!parseRuntimeCheckOption(option[i], &rtc)) {
835  found = false;
836  break;
837  }
838  }
839  BasicRuntimeChecks = static_cast<basicRuntimeCheckOption>(rtc);
840  }
841  break;
842  case 'T':
843  if(second == 'C') {
845  } else if(second == 'P') {
847  } else {
848  qWarning("Generator: Options '/Tp<filename>' and '/Tc<filename>' are not supported by qmake");
849  found = false; break;
850  }
851  break;
852  case 'U':
854  break;
855  case 'V':
857  break;
858  case 'W':
859  switch (second) {
860  case 'a':
861  case '4':
863  break;
864  case '3':
866  break;
867  case '2':
869  break;
870  case '1':
872  break;
873  case '0':
875  break;
876  case 'L':
878  break;
879  case 'X':
880  WarnAsError = _True;
881  break;
882  case 'p':
883  if(third == '6' && fourth == '4') {
884  if (config->CompilerVersion >= NET2010) {
885  // Deprecated for VS2010 but can be used under Additional Options.
887  } else {
889  }
890  break;
891  }
892  // Fallthrough
893  default:
894  found = false; break;
895  }
896  break;
897  case 'X':
899  break;
900  case 'Y':
901  switch (second) {
902  case '\0':
903  case '-':
905  break;
906  case 'X':
909  break;
910  case 'c':
913  break;
914  case 'd':
915  case 'l':
917  break;
918  case 'u':
921  break;
922  default:
923  found = false; break;
924  }
925  break;
926  case 'Z':
927  switch (second) {
928  case '7':
930  break;
931  case 'I':
933  break;
934  case 'd':
936  break;
937  case 'i':
939  break;
940  case 'l':
942  break;
943  case 'a':
945  break;
946  case 'e':
948  break;
949  case 'c':
950  if(third == ':') {
951  const char *c = option + 4;
952  // Go to the end of the option
953  while ( *c != '\0' && *c != ' ' && *c != '-')
954  ++c;
955  if(fourth == 'f')
956  ForceConformanceInForLoopScope = ((*c) == '-' ? _False : _True);
957  else if(fourth == 'w')
958  TreatWChar_tAsBuiltInType = ((*c) == '-' ? _False : _True);
959  else
961  } else {
962  found = false; break;
963  }
964  break;
965  case 'g':
966  case 'm':
967  case 's':
969  break;
970  case 'p':
971  switch (third)
972  {
973  case '\0':
974  case '1':
976  if(fourth == '6')
978  break;
979  case '2':
981  break;
982  case '4':
984  break;
985  case '8':
987  break;
988  default:
989  found = false; break;
990  }
991  break;
992  case 'W':
993  if (third == '-')
995  else
997  break;
998  default:
999  found = false; break;
1000  }
1001  break;
1002  case 'a':
1003  if (second == 'r' && third == 'c' && fourth == 'h') {
1004  if (option[5] == ':') {
1005  const char *o = option;
1006  if (o[6] == 'S' && o[7] == 'S' && o[8] == 'E') {
1008  break;
1009  }
1010  }
1011  } else if (second == 'n' && third == 'a' && fourth == 'l') {
1012  EnablePREfast = _True;
1013  break;
1014  }
1015  found = false;
1016  break;
1017  case 'b': // see http://msdn2.microsoft.com/en-us/library/ms173499.aspx
1018  if (second == 'i' && third == 'g' && fourth == 'o') {
1019  const char *o = option;
1020  if (o[5] == 'b' && o[6] == 'j') {
1022  break;
1023  }
1024  }
1025  found = false;
1026  break;
1027  case 'c':
1028  if(second == '\0') {
1029  CompileOnly = _True;
1030  } else if(second == 'l') {
1031  if (config->CompilerVersion < NET2005) {
1032  if(*(option+5) == 'n') {
1035  } else if(*(option+5) == 'p') {
1037  warn_msg(WarnLogic, "/clr:pure option only for .NET >= 2005, using /clr");
1038  } else if(*(option+5) == 's') {
1040  warn_msg(WarnLogic, "/clr:safe option only for .NET >= 2005, using /clr");
1041  } else if(*(option+5) == 'o') {
1043  warn_msg(WarnLogic, "/clr:oldSyntax option only for .NET >= 2005, using /clr");
1044  } else if(*(option+5) == 'i') {
1046  warn_msg(WarnLogic, "initialAppDomain enum value unknown, using /crl");
1047  } else {
1049  }
1050  } else {
1051  if(*(option+5) == 'n') {
1054  } else if(*(option+5) == 'p') {
1056  } else if(*(option+5) == 's') {
1058  } else if(*(option+5) == 'o') {
1060  } else if(*(option+5) == 'i') {
1062  warn_msg(WarnLogic, "initialAppDomain enum value unknown, using /crl default");
1063  } else {
1065  }
1066  }
1067  } else {
1068  found = false; break;
1069  }
1070  break;
1071  case 'd':
1072  if (second == 'r') {
1074  break;
1075  } else if (second != 'o' && third == 'c') {
1078  break;
1079  }
1080  found = false;
1081  break;
1082  case 'e':
1083  if (second == 'r' && third == 'r' && fourth == 'o') {
1084  if (option[12] == ':') {
1085  if ( option[13] == 'n') {
1086  ErrorReporting = "None";
1087  } else if (option[13] == 'p') {
1088  ErrorReporting = "Prompt";
1089  } else if (option[13] == 'q') {
1090  ErrorReporting = "Queue";
1091  } else if (option[13] == 's') {
1092  ErrorReporting = "Send";
1093  } else {
1094  found = false;
1095  }
1096  break;
1097  }
1098  }
1099  found = false;
1100  break;
1101  case 'f':
1102  if(second == 'p' && third == ':') {
1103  // Go to the end of the option
1104  const char *c = option + 4;
1105  while (*c != '\0' && *c != ' ' && *c != '-')
1106  ++c;
1107  switch (fourth) {
1108  case 'e':
1109  FloatingPointExceptions = ((*c) == '-' ? _False : _True);
1110  break;
1111  case 'f':
1113  break;
1114  case 'p':
1116  break;
1117  case 's':
1119  break;
1120  default:
1121  found = false;
1122  break;
1123  }
1124  }
1125  break;
1126  case 'n':
1127  if(second == 'o' && third == 'B' && fourth == 'o') {
1128  AdditionalOptions += "/noBool";
1129  break;
1130  }
1131  if(second == 'o' && third == 'l' && fourth == 'o') {
1133  break;
1134  }
1135  found = false; break;
1136  case 'o':
1137  {
1138  const char *str = option + 2;
1139  const size_t len = strlen(str);
1140  if (len >= 5 && len <= 6 && strncmp(str, "penmp", 5) == 0) {
1141  if (len == 5) {
1142  OpenMP = _True;
1143  break;
1144  } else if (str[5] == '-') {
1145  OpenMP = _False;
1146  break;
1147  }
1148  }
1149  found = false; break;
1150  }
1151  case 's':
1152  if(second == 'h' && third == 'o' && fourth == 'w') {
1153  ShowIncludes = _True;
1154  break;
1155  }
1156  if (strlen(option) > 7 && second == 't' && third == 'd' && fourth == ':') {
1157  static const QRegularExpression rex("(c(?:\\+\\+)?)(.+)");
1158  auto m = rex.match(option + 5);
1159  if (m.hasMatch()) {
1160  QString *var = nullptr;
1161  const QStringList *knownVersions = nullptr;
1162  QString valuePrefix;
1163  auto lang = m.capturedView(1);
1164  auto version = m.capturedView(2);
1165  if (lang == QStringLiteral("c++")) {
1166  // Turn /std:c++17 into <LanguageStandard>stdcpp17</LanguageStandard>
1167  static const QStringList knownCxxVersions = {
1168  "14",
1169  "17",
1170  "20",
1171  "latest"
1172  };
1173  var = &LanguageStandard;
1174  knownVersions = &knownCxxVersions;
1175  valuePrefix = "stdcpp";
1176  } else if (lang == QStringLiteral("c")) {
1177  // Turn /std:c17 into <LanguageStandard_C>stdc17</LanguageStandard_C>
1178  static const QStringList knownCVersions = {
1179  "11",
1180  "17"
1181  };
1183  knownVersions = &knownCVersions;
1184  valuePrefix = "stdc";
1185  }
1186  if (var && knownVersions->contains(version)) {
1187  *var = valuePrefix + version;
1188  break;
1189  }
1190  }
1191  }
1192  found = false; break;
1193  case 'u':
1194  if (!second)
1196  else if (strcmp(option + 2, "tf-8") == 0)
1198  else
1199  found = false;
1200  break;
1201  case 'v':
1202  if(second == 'd' || second == 'm') {
1204  break;
1205  }
1206  found = false; break;
1207  case 'w':
1208  switch (second) {
1209  case '\0':
1211  break;
1212  case 'd':
1214  break;
1215  case 'e':
1216  if (config->CompilerVersion <= NET2008)
1218  else
1220  break;
1221  default:
1223  }
1224  break;
1225  default:
1227  break;
1228  }
1229  if(!found) {
1230  if (!config->suppressUnknownOptionWarnings)
1231  unknownOptionWarning("Compiler", option);
1233  }
1234  return true;
1235 }
1236 
1237 bool VCCLCompilerTool::parseRuntimeCheckOption(char c, int *rtc)
1238 {
1239  if (c == '1')
1240  *rtc = runtimeBasicCheckAll;
1241  else if (c == 'c')
1243  else if (c == 's')
1244  *rtc |= runtimeCheckStackFrame;
1245  else if (c == 'u')
1247  else
1248  return false;
1249  return true;
1250 }
1251 
1252 // VCLinkerTool -----------------------------------------------------
1254  : DataExecutionPrevention(unset),
1255  EnableCOMDATFolding(optFoldingDefault),
1256  GenerateDebugInformation(unset),
1257  DebugInfoOption(linkerDebugOptionNone),
1258  GenerateMapFile(unset),
1259  HeapCommitSize(-1),
1260  HeapReserveSize(-1),
1261  IgnoreAllDefaultLibraries(unset),
1262  IgnoreEmbeddedIDL(unset),
1263  IgnoreImportLibrary(_True),
1264  ImageHasSafeExceptionHandlers(unset),
1265  LargeAddressAware(addrAwareDefault),
1266  LinkDLL(unset),
1267  LinkIncremental(linkIncrementalDefault),
1268  LinkTimeCodeGeneration(optLTCGDefault),
1269  MapExports(unset),
1270  MapLines(unset),
1271  OptimizeForWindows98(optWin98Default),
1272  OptimizeReferences(optReferencesDefault),
1273  RandomizedBaseAddress(unset),
1274  RegisterOutput(unset),
1275  ResourceOnlyDLL(unset),
1276  SetChecksum(unset),
1277  ShowProgress(linkProgressNotSet),
1278  StackCommitSize(-1),
1279  StackReserveSize(-1),
1280  SubSystem(subSystemNotSet),
1281  SupportUnloadOfDelayLoadedDLL(unset),
1282  SuppressStartupBanner(unset),
1283  SwapRunFromCD(unset),
1284  SwapRunFromNet(unset),
1285  TargetMachine(machineNotSet),
1286  TerminalServerAware(termSvrAwareDefault),
1287  TreatWarningsAsErrors(unset),
1288  TurnOffAssemblyGeneration(unset),
1289  TypeLibraryResourceID(0),
1290  GenerateManifest(unset),
1291  EnableUAC(unset),
1292  UACUIAccess(unset),
1293  SectionAlignment(-1),
1294  PreventDllBinding(unset),
1295  AllowIsolation(unset),
1296  AssemblyDebug(unset),
1297  CLRUnmanagedCodeCheck(unset),
1298  DelaySign(unset),
1299  GenerateWindowsMetadata(unset)
1300 {
1301 }
1302 
1303 // Hashing routine to do fast option lookups ----
1304 // Slightly rewritten to stop on ':' ',' and '\0'
1305 // Original routine in qtranslator.cpp ----------
1306 static uint elfHash(const char* name)
1307 {
1308  const uchar *k;
1309  uint h = 0;
1310  uint g;
1311 
1312  if(name) {
1313  k = (const uchar *) name;
1314  while((*k) &&
1315  (*k)!= ':' &&
1316  (*k)!=',' &&
1317  (*k)!=' ') {
1318  h = (h << 4) + *k++;
1319  if((g = (h & 0xf0000000)) != 0)
1320  h ^= g >> 24;
1321  h &= ~g;
1322  }
1323  }
1324  if(!h)
1325  h = 1;
1326  return h;
1327 }
1328 
1329 //#define USE_DISPLAY_HASH
1330 #ifdef USE_DISPLAY_HASH
1331 static void displayHash(const char* str)
1332 {
1333  printf("case 0x%07x: // %s\n break;\n", elfHash(str), str);
1334 }
1335 #endif
1336 
1338 {
1339 #ifdef USE_DISPLAY_HASH
1340  // Main options
1341  displayHash("/ALIGN"); displayHash("/ALLOWBIND"); displayHash("/ASSEMBLYMODULE");
1342  displayHash("/ASSEMBLYRESOURCE"); displayHash("/BASE"); displayHash("/DEBUG");
1343  displayHash("/DEF"); displayHash("/DEFAULTLIB"); displayHash("/DELAY");
1344  displayHash("/DELAYLOAD"); displayHash("/DLL"); displayHash("/DRIVER");
1345  displayHash("/ENTRY"); displayHash("/EXETYPE"); displayHash("/EXPORT");
1346  displayHash("/FIXED"); displayHash("/FORCE"); displayHash("/HEAP");
1347  displayHash("/IDLOUT"); displayHash("/IGNORE"); displayHash("/IGNOREIDL"); displayHash("/IMPLIB");
1348  displayHash("/INCLUDE"); displayHash("/INCREMENTAL"); displayHash("/LARGEADDRESSAWARE");
1349  displayHash("/LIBPATH"); displayHash("/LTCG"); displayHash("/MACHINE");
1350  displayHash("/MAP"); displayHash("/MAPINFO"); displayHash("/MERGE");
1351  displayHash("/MIDL"); displayHash("/NOASSEMBLY"); displayHash("/NODEFAULTLIB");
1352  displayHash("/NOENTRY"); displayHash("/NOLOGO"); displayHash("/OPT");
1353  displayHash("/ORDER"); displayHash("/OUT"); displayHash("/PDB");
1354  displayHash("/PDBSTRIPPED"); displayHash("/RELEASE"); displayHash("/SECTION");
1355  displayHash("/STACK"); displayHash("/STUB"); displayHash("/SUBSYSTEM");
1356  displayHash("/SWAPRUN"); displayHash("/TLBID"); displayHash("/TLBOUT");
1357  displayHash("/TSAWARE"); displayHash("/VERBOSE"); displayHash("/VERSION");
1358  displayHash("/VXD"); displayHash("/WS "); displayHash("/libpath");
1359  displayHash("/WINMD"); displayHash("/WINMDFILE:");
1360 
1361 #endif
1362 #ifdef USE_DISPLAY_HASH
1363  // Sub options
1364  displayHash("UNLOAD"); displayHash("NOBIND"); displayHash("no"); displayHash("NOSTATUS"); displayHash("STATUS");
1365  displayHash("AM33"); displayHash("ARM"); displayHash("CEE"); displayHash("EBC"); displayHash("IA64"); displayHash("X86"); displayHash("X64"); displayHash("M32R");
1366  displayHash("MIPS"); displayHash("MIPS16"); displayHash("MIPSFPU"); displayHash("MIPSFPU16"); displayHash("MIPSR41XX"); displayHash("PPC");
1367  displayHash("SH3"); displayHash("SH3DSP"); displayHash("SH4"); displayHash("SH5"); displayHash("THUMB"); displayHash("TRICORE"); displayHash("EXPORTS");
1368  displayHash("LINES"); displayHash("REF"); displayHash("NOREF"); displayHash("ICF"); displayHash("WIN98"); displayHash("NOWIN98");
1369  displayHash("CONSOLE"); displayHash("EFI_APPLICATION"); displayHash("EFI_BOOT_SERVICE_DRIVER"); displayHash("EFI_ROM"); displayHash("EFI_RUNTIME_DRIVER"); displayHash("NATIVE");
1370  displayHash("POSIX"); displayHash("WINDOWS"); displayHash("WINDOWSCE"); displayHash("NET"); displayHash("CD"); displayHash("NO");
1371 #endif
1372  bool found = true;
1373  const uint optionHash = elfHash(option);
1374  if (config->CompilerVersion < NET2010) {
1375  switch (optionHash) {
1376  case 0x3360dbe: // /ALIGN[:number]
1377  case 0x1485c34: // /ALLOWBIND[:NO]
1378  case 0x33aec94: // /FIXED[:NO]
1379  case 0x7988f7e: // /SECTION:name,[E][R][W][S][D][K][L][P][X][,ALIGN=#]
1380  case 0x0348992: // /STUB:filename
1382  return true;
1383  }
1384  }
1385 
1386  switch (optionHash) {
1387  case 0x6b21972: // /DEFAULTLIB:library
1388  case 0x396ea92: // /DRIVER[:UPONLY | :WDM]
1389  case 0xaca9d75: // /EXETYPE[:DYNAMIC | :DEV386]
1390  case 0x3ad5444: // /EXPORT:entryname[,@ordinal[,NONAME]][,DATA]
1391  case 0x33b4675: // /FORCE:[MULTIPLE|UNRESOLVED]
1392  case 0x3dc3455: // /IGNORE:number,number,number,number ### NOTE: This one is undocumented, but it is even used by Microsoft.
1393  // In recent versions of the Microsoft linker they have disabled this undocumented feature.
1394  case 0x0034bc4: // /VXD
1396  break;
1397  case 0x3360dbe: // /ALIGN[:number]
1398  SectionAlignment = QString(option+7).toLongLong();
1399  break;
1400  case 0x1485c34: // /ALLOWBIND[:NO]
1401  if(*(option+10) == ':' && (*(option+11) == 'n' || *(option+11) == 'N'))
1403  else
1405  break;
1406  case 0x312011e: // /ALLOWISOLATION[:NO]
1407  if(*(option+15) == ':' && (*(option+16) == 'n' || *(option+16) == 'N'))
1409  else
1411  break;
1412  case 0x679c075: // /ASSEMBLYMODULE:filename
1414  break;
1415  case 0x75f35f7: // /ASSEMBLYDEBUG[:DISABLE]
1416  if(*(option+14) == ':' && (*(option+15) == 'D'))
1418  else
1419  AssemblyDebug = _True;
1420  break;
1421  case 0x43294a5: // /ASSEMBLYLINKRESOURCE:filename
1423  break;
1424  case 0x062d065: // /ASSEMBLYRESOURCE:filename
1426  break;
1427  case 0x0336675: // /BASE:{address | @filename,key}
1428  // Do we need to do a manual lookup when '@filename,key'?
1429  // Seems BaseAddress only can contain the location...
1430  // We don't use it in Qt, so keep it simple for now
1431  BaseAddress = option+6;
1432  break;
1433  case 0x63bf065: // /CLRIMAGETYPE:{IJW|PURE|SAFE}
1434  if(*(option+14) == 'I')
1435  CLRImageType = "ForceIJWImage";
1436  else if(*(option+14) == 'P')
1437  CLRImageType = "ForcePureILImage";
1438  else if(*(option+14) == 'S')
1439  CLRImageType = "ForceSafeILImage";
1440  break;
1441  case 0x5f2a6a2: // /CLRSUPPORTLASTERROR{:NO | SYSTEMDLL}
1442  if(*(option+20) == ':') {
1443  if(*(option+21) == 'N') {
1444  CLRSupportLastError = "Disabled";
1445  } else if(*(option+21) == 'S') {
1446  CLRSupportLastError = "SystemDlls";
1447  }
1448  } else {
1449  CLRSupportLastError = "Enabled";
1450  }
1451  break;
1452  case 0xc7984f5: // /CLRTHREADATTRIBUTE:{STA|MTA|NONE}
1453  if(*(option+20) == 'N')
1454  CLRThreadAttribute = "DefaultThreadingAttribute";
1455  else if(*(option+20) == 'M')
1456  CLRThreadAttribute = "MTAThreadingAttribute";
1457  else if(*(option+20) == 'S')
1458  CLRThreadAttribute = "STAThreadingAttribute";
1459  break;
1460  case 0xa8c637b: // /CLRUNMANAGEDCODECHECK[:NO]
1461  if(*(option+23) == 'N')
1463  else
1465  break;
1466  case 0x62d9e94: // /MANIFEST[:NO]
1467  if ((*(option+9) == ':' && (*(option+10) == 'N' || *(option+10) == 'n')))
1469  else
1471  break;
1472  case 0x34be314: // /WINMD[:NO]
1473  if ((*(option+6) == ':' && (*(option+7) == 'N' || *(option+7) == 'n')))
1475  else
1477  break;
1478  case 0x31be7e5: // /WINMDFILE:filename
1480  break;
1481  case 0x8b64559: // /MANIFESTDEPENDENCY:manifest_dependency
1483  break;
1484  case 0xe9e8195: // /MANIFESTFILE:filename
1485  ManifestFile = option+14;
1486  break;
1487  case 0x9e9fb83: // /MANIFESTUAC http://msdn.microsoft.com/en-us/library/bb384691%28VS.100%29.aspx
1488  if ((*(option+12) == ':' && (*(option+13) == 'N' || *(option+13) == 'n')))
1489  EnableUAC = _False;
1490  else if((*(option+12) == ':' && (*(option+13) == 'l' || *(option+14) == 'e'))) { // level
1491  if(*(option+20) == 'a')
1492  UACExecutionLevel = "AsInvoker";
1493  else if(*(option+20) == 'h')
1494  UACExecutionLevel = "HighestAvailable";
1495  else if(*(option+20) == 'r')
1496  UACExecutionLevel = "RequireAdministrator";
1497  } else if((*(option+12) == ':' && (*(option+13) == 'u' || *(option+14) == 'i'))) { // uiAccess
1498  if(*(option+22) == 't')
1499  UACUIAccess = _True;
1500  else
1501  UACUIAccess = _False;
1502  } else if((*(option+12) == ':' && (*(option+13) == 'f' || *(option+14) == 'r'))) { // fragment
1504  }else
1505  EnableUAC = _True;
1506  break;
1507  case 0x3389797: // /DEBUG[:FASTLINK]
1509  if (config->CompilerVersion >= NET2015 && strcmp(option + 7, "FASTLINK") == 0)
1511  break;
1512  case 0x0033896: // /DEF:filename
1514  break;
1515  case 0x338a069: // /DELAY:{UNLOAD | NOBIND}
1516  // MS documentation does not specify what to do with
1517  // this option, so we'll put it in AdditionalOptions
1519  break;
1520  case 0x06f4bf4: // /DELAYLOAD:dllname
1521  DelayLoadDLLs += option+11;
1522  break;
1523  case 0x06d451e: // /DELAYSIGN[:NO]
1524  if(*(option+10) == ':' && (*(option+11) == 'n' || *(option+11) == 'N'))
1525  DelaySign = _False;
1526  else
1527  DelaySign = _True;
1528  break;
1529  case 0x003390c: // /DLL
1530  // This option is not used for vcproj files
1531  break;
1532  case 0x2ee8415: // /DYNAMICBASE[:NO]
1533  if(*(option+12) == ':' && (*(option+13) == 'n' || *(option+13) == 'N'))
1535  else
1537  break;
1538  case 0x33a3979: // /ENTRY:function
1540  break;
1541  case 0x4504334: // /ERRORREPORT:[ NONE | PROMPT | QUEUE | SEND ]
1542  if(*(option+12) == ':' ) {
1543  if(*(option+13) == 'N')
1544  LinkErrorReporting = "NoErrorReport";
1545  else if(*(option+13) == 'P')
1546  LinkErrorReporting = "PromptImmediately";
1547  else if(*(option+13) == 'Q')
1548  LinkErrorReporting = "QueueForNextLogin";
1549  else if(*(option+13) == 'S')
1550  LinkErrorReporting = "SendErrorReport";
1551  }
1552  break;
1553  case 0x033c960: // /HEAP:reserve[,commit]
1554  {
1555  QStringList both = QString(option+6).split(",");
1556  HeapReserveSize = both[0].toLongLong();
1557  if(both.count() == 2)
1558  HeapCommitSize = both[1].toLongLong();
1559  }
1560  break;
1561  case 0x3d91494: // /IDLOUT:[path\]filename
1563  break;
1564  case 0x345a04c: // /IGNOREIDL
1566  break;
1567  case 0x3e250e2: // /IMPLIB:filename
1568  ImportLibrary = option+8;
1569  break;
1570  case 0xe281ab5: // /INCLUDE:symbol
1572  break;
1573  case 0xb28103c: // /INCREMENTAL[:no]
1574  if(*(option+12) == ':' &&
1575  (*(option+13) == 'n' || *(option+13) == 'N'))
1577  else
1579  break;
1580  case 0x07f1ab2: // /KEYCONTAINER:name
1581  KeyContainer = option+14;
1582  break;
1583  case 0xfadaf35: // /KEYFILE:filename
1584  KeyFile = option+9;
1585  break;
1586  case 0x26e4675: // /LARGEADDRESSAWARE[:no]
1587  if(*(option+18) == ':' &&
1588  *(option+19) == 'n')
1590  else
1592  break;
1593  case 0x2f96bc8: // /libpath:dir
1594  case 0x0d745c8: // /LIBPATH:dir
1596  break;
1597  case 0x0341877: // /LTCG[:NOSTATUS|:STATUS]
1598  config->WholeProgramOptimization = _True;
1599  if (config->CompilerVersion >= NET2005) {
1601  if(*(option+5) == ':') {
1602  const char* str = option+6;
1603  if (*str == 'S')
1605  else if (qstricmp(str, "pginstrument") == 0)
1607  else if (qstricmp(str, "pgoptimize") == 0)
1609  else if (qstricmp(str, "pgupdate") == 0)
1611  }
1612  } else {
1613  AdditionalOptions.append(option);
1614  }
1615  break;
1616  case 0x379ED25:
1617  case 0x157cf65: // /MACHINE:{AM33|ARM|CEE|IA64|X86|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX|PPC|SH3|SH4|SH5|THUMB|TRICORE}
1618  switch (elfHash(option+9)) {
1619  // Very limited documentation on all options but X86,
1620  case 0x0005bb6: // X86
1622  break;
1623  case 0x0005b94: // X64
1625  break;
1626  // so we put the others in AdditionalOptions...
1627  case 0x0046063: // AM33
1628  case 0x000466d: // ARM
1629  case 0x0004795: // CEE
1630  case 0x0004963: // EBC
1631  case 0x004d494: // IA64
1632  case 0x0050672: // M32R
1633  case 0x0051e53: // MIPS
1634  case 0x51e5646: // MIPS16
1635  case 0x1e57b05: // MIPSFPU
1636  case 0x57b09a6: // MIPSFPU16
1637  case 0x5852738: // MIPSR41XX
1638  case 0x0005543: // PPC
1639  case 0x00057b3: // SH3
1640  case 0x57b7980: // SH3DSP
1641  case 0x00057b4: // SH4
1642  case 0x00057b5: // SH5
1643  case 0x058da12: // THUMB
1644  case 0x96d8435: // TRICORE
1645  default:
1647  break;
1648  }
1649  break;
1650  case 0x0034160: // /MAP[:filename]
1652  if (option[4] == ':')
1653  MapFileName = option+5;
1654  break;
1655  case 0x164e1ef: // /MAPINFO:{EXPORTS|LINES}
1656  if(*(option+9) == 'E')
1657  MapExports = _True;
1658  else if(*(option+9) == 'L')
1659  MapLines = _True;
1660  break;
1661  case 0x341a6b5: // /MERGE:from=to
1662  if (MergeSections.isEmpty()) {
1663  MergeSections = option+7;
1664  } else {
1665  // vcxproj files / the VS property editor do not support multiple MergeSections entries.
1666  // Add them as additional options.
1668  }
1669  break;
1670  case 0x0341d8c: // /MIDL:@file
1671  MidlCommandFile = option+7;
1672  break;
1673  case 0x84e2679: // /NOASSEMBLY
1675  break;
1676  case 0x2b21942: // /NODEFAULTLIB[:library]
1677  if(*(option+13) == '\0')
1679  else
1681  break;
1682  case 0x33a3a39: // /NOENTRY
1684  break;
1685  case 0x434138f: // /NOLOGO
1687  break;
1688  case 0xc841054: // /NXCOMPAT[:NO]
1689  if ((*(option+9) == ':' && (*(option+10) == 'N' || *(option+10) == 'n')))
1691  else
1693  break;
1694  case 0x0034454: // /OPT:{REF | NOREF | ICF[=iterations] | NOICF | WIN98 | NOWIN98}
1695  {
1696  char third = *(option+7);
1697  switch (third) {
1698  case 'F': // REF
1699  if(*(option+5) == 'R') {
1701  } else { // ICF[=iterations]
1703  // [=iterations] case is not documented
1704  }
1705  break;
1706  case 'R': // NOREF
1708  break;
1709  case 'I': // NOICF
1711  break;
1712  case 'N': // WIN98
1714  break;
1715  case 'W': // NOWIN98
1717  break;
1718  default:
1719  found = false;
1720  }
1721  }
1722  break;
1723  case 0x34468a2: // /ORDER:@filename
1724  FunctionOrder = option+8;
1725  break;
1726  case 0x00344a4: // /OUT:filename
1727  OutputFile = option+5;
1728  break;
1729  case 0x0034482: // /PDB:filename
1731  break;
1732  case 0xa2ad314: // /PDBSTRIPPED:pdb_file_name
1734  break;
1735  case 0x6a09535: // /RELEASE
1736  SetChecksum = _True;
1737  break;
1738  case 0x348857b: // /STACK:reserve[,commit]
1739  {
1740  QStringList both = QString(option+7).split(",");
1741  StackReserveSize = both[0].toLongLong();
1742  if(both.count() == 2)
1743  StackCommitSize = both[1].toLongLong();
1744  }
1745  break;
1746  case 0x75AA4D8: // /SAFESEH:{NO}
1747  if (config->CompilerVersion >= NET2010)
1749  else
1751  break;
1752  case 0x9B3C00D:
1753  case 0x78dc00d: // /SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|WINDOWSCE}[,major[.minor]]
1754  {
1755  // Split up in subsystem, and version number
1756  QStringList both = QString(option+11).split(",");
1757  switch (elfHash(both[0].toLatin1().constData())) {
1758  case 0x8438445: // CONSOLE
1760  break;
1761  case 0xbe29493: // WINDOWS
1763  break;
1764  // The following are undocumented, so add them to AdditionalOptions
1765  case 0x240949e: // EFI_APPLICATION
1766  case 0xe617652: // EFI_BOOT_SERVICE_DRIVER
1767  case 0x9af477d: // EFI_ROM
1768  case 0xd34df42: // EFI_RUNTIME_DRIVER
1769  case 0x5268ea5: // NATIVE
1770  case 0x05547e8: // POSIX
1771  case 0x2949c95: // WINDOWSCE
1772  case 0x4B69795: // windowsce
1774  break;
1775  default:
1776  found = false;
1777  }
1778  }
1779  break;
1780  case 0x8b654de: // /SWAPRUN:{NET | CD}
1781  if(*(option+9) == 'N')
1783  else if(*(option+9) == 'C')
1784  SwapRunFromCD = _True;
1785  else
1786  found = false;
1787  break;
1788  case 0x34906d4: // /TLBID:id
1789  TypeLibraryResourceID = QString(option+7).toLongLong();
1790  break;
1791  case 0x4907494: // /TLBOUT:[path\]filename
1792  TypeLibraryFile = option+8;
1793  break;
1794  case 0x976b525: // /TSAWARE[:NO]
1795  if(*(option+8) == ':')
1797  else
1799  break;
1800  case 0xaa67735: // /VERBOSE[:lib]
1801  if(*(option+9) == ':') {
1804  } else {
1806  }
1807  break;
1808  case 0xaa77f7e: // /VERSION:major[.minor]
1809  Version = option+9;
1810  break;
1811  case 0x0034c50: // /WS[:NO]
1812  if (config->CompilerVersion >= NET2010) {
1813  if(*(option+3) == ':')
1815  else
1817  } else {
1819  }
1820  break;
1821  default:
1823  break;
1824  }
1825  if(!found) {
1826  if (!config->suppressUnknownOptionWarnings)
1827  unknownOptionWarning("Linker", option);
1829  }
1830  return found;
1831 }
1832 
1833 // VCManifestTool ---------------------------------------------------
1835  : EmbedManifest(unset)
1836 {
1837 }
1838 
1840 {
1841  Q_UNUSED(option);
1842  // ### implement if we introduce QMAKE_MT_FLAGS
1843  return false;
1844 }
1845 
1846 // VCMIDLTool -------------------------------------------------------
1848  : DefaultCharType(midlCharUnsigned),
1849  EnableErrorChecks(midlDisableAll),
1850  ErrorCheckAllocations(unset),
1851  ErrorCheckBounds(unset),
1852  ErrorCheckEnumRange(unset),
1853  ErrorCheckRefPointers(unset),
1854  ErrorCheckStubData(unset),
1855  GenerateStublessProxies(unset),
1856  GenerateTypeLibrary(unset),
1857  IgnoreStandardIncludePath(unset),
1858  MkTypLibCompatible(unset),
1859  StructMemberAlignment(midlAlignNotSet),
1860  SuppressStartupBanner(unset),
1861  TargetEnvironment(midlTargetNotSet),
1862  ValidateParameters(unset),
1863  WarnAsError(unset),
1864  WarningLevel(midlWarningLevel_0),
1865  ApplicationConfigurationMode(unset),
1866  ValidateAllParameters(unset),
1867  SuppressCompilerWarnings(unset),
1868  LocaleID(-1)
1869 {
1870 }
1871 
1873 {
1874 #ifdef USE_DISPLAY_HASH
1875  displayHash("/D name[=def]"); displayHash("/I directory-list"); displayHash("/Oi");
1876  displayHash("/Oic"); displayHash("/Oicf"); displayHash("/Oif"); displayHash("/Os");
1877  displayHash("/U name"); displayHash("/WX"); displayHash("/W{0|1|2|3|4}");
1878  displayHash("/Zp {N}"); displayHash("/Zs"); displayHash("/acf filename");
1879  displayHash("/align {N}"); displayHash("/app_config"); displayHash("/c_ext");
1880  displayHash("/char ascii7"); displayHash("/char signed"); displayHash("/char unsigned");
1881  displayHash("/client none"); displayHash("/client stub"); displayHash("/confirm");
1882  displayHash("/cpp_cmd cmd_line"); displayHash("/cpp_opt options");
1883  displayHash("/cstub filename"); displayHash("/dlldata filename"); displayHash("/env win32");
1884  displayHash("/env win64"); displayHash("/error all"); displayHash("/error allocation");
1885  displayHash("/error bounds_check"); displayHash("/error enum"); displayHash("/error none");
1886  displayHash("/error ref"); displayHash("/error stub_data"); displayHash("/h filename");
1887  displayHash("/header filename"); displayHash("/iid filename"); displayHash("/lcid");
1888  displayHash("/mktyplib203"); displayHash("/ms_ext"); displayHash("/ms_union");
1889  displayHash("/msc_ver <nnnn>"); displayHash("/newtlb"); displayHash("/no_cpp");
1890  displayHash("/no_def_idir"); displayHash("/no_default_epv"); displayHash("/no_format_opt");
1891  displayHash("/no_warn"); displayHash("/nocpp"); displayHash("/nologo"); displayHash("/notlb");
1892  displayHash("/o filename"); displayHash("/oldnames"); displayHash("/oldtlb");
1893  displayHash("/osf"); displayHash("/out directory"); displayHash("/pack {N}");
1894  displayHash("/prefix all"); displayHash("/prefix client"); displayHash("/prefix server");
1895  displayHash("/prefix switch"); displayHash("/protocol all"); displayHash("/protocol dce");
1896  displayHash("/protocol ndr64"); displayHash("/proxy filename"); displayHash("/robust");
1897  displayHash("/rpcss"); displayHash("/savePP"); displayHash("/server none");
1898  displayHash("/server stub"); displayHash("/sstub filename"); displayHash("/syntax_check");
1899  displayHash("/target {system}"); displayHash("/tlb filename"); displayHash("/use_epv");
1900  displayHash("/win32"); displayHash("/win64");
1901 #endif
1902  bool found = true;
1903  int offset = 0;
1904 
1905  const uint optionHash = elfHash(option);
1906 
1907  if (config->CompilerVersion < NET2010) {
1908  switch (optionHash) {
1909  case 0x5b1cb97: // /app_config
1910  case 0x5a2fc64: // /client {none|stub}
1911  case 0x35aabb2: // /cstub filename
1912  case 0x64ceb12: // /newtlb
1913  case 0x556dbee: // /no_warn
1914  case 0x662bb12: // /oldtlb
1915  case 0x69c9cf2: // /server {none|stub}
1916  case 0x36aabb2: // /sstub filename
1918  return true;
1919  }
1920  }
1921 
1922  switch(optionHash) {
1923  case 0x0000334: // /D name[=def]
1925  break;
1926  case 0x0000339: // /I directory-list
1928  break;
1929  case 0x0345f96: // /Oicf
1930  case 0x00345f6: // /Oif
1932  break;
1933  case 0x0000345: // /U name
1935  break;
1936  case 0x00034c8: // /WX
1937  WarnAsError = _True;
1938  break;
1939  case 0x3582fde: // /align {N}
1940  offset = 3;
1941  Q_FALLTHROUGH();
1942  case 0x0003510: // /Zp {N}
1943  switch (*(option+offset+4)) {
1944  case '1':
1946  break;
1947  case '2':
1949  break;
1950  case '4':
1952  break;
1953  case '8':
1955  break;
1956  default:
1957  found = false;
1958  }
1959  break;
1960  case 0x5b1cb97: // /app_config
1962  break;
1963  case 0x0359e82: // /char {ascii7|signed|unsigned}
1964  switch(*(option+6)) {
1965  case 'a':
1967  break;
1968  case 's':
1970  break;
1971  case 'u':
1973  break;
1974  default:
1975  found = false;
1976  }
1977  break;
1978  case 0x5a2fc64: // /client {none|stub}
1979  if(*(option+8) == 's')
1980  GenerateClientFiles = "Stub";
1981  else
1982  GenerateClientFiles = "None";
1983  break;
1984  case 0xa766524: // /cpp_opt options
1986  break;
1987  case 0x35aabb2: // /cstub filename
1988  ClientStubFile = option+7;
1989  break;
1990  case 0xb32abf1: // /dlldata filename
1991  DLLDataFileName = option + 9;
1992  break;
1993  case 0x0035c56: // /env {win32|win64}
1995  break;
1996  case 0x35c9962: // /error {all|allocation|bounds_check|enum|none|ref|stub_data}
1998  switch (*(option+7)) {
1999  case 'a':
2000  if(*(option+10) == '\0')
2002  else
2004  break;
2005  case 'b':
2007  break;
2008  case 'e':
2010  break;
2011  case 'n':
2013  break;
2014  case 'r':
2016  break;
2017  case 's':
2019  break;
2020  default:
2021  found = false;
2022  }
2023  break;
2024  case 0x5eb7af2: // /header filename
2025  offset = 5;
2026  Q_FALLTHROUGH();
2027  case 0x0000358: // /h filename
2028  HeaderFileName = option + offset + 3;
2029  break;
2030  case 0x0035ff4: // /iid filename
2032  break;
2033  case 0x64b7933: // /mktyplib203
2035  break;
2036  case 0x64ceb12: // /newtlb
2037  TypeLibFormat = "NewFormat";
2038  break;
2039  case 0x8e0b0a2: // /no_def_idir
2041  break;
2042  case 0x65635ef: // /nologo
2044  break;
2045  case 0x695e9f4: // /no_robust
2047  break;
2048  case 0x3656b22: // /notlb
2050  break;
2051  case 0x556dbee: // /no_warn
2053  break;
2054  case 0x000035f: // /o filename
2056  break;
2057  case 0x662bb12: // /oldtlb
2058  TypeLibFormat = "OldFormat";
2059  break;
2060  case 0x00366c4: // /out directory
2061  OutputDirectory = option+5;
2062  break;
2063  case 0x36796f9: // /proxy filename
2064  ProxyFileName = option+7;
2065  break;
2066  case 0x6959c94: // /robust
2068  break;
2069  case 0x6a88df4: // /target {system}
2070  if(*(option+11) == '6')
2072  else
2074  break;
2075  case 0x69c9cf2: // /server {none|stub}
2076  if(*(option+8) == 's')
2077  GenerateServerFiles = "Stub";
2078  else
2079  GenerateServerFiles = "None";
2080  break;
2081  case 0x36aabb2: // /sstub filename
2082  ServerStubFile = option+7;
2083  break;
2084  case 0x0036b22: // /tlb filename
2085  TypeLibraryName = option+5;
2086  break;
2087  case 0x36e0162: // /win32
2089  break;
2090  case 0x36e0194: // /win64
2092  break;
2093  case 0x0003459: // /Oi
2094  case 0x00345f3: // /Oic
2095  case 0x0003463: // /Os
2096  case 0x0003513: // /Zs
2097  case 0x0035796: // /acf filename
2098  case 0x3595cf4: // /c_ext
2099  case 0xa64d3dd: // /confirm
2100  case 0xa765b64: // /cpp_cmd cmd_line
2101  case 0x03629f4: // /lcid
2102  case 0x6495cc4: // /ms_ext
2103  case 0x96c7a1e: // /ms_union
2104  case 0x4996fa2: // /msc_ver <nnnn>
2105  case 0x6555a40: // /no_cpp
2106  case 0xf64d6a6: // /no_default_epv
2107  case 0x6dd9384: // /no_format_opt
2108  case 0x3655a70: // /nocpp
2109  case 0x2b455a3: // /oldnames
2110  case 0x0036696: // /osf
2111  case 0x036679b: // /pack {N}
2112  case 0x678bd38: // /prefix {all|client|server|switch}
2113  case 0x96b702c: // /protocol {all|dce|ndr64}
2114  case 0x3696aa3: // /rpcss
2115  case 0x698ca60: // /savePP
2116  case 0xce9b12b: // /syntax_check
2117  case 0xc9b5f16: // /use_epv
2119  break;
2120  default:
2121  // /W{0|1|2|3|4} case
2122  if(*(option+1) == 'W') {
2123  switch (*(option+2)) {
2124  case '0':
2126  break;
2127  case '1':
2129  break;
2130  case '2':
2132  break;
2133  case '3':
2135  break;
2136  case '4':
2138  break;
2139  default:
2140  found = false;
2141  }
2142  }
2143  break;
2144  }
2145  if(!found)
2146  warn_msg(WarnLogic, "Could not parse MIDL option: %s", option);
2147  return true;
2148 }
2149 
2150 // VCLibrarianTool --------------------------------------------------
2152  : IgnoreAllDefaultLibraries(unset),
2153  SuppressStartupBanner(_True)
2154 {
2155 }
2156 
2157 // VCCustomBuildTool ------------------------------------------------
2159 {
2160  ToolName = "VCCustomBuildTool";
2161 }
2162 
2163 // VCResourceCompilerTool -------------------------------------------
2165  : Culture(rcUseDefault),
2166  IgnoreStandardIncludePath(unset),
2167  ShowProgress(linkProgressNotSet),
2168  SuppressStartupBanner(unset)
2169 {
2170 }
2171 
2172 // VCDeploymentTool --------------------------------------------
2174  : RegisterOutput(registerNo)
2175 {
2176  DeploymentTag = "DeploymentTool";
2177  RemoteDirectory = "";
2178 }
2179 
2181  : ExcludedFromBuild(unset)
2182 {
2183  EventName = eventName;
2184  ToolName = "VC";
2185  ToolName += eventName;
2186  ToolName += "Tool";
2187 }
2188 
2189 // VCPostBuildEventTool ---------------------------------------------
2191  : VCEventTool("PostBuildEvent")
2192 {
2193 }
2194 
2195 // VCPreBuildEventTool ----------------------------------------------
2197  : VCEventTool("PreBuildEvent")
2198 {
2199 }
2200 
2201 // VCPreLinkEventTool -----------------------------------------------
2203  : VCEventTool("PreLinkEvent")
2204 {
2205 }
2206 
2207 // VCConfiguration --------------------------------------------------
2208 
2210  : ATLMinimizesCRunTimeLibraryUsage(unset),
2211  BuildBrowserInformation(unset),
2212  CharacterSet(charSetNotSet),
2213  ConfigurationType(typeApplication),
2214  RegisterOutput(unset),
2215  UseOfATL(useATLNotSet),
2216  UseOfMfc(useMfcStdWin),
2217  WholeProgramOptimization(unset)
2218 {
2219  compiler.config = this;
2220  linker.config = this;
2221  idl.config = this;
2222 }
2223 
2224 // VCFilter ---------------------------------------------------------
2226  : ParseFiles(unset),
2227  Config(nullptr)
2228 {
2229  useCustomBuildTool = false;
2230  useCompilerTool = false;
2231 }
2232 
2234 {
2236 }
2237 
2238 void VCFilter::addFile(const VCFilterFile& fileInfo)
2239 {
2240  Files += VCFilterFile(fileInfo);
2241 }
2242 
2243 void VCFilter::addFiles(const QStringList& fileList)
2244 {
2245  for (int i = 0; i < fileList.count(); ++i)
2246  addFile(fileList.at(i));
2247 }
2248 
2249 void VCFilter::addFiles(const ProStringList& fileList)
2250 {
2251  for (int i = 0; i < fileList.count(); ++i)
2252  addFile(fileList.at(i).toQString());
2253 }
2254 
2256 {
2257  const bool isHFile = (str == Project->precompH);
2258  const bool pchThroughSourceFile = !Project->precompSource.isEmpty();
2259  if (isHFile && pchThroughSourceFile && Project->autogenPrecompSource) {
2260  useCustomBuildTool = true;
2261  QString toFile(Project->precompSource);
2262  CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
2263  CustomBuildTool.Outputs += toFile;
2264 
2265  QStringList lines;
2267  "echo /*-------------------------------------------------------------------- >" + toFile;
2268  lines << "* Precompiled header source file used by Visual Studio.NET to generate";
2269  lines << "* the .pch file.";
2270  lines << "*";
2271  lines << "* Due to issues with the dependencies checker within the IDE, it";
2272  lines << "* sometimes fails to recompile the PCH file, if we force the IDE to";
2273  lines << "* create the PCH file directly from the header file.";
2274  lines << "*";
2275  lines << "* This file is auto-generated by qmake since no PRECOMPILED_SOURCE was";
2276  lines << "* specified, and is used as the common stdafx.cpp. The file is only";
2277  lines << QLatin1String("* generated when creating ")
2278  + (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj")
2279  + " project files, and is not used for";
2280  lines << "* command line compilations by nmake.";
2281  lines << "*";
2282  lines << "* WARNING: All changes made in this file will be lost.";
2283  lines << "--------------------------------------------------------------------*/";
2284  lines << "#include \"" + Project->precompHFilename + "\"";
2285  for (const QString &line : qAsConst(lines))
2286  CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile;
2287  return;
2288  }
2289 
2290  useCompilerTool = true;
2291  const bool isPrecompSource = pchThroughSourceFile && (str == Project->precompSource);
2292  if (isPrecompSource) {
2296  CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
2297  return;
2298  }
2299 
2300  bool isCFile = false;
2301  for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
2302  if (str.endsWith(*it)) {
2303  isCFile = true;
2304  break;
2305  }
2306  }
2307 
2308  bool pchCompatible = (isCFile == Project->pchIsCFile);
2309  if (!pchCompatible) {
2312  CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
2313  }
2314 }
2315 
2316 VCFilterFile VCFilter::findFile(const QString &filePath, bool *found) const
2317 {
2318  for (int i = 0; i < Files.count(); ++i) {
2319  const VCFilterFile &f = Files.at(i);
2320  if (f.file == filePath) {
2321  *found = true;
2322  return f;
2323  }
2324  }
2325  *found = false;
2326  return VCFilterFile();
2327 }
2328 
2330 {
2331  const QStringList &extraCompilers = Project->extraCompilerSources.value(info.file);
2332  if (extraCompilers.isEmpty())
2333  return false;
2334 
2335  QString inFile = info.file;
2336 
2337  // is the extracompiler rule on a file with a built in compiler?
2338  const QString objectMappedFile = Project->extraCompilerOutputs.value(inFile);
2339  bool hasBuiltIn = false;
2340  if (!objectMappedFile.isEmpty()) {
2341  hasBuiltIn = Project->hasBuiltinCompiler(objectMappedFile);
2342 
2343  // Remove the fake file suffix we've added initially to generate correct command lines.
2345 
2346 // qDebug("*** Extra compiler file has object mapped file '%s' => '%s'", qPrintable(inFile), qPrintable(objectMappedFile.join(' ')));
2347  }
2348 
2350  CustomBuildTool.CommandLine.clear();
2352  CustomBuildTool.Outputs.clear();
2355 
2356  for (int x = 0; x < extraCompilers.count(); ++x) {
2357  const QString &extraCompilerName = extraCompilers.at(x);
2358 
2359  if (!Project->verifyExtraCompiler(extraCompilerName, inFile) && !hasBuiltIn)
2360  continue;
2361 
2362  // All information about the extra compiler
2363  QString tmp_out = Project->project->first(ProKey(extraCompilerName + ".output")).toQString();
2364  QString tmp_cmd = Project->project->values(ProKey(extraCompilerName + ".commands")).join(' ');
2365  QString tmp_cmd_name = Project->project->values(ProKey(extraCompilerName + ".name")).join(' ');
2366  QStringList tmp_dep = Project->project->values(ProKey(extraCompilerName + ".depends")).toQStringList();
2367  QString tmp_dep_cmd = Project->project->values(ProKey(extraCompilerName + ".depend_command")).join(' ');
2368  const ProStringList &configs = Project->project->values(ProKey(extraCompilerName + ".CONFIG"));
2369  bool combined = configs.indexOf("combine") != -1;
2370 
2371  QString cmd, cmd_name, out;
2372  QStringList deps, inputs;
2373  // Variabel replacement of output name
2375  tmp_out, inFile, QString(), MakefileGenerator::NoShell), false);
2376 
2377  // If file has built-in compiler, we've swapped the input and output of
2378  // the command, as we in Visual Studio cannot have a Custom Buildstep on
2379  // a file which uses a built-in compiler. We would in this case only get
2380  // the result from the extra compiler. If 'hasBuiltIn' is true, we know
2381  // that we're actually on the _output_file_ of the result, and we
2382  // therefore swap inFile and out below, since the extra-compiler still
2383  // must see it as the original way. If the result also has a built-in
2384  // compiler, too bad..
2385  if (hasBuiltIn) {
2386  out = inFile;
2387  inFile = objectMappedFile;
2388  }
2389 
2390  // Dependency for the output
2391  if (!tmp_dep.isEmpty())
2392  deps = tmp_dep;
2393  if (!tmp_dep_cmd.isEmpty()) {
2394  Project->callExtraCompilerDependCommand(extraCompilerName, tmp_dep_cmd,
2395  inFile, out,
2396  true, // dep_lines
2397  &deps,
2398  configs.contains("dep_existing_only"),
2399  true /* checkCommandAvailability */);
2400  }
2401  for (int i = 0; i < deps.count(); ++i)
2402  deps[i] = Option::fixPathToTargetOS(
2404  deps.at(i), inFile, out, MakefileGenerator::NoShell),
2405  false);
2406  // Command for file
2407  if (combined) {
2408  // Add dependencies for each file
2409  const ProStringList &tmp_in = Project->project->values(ProKey(extraCompilerName + ".input"));
2410  for (int a = 0; a < tmp_in.count(); ++a) {
2411  const ProStringList &files = Project->project->values(tmp_in.at(a).toKey());
2412  for (int b = 0; b < files.count(); ++b) {
2413  QString file = files.at(b).toQString();
2414  deps += Project->findDependencies(file);
2415  inputs += Option::fixPathToTargetOS(file, false);
2416  }
2417  }
2418  deps = inputs + deps; // input files themselves too..
2419 
2420  // Replace variables for command w/all input files
2421  cmd = Project->replaceExtraCompilerVariables(tmp_cmd,
2422  inputs,
2423  QStringList(out),
2425  } else {
2426  deps.prepend(inFile); // input file itself too..
2427  cmd = Project->replaceExtraCompilerVariables(tmp_cmd,
2428  inFile,
2429  out,
2431  }
2432  // Name for command
2433  if (!tmp_cmd_name.isEmpty()) {
2435  tmp_cmd_name, inFile, out, MakefileGenerator::NoShell);
2436  } else {
2437  int space = cmd.indexOf(' ');
2438  if (space != -1)
2439  cmd_name = cmd.left(space);
2440  else
2441  cmd_name = cmd;
2442  cmd_name = cmd_name.trimmed();
2443  }
2444 
2445  // Fixify paths
2446  for (int i = 0; i < deps.count(); ++i)
2447  deps[i] = Option::fixPathToTargetOS(deps[i], false);
2448 
2449 
2450  // Output in info.additionalFile -----------
2452  CustomBuildTool.Description += ", ";
2453  CustomBuildTool.Description += cmd_name;
2455  int space = cmd.indexOf(' ');
2456  QFileInfo finf(cmd.left(space));
2460 
2462  // Make sure that all deps are only once
2463  QStringList uniqDeps;
2464  for (int c = 0; c < deps.count(); ++c) {
2465  QString aDep = deps.at(c);
2466  if (!aDep.isEmpty())
2467  uniqDeps << aDep;
2468  }
2469  uniqDeps.removeDuplicates();
2471  }
2472 
2473  // Ensure that none of the output files are also dependencies. Or else, the custom buildstep
2474  // will be rebuild every time, even if nothing has changed.
2475  for (const QString &output : qAsConst(CustomBuildTool.Outputs))
2476  CustomBuildTool.AdditionalDependencies.removeAll(output);
2477 
2479  return useCustomBuildTool;
2480 }
2481 
2482 // VCProjectSingleConfig --------------------------------------------
2484 {
2485  if (name == "Root Files")
2486  return RootFiles;
2487  if (name == "Source Files")
2488  return SourceFiles;
2489  if (name == "Header Files")
2490  return HeaderFiles;
2491  if (name == "Generated Files")
2492  return GeneratedFiles;
2493  if (name == "LexYacc Files")
2494  return LexYaccFiles;
2495  if (name == "Translation Files")
2496  return TranslationFiles;
2497  if (name == "Form Files")
2498  return FormFiles;
2499  if (name == "Resource Files")
2500  return ResourceFiles;
2501  if (name == "Deployment Files")
2502  return DeploymentFiles;
2503  if (name == "Distribution Files")
2504  return DistributionFiles;
2505  return filterForExtraCompiler(name);
2506 }
2507 
2509 {
2510  for (int i = 0; i < ExtraCompilersFiles.count(); ++i)
2511  if (ExtraCompilersFiles.at(i).Name == compilerName)
2512  return ExtraCompilersFiles.at(i);
2513 
2514  static VCFilter nullFilter;
2515  return nullFilter;
2516 }
2517 
2518 // Tree file generation ---------------------------------------------
2519 void TreeNode::generateXML(XmlOutput &xml, const QString &tagName, VCProject &tool, const QString &filter) {
2520  if (children.size()) {
2521  // Filter
2522  ChildrenMap::ConstIterator it, end = children.constEnd();
2523  if (!tagName.isEmpty()) {
2524  xml << tag("Filter")
2525  << attr("Name", tagName)
2526  << attr("Filter", "");
2527  }
2528  // First round, do nested filters
2529  for (it = children.constBegin(); it != end; ++it)
2530  if ((*it)->children.size())
2531  (*it)->generateXML(xml, it.key(), tool, filter);
2532  // Second round, do leafs
2533  for (it = children.constBegin(); it != end; ++it)
2534  if (!(*it)->children.size())
2535  (*it)->generateXML(xml, it.key(), tool, filter);
2536 
2537  if (!tagName.isEmpty())
2538  xml << closetag("Filter");
2539  } else {
2540  // Leaf
2541  VCProjectWriter::outputFileConfigs(tool, xml, info, filter);
2542  }
2543 }
2544 
2545 // Flat file generation ---------------------------------------------
2546 void FlatNode::generateXML(XmlOutput &xml, const QString &/*tagName*/, VCProject &tool, const QString &filter) {
2547  if (children.size()) {
2550  for (; it != end; ++it) {
2551  VCProjectWriter::outputFileConfigs(tool, xml, (*it), filter);
2552  }
2553  }
2554 }
2555 
2557 {
2558  xml << decl("1.0", "Windows-1252")
2560  << attrS(_ProjectType, "Visual C++")
2561  << attrS(_Version, tool.Version)
2562  << attrS(_Name, tool.Name)
2563  << attrS(_ProjectGUID, tool.ProjectGUID)
2564  << attrS(_Keyword, tool.Keyword)
2566  << attrS(_SccLocalPath, tool.SccLocalPath)
2567  << tag(_Platforms)
2568  << tag(_Platform)
2569  << attrS(_Name, tool.PlatformName)
2570  << closetag(_Platforms)
2571  << tag(_Configurations);
2572  write(xml, tool.Configuration);
2574  << tag(q_Files);
2575  // Add this configuration into a multi-config project, since that's where we have the flat/tree
2576  // XML output functionality
2577  VCProject tempProj;
2578  tempProj.SingleProjects += tool;
2579  outputFilter(tempProj, xml, "Source Files");
2580  outputFilter(tempProj, xml, "Header Files");
2581  outputFilter(tempProj, xml, "Generated Files");
2582  outputFilter(tempProj, xml, "LexYacc Files");
2583  outputFilter(tempProj, xml, "Translation Files");
2584  outputFilter(tempProj, xml, "Form Files");
2585  outputFilter(tempProj, xml, "Resource Files");
2586  outputFilter(tempProj, xml, "Deployment Files");
2587  outputFilter(tempProj, xml, "Distribution Files");
2588 
2589  QSet<QString> extraCompilersInProject;
2590  for (int i = 0; i < tool.ExtraCompilersFiles.count(); ++i) {
2591  const QString &compilerName = tool.ExtraCompilersFiles.at(i).Name;
2592  if (!extraCompilersInProject.contains(compilerName)) {
2593  extraCompilersInProject += compilerName;
2594  tempProj.ExtraCompilers += compilerName;
2595  }
2596  }
2597 
2598  for (int x = 0; x < tempProj.ExtraCompilers.count(); ++x) {
2599  outputFilter(tempProj, xml, tempProj.ExtraCompilers.at(x));
2600  }
2601  outputFilter(tempProj, xml, "Root Files");
2602  xml << closetag(q_Files)
2603  << tag(_Globals)
2604  << data(); // No "/>" end tag
2605 }
2606 
2608 {
2609  if (tool.SingleProjects.count() == 0) {
2610  warn_msg(WarnLogic, "Generator: .NET: no single project in merge project, no output");
2611  return;
2612  }
2613 
2614  xml << decl("1.0", "Windows-1252")
2616  << attrS(_ProjectType, "Visual C++")
2617  << attrS(_Version, tool.Version)
2618  << attrS(_Name, tool.Name)
2619  << attrS(_ProjectGUID, tool.ProjectGUID)
2620  << attrS(_Keyword, tool.Keyword)
2622  << attrS(_SccLocalPath, tool.SccLocalPath)
2623  << tag(_Platforms)
2624  << tag(_Platform)
2625  << attrS(_Name, tool.PlatformName)
2626  << closetag(_Platforms)
2627  << tag(_Configurations);
2628  // Output each configuration
2629  for (int i = 0; i < tool.SingleProjects.count(); ++i)
2632  << tag(q_Files);
2633  outputFilter(tool, xml, "Source Files");
2634  outputFilter(tool, xml, "Header Files");
2635  outputFilter(tool, xml, "Generated Files");
2636  outputFilter(tool, xml, "LexYacc Files");
2637  outputFilter(tool, xml, "Translation Files");
2638  outputFilter(tool, xml, "Form Files");
2639  outputFilter(tool, xml, "Resource Files");
2640  outputFilter(tool, xml, "Deployment Files");
2641  outputFilter(tool, xml, "Distribution Files");
2642  for (int x = 0; x < tool.ExtraCompilers.count(); ++x) {
2643  outputFilter(tool, xml, tool.ExtraCompilers.at(x));
2644  }
2645  outputFilter(tool, xml, "Root Files");
2646  xml << closetag(q_Files)
2647  << tag(_Globals)
2648  << data(); // No "/>" end tag
2649 }
2650 
2652 {
2653  xml << tag(_Tool)
2667  << attrT(_CompileOnly, tool.CompileOnly)
2678  << attrE(_FavorSizeOrSpeed, tool.FavorSizeOrSpeed, /*ifNot*/ favorNone)
2679 
2682 
2691  << attrT(_KeepComments, tool.KeepComments)
2693  << attrS(_ObjectFile, tool.ObjectFile)
2695  << attrT(_OpenMP, tool.OpenMP)
2696  << attrE(_Optimization, tool.Optimization, /*ifNot*/ optimizeDefault)
2699  << attrS(_OutputFile, tool.OutputFile)
2704  << attrE(_RuntimeLibrary, tool.RuntimeLibrary, /*ifNot*/ rtUnknown)
2706  << attrT(_ShowIncludes, tool.ShowIncludes)
2716  << attrT(_WarnAsError, tool.WarnAsError)
2721 
2722  << closetag(_Tool);
2723 }
2724 
2726 {
2727  xml << tag(_Tool)
2733  << attrS(_BaseAddress, tool.BaseAddress)
2742  << attrL(_HeapCommitSize, tool.HeapCommitSize, /*ifNot*/ -1)
2743  << attrL(_HeapReserveSize, tool.HeapReserveSize, /*ifNot*/ -1)
2750  << attrT(_LinkDLL, tool.LinkDLL)
2754  << attrT(_MapExports, tool.MapExports)
2755  << attrS(_MapFileName, tool.MapFileName)
2756  << attrT(_MapLines, tool.MapLines)
2763  << attrS(_OutputFile, tool.OutputFile)
2768  << attrT(_SetChecksum, tool.SetChecksum)
2769  << attrE(_ShowProgress, tool.ShowProgress, /*ifNot*/ linkProgressNotSet)
2770  << attrL(_StackCommitSize, tool.StackCommitSize, /*ifNot*/ -1)
2771  << attrL(_StackReserveSize, tool.StackReserveSize, /*ifNot*/ -1)
2773  << attrE(_SubSystem, tool.SubSystem)
2778  << attrE(_TargetMachine, tool.TargetMachine, /*ifNot*/ machineNotSet)
2783  << attrS(_Version, tool.Version)
2785  << closetag(_Tool);
2786 }
2787 
2789 {
2790  xml << tag(_Tool)
2793  << closetag(_Tool);
2794 }
2795 
2797 {
2798  xml << tag(_Tool)
2799  << attrS(_Name, _VCMIDLTool)
2828  << attrT(_WarnAsError, tool.WarnAsError)
2829  << attrE(_WarningLevel, tool.WarningLevel)
2830  << closetag(_Tool);
2831 }
2832 
2834 {
2835  xml << tag(_Tool)
2836  << attrS(_Name, tool.ToolName)
2838  << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator()))
2839  << attrS(_Description, tool.Description)
2840  << attrX(_Outputs, tool.Outputs, ";")
2841  << attrS(_Path, tool.ToolPath)
2842  << closetag(_Tool);
2843 }
2844 
2846 {
2847  xml
2848  << tag(_Tool)
2858  << attrS(_OutputFile, tool.OutputFile)
2860  << closetag(_Tool);
2861 }
2862 
2864 {
2865  xml
2866  << tag(_Tool)
2868  << attrS(_Path, tool.ToolPath)
2871  << attrE(_Culture, tool.Culture, /*ifNot*/ rcUseDefault)
2876  << attrE(_ShowProgress, tool.ShowProgress, /*ifNot*/ linkProgressNotSet)
2877  << closetag(_Tool);
2878 }
2879 
2881 {
2882  xml
2883  << tag(_Tool)
2884  << attrS(_Name, tool.ToolName)
2885  << attrS(_Path, tool.ToolPath)
2886  << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator()))
2887  << attrS(_Description, tool.Description)
2889  << closetag(_Tool);
2890 }
2891 
2893 {
2894  if (tool.AdditionalFiles.isEmpty())
2895  return;
2896  xml << tag(tool.DeploymentTag)
2900  << closetag(tool.DeploymentTag);
2901 }
2902 
2904 {
2905  Q_UNUSED(xml);
2906  Q_UNUSED(tool);
2907 }
2908 
2910 {
2911  xml << tag(_Configuration)
2912  << attrS(_Name, tool.Name)
2916  << attrE(_CharacterSet, tool.CharacterSet, /*ifNot*/ charSetNotSet)
2924  << attrE(_UseOfATL, tool.UseOfATL, /*ifNot*/ useATLNotSet)
2925  << attrE(_UseOfMfc, tool.UseOfMfc)
2927  write(xml, tool.compiler);
2929  write(xml, tool.librarian);
2930  else
2931  write(xml, tool.linker);
2932  write(xml, tool.manifestTool);
2933  write(xml, tool.idl);
2934  write(xml, tool.postBuild);
2935  write(xml, tool.preBuild);
2936  write(xml, tool.preLink);
2937  write(xml, tool.resource);
2938  write(xml, tool.deployment);
2940 }
2941 
2943 {
2944  if(!tool.Files.count())
2945  return;
2946 
2947  if (!tool.Name.isEmpty()) {
2948  xml << tag(_Filter)
2949  << attrS(_Name, tool.Name)
2950  << attrS(_Filter, tool.Filter)
2951  << attrS(_UniqueIdentifier, tool.Guid)
2952  << attrT(_ParseFiles, tool.ParseFiles);
2953  }
2954  for (int i = 0; i < tool.Files.count(); ++i) {
2955  const VCFilterFile &info = tool.Files.at(i);
2956  xml << tag(q_File)
2958  << data(); // In case no custom builds, to avoid "/>" endings
2959  outputFileConfig(tool, xml, tool.Files.at(i).file);
2960  xml << closetag(q_File);
2961  }
2962  if (!tool.Name.isEmpty())
2963  xml << closetag(_Filter);
2964 }
2965 
2966 // outputs a given filter for all existing configurations of a project
2967 void VCProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, const QString &filtername)
2968 {
2969  QScopedPointer<Node> root;
2970  if (project.SingleProjects.at(0).flat_files)
2971  root.reset(new FlatNode);
2972  else
2973  root.reset(new TreeNode);
2974 
2975  QString name, extfilter, guid;
2976  triState parse = unset;
2977 
2978  for (int i = 0; i < project.SingleProjects.count(); ++i) {
2979  const VCFilter filter = project.SingleProjects.at(i).filterByName(filtername);
2980 
2981  // Merge all files in this filter to root tree
2982  for (int x = 0; x < filter.Files.count(); ++x)
2983  root->addElement(filter.Files.at(x));
2984 
2985  // Save filter setting from first filter. Next filters
2986  // may differ but we cannot handle that. (ex. extfilter)
2987  if (name.isEmpty()) {
2988  name = filter.Name;
2989  extfilter = filter.Filter;
2990  parse = filter.ParseFiles;
2991  guid = filter.Guid;
2992  }
2993  }
2994 
2995  if (!root->hasElements())
2996  return;
2997 
2998  // Actual XML output ----------------------------------
2999  if (!name.isEmpty()) {
3000  xml << tag(_Filter)
3001  << attrS(_Name, name)
3002  << attrS(_Filter, extfilter)
3003  << attrS(_UniqueIdentifier, guid)
3004  << attrT(_ParseFiles, parse);
3005  }
3006  root->generateXML(xml, "", project, filtername); // output root tree
3007  if (!name.isEmpty())
3008  xml << closetag(_Filter);
3009 }
3010 
3011 // Output all configurations (by filtername) for a file (by info)
3012 // A filters config output is in VCFilter.outputFileConfig()
3013 void VCProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, const VCFilterFile &info, const QString &filtername)
3014 {
3015  xml << tag(q_File)
3017  for (int i = 0; i < project.SingleProjects.count(); ++i) {
3018  VCFilter filter = project.SingleProjects.at(i).filterByName(filtername);
3019  if (filter.Config) // only if the filter is not empty
3020  outputFileConfig(filter, xml, info.file);
3021  }
3022  xml << closetag(q_File);
3023 }
3024 
3025 void VCProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, const QString &filename)
3026 {
3027  // Clearing each filter tool
3028  filter.useCustomBuildTool = false;
3029  filter.useCompilerTool = false;
3030  filter.CustomBuildTool = VCCustomBuildTool();
3031  filter.CompilerTool = VCCLCompilerTool();
3032 
3033  // Unset some default options
3034  filter.CustomBuildTool.config = filter.Config;
3035  filter.CompilerTool.BufferSecurityCheck = unset;
3036  filter.CompilerTool.DebugInformationFormat = debugUnknown;
3037  filter.CompilerTool.ExceptionHandling = ehDefault;
3038  filter.CompilerTool.GeneratePreprocessedFile = preprocessUnknown;
3039  filter.CompilerTool.Optimization = optimizeDefault;
3040  filter.CompilerTool.ProgramDataBaseFileName.clear();
3041  filter.CompilerTool.RuntimeLibrary = rtUnknown;
3042  filter.CompilerTool.WarningLevel = warningLevelUnknown;
3043  filter.CompilerTool.config = filter.Config;
3044 
3045  bool inBuild;
3046  VCFilterFile info = filter.findFile(filename, &inBuild);
3047  inBuild &= !info.excludeFromBuild;
3048 
3049  if (inBuild) {
3050  filter.addExtraCompiler(info);
3051  if(filter.Project->usePCH)
3052  filter.modifyPCHstage(info.file);
3053  } else {
3054  // Excluded files uses an empty compiler stage
3055  if(info.excludeFromBuild)
3056  filter.useCompilerTool = true;
3057  }
3058 
3059  // Actual XML output ----------------------------------
3060  if (filter.useCustomBuildTool || filter.useCompilerTool || !inBuild) {
3062  << attr(_Name, filter.Config->Name)
3063  << (!inBuild ? attrS(_ExcludedFromBuild, "true") : noxml());
3064  if (filter.useCustomBuildTool)
3065  filter.Project->projectWriter->write(xml, filter.CustomBuildTool);
3066  if (filter.useCompilerTool)
3067  filter.Project->projectWriter->write(xml, filter.CompilerTool);
3069  }
3070 }
3071 
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
FT_UInt idx
Definition: cffcmap.c:135
void generateXML(XmlOutput &xml, const QString &tagName, VCProject &proj, const QString &filter) override
virtual QStringList & findDependencies(const QString &file)
Definition: makefile.cpp:3189
void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &tmp_dep_cmd, const QString &inpf, const QString &tmp_out, bool dep_lines, QStringList *deps, bool existingDepsOnly, bool checkCommandAvailability=false)
Definition: makefile.cpp:1883
bool verifyExtraCompiler(const ProString &c, const QString &f)
Definition: makefile.cpp:1721
QMakeProject * project
Definition: makefile.h:139
edge_iterator end() const
Definition: lalr.h:176
ALWAYS_INLINE ProKey & toKey()
Definition: proitems.h:163
QString toQString() const
Definition: proitems.cpp:153
ALWAYS_INLINE QStringView toQStringView() const
Definition: proitems.h:161
int indexOf(const QString &s, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: proitems.h:145
QString join(const ProString &sep) const
Definition: proitems.cpp:359
bool contains(const ProString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: proitems.cpp:434
QStringList toQStringList() const
Definition: proitems.cpp:425
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:85
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:57
QString path() const
Definition: qfileinfo.cpp:634
T value(const Key &key) const noexcept
Definition: qhash.h:997
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
iterator Iterator
Definition: qlist.h:279
const_reference at(qsizetype i) const noexcept
Definition: qlist.h:457
qsizetype count() const noexcept
Definition: qlist.h:415
ProString first(const ProKey &variableName) const
ProStringList & values(const ProKey &v)
Definition: project.h:63
const_iterator ConstIterator
Definition: qmap.h:670
const_iterator constBegin() const
Definition: qmap.h:635
size_type size() const
Definition: qmap.h:302
const_iterator constEnd() const
Definition: qmap.h:639
The QRegularExpression class provides pattern matching using regular expressions.
QRegularExpressionMatch match(const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
bool contains(const T &value) const
Definition: qset.h:107
The QString class provides a Unicode character string.
Definition: qstring.h:388
void chop(qsizetype n)
Definition: qstring.cpp:5955
void clear()
Definition: qstring.h:1240
bool isNull() const
Definition: qstring.h:1078
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:5143
bool isEmpty() const
Definition: qstring.h:1216
static QString number(int, int base=10)
Definition: qstring.cpp:7538
QString left(qsizetype n) const
Definition: qstring.cpp:4951
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:4197
QString trimmed() const &
Definition: qstring.h:623
qsizetype length() const
Definition: qstring.h:415
The QStringList class provides a list of strings.
The QStringView class provides a unified view on UTF-16 strings with a read-only subset of the QStrin...
Definition: qstringview.h:122
constexpr QStringView left(qsizetype n) const noexcept
Definition: qstringview.h:267
int toInt(bool *ok=nullptr, int base=10) const
Definition: qstring.h:1176
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
Definition: qstringview.h:261
void generateXML(XmlOutput &xml, const QString &tagName, VCProject &tool, const QString &filter) override
triState TurnOffAssemblyGeneration
QStringList ForcedUsingFiles
QStringList AdditionalOptions
triState GlobalOptimizations
triState EnableIntrinsicFunctions
triState EnableFunctionLevelLinking
VCConfiguration * config
QString ProgramDataBaseFileName
debugOption DebugInformationFormat
pchOption UsePrecompiledHeader
ProcessorOptimizeOption OptimizeForProcessor
triState OptimizeForWindowsApplication
browseInfoOption BrowseInformation
QStringList AdditionalUsingDirectories
optimizeOption Optimization
compileAsManagedOptions CompileAsManaged
callingConventionOption CallingConvention
QStringList TreatSpecificWarningsAsErrors
triState FloatingPointExceptions
triState UseUnicodeForAssemblerListing
bool parseOption(const char *option) override
QString XMLDocumentationFileName
floatingPointModel FloatingPointModel
triState TreatWChar_tAsBuiltInType
asmListingOption AssemblerOutput
triState ExpandAttributedSource
QStringList PreprocessorDefinitions
triState PreprocessSuppressLineNumbers
inlineExpansionOption InlineFunctionExpansion
triState GenerateXMLDocumentationFiles
QStringList DisableSpecificWarnings
favorSizeOrSpeedOption FavorSizeOrSpeed
triState IgnoreStandardIncludePath
triState OmitFramePointers
QString MultiProcessorCompilationProcessorCount
triState ForceConformanceInForLoopScope
triState EnableFiberSafeOptimizations
enhancedInstructionSetOption EnableEnhancedInstructionSet
useOfArchitecture CompileForArchitecture
QStringList UndefinePreprocessorDefinitions
triState CreateHotpatchableImage
triState WholeProgramOptimization
exceptionHandling ExceptionHandling
triState ImproveFloatingPointConsistency
QString AssemblerListingLocation
runtimeLibraryOption RuntimeLibrary
QString BrowseInformationFile
QString PrecompiledHeaderThrough
triState DisableLanguageExtensions
triState Detect64BitPortabilityProblems
QString PrecompiledHeaderFile
triState SuppressStartupBanner
QStringList AdditionalIncludeDirectories
warningLevelOption WarningLevel
CompileAsOptions CompileAs
QString PreprocessOutputPath
QStringList ForcedIncludeFiles
triState BufferSecurityCheck
preprocessOption GeneratePreprocessedFile
triState MultiProcessorCompilation
structMemberAlignOption StructMemberAlignment
triState OmitDefaultLibName
basicRuntimeCheckOption BasicRuntimeChecks
triState UndefineAllPreprocessorDefinitions
VCResourceCompilerTool resource
ConfigurationTypes ConfigurationType
VCPreBuildEventTool preBuild
VCLibrarianTool librarian
triState WholeProgramOptimization
VCLinkerTool linker
VCManifestTool manifestTool
triState BuildBrowserInformation
triState ATLMinimizesCRunTimeLibraryUsage
VCPostBuildEventTool postBuild
QString IntermediateDirectory
QString DeleteExtensionsOnClean
VCDeploymentTool deployment
VCCLCompilerTool compiler
VCPreLinkEventTool preLink
QStringList AdditionalDependencies
QStringList CommandLine
RegisterDeployOption RegisterOutput
QStringList CommandLine
VCEventTool(const QString &eventName)
QString Description
triState ExcludedFromBuild
bool useCompilerTool
triState ParseFiles
void modifyPCHstage(QString str)
QString Filter
bool addExtraCompiler(const VCFilterFile &info)
bool useCustomBuildTool
VcprojGenerator * Project
VCCustomBuildTool CustomBuildTool
void addFiles(const QStringList &fileList)
VCConfiguration * Config
QList< VCFilterFile > Files
VCCLCompilerTool CompilerTool
VCFilterFile findFile(const QString &filePath, bool *found) const
QString Name
QString Guid
void addFile(const QString &filename)
QStringList ForceSymbolReferences
triState IgnoreAllDefaultLibraries
QString ModuleDefinitionFile
QStringList ExportNamedFunctions
QStringList AdditionalLibraryDirectories
QStringList IgnoreDefaultLibraryNames
triState SuppressStartupBanner
QStringList AdditionalOptions
QStringList AdditionalDependencies
triState IgnoreAllDefaultLibraries
qlonglong StackCommitSize
triState GenerateManifest
triState ImageHasSafeExceptionHandlers
linkIncrementalType LinkIncremental
qlonglong StackReserveSize
QString MergedIDLBaseFileName
QStringList AdditionalDependencies
triState IgnoreImportLibrary
QString WindowsMetadataFile
QString TypeLibraryFile
QString ManifestFile
triState ResourceOnlyDLL
QString ProgramDatabaseFile
QString FunctionOrder
triState RegisterOutput
optLinkTimeCodeGenType LinkTimeCodeGeneration
QStringList DelayLoadDLLs
VCConfiguration * config
qlonglong HeapCommitSize
triState AllowIsolation
triState UACUIAccess
triState IgnoreEmbeddedIDL
qlonglong HeapReserveSize
triState GenerateMapFile
QStringList IgnoreDefaultLibraryNames
triState DelaySign
optRefType OptimizeReferences
QStringList AdditionalOptions
optFoldingType EnableCOMDATFolding
QString UACExecutionLevel
linkProgressOption ShowProgress
optWin98Type OptimizeForWindows98
bool parseOption(const char *option) override
QString MergeSections
triState TreatWarningsAsErrors
machineTypeOption TargetMachine
QString MidlCommandFile
triState DataExecutionPrevention
triState SwapRunFromCD
triState PreventDllBinding
addressAwarenessType LargeAddressAware
QString CLRThreadAttribute
triState SetChecksum
QString StripPrivateSymbols
triState TurnOffAssemblyGeneration
QString ImportLibrary
QStringList AssemblyLinkResource
triState AssemblyDebug
triState SuppressStartupBanner
triState RandomizedBaseAddress
QString LinkToManagedResourceFile
qlonglong SectionAlignment
triState MapExports
triState EnableUAC
QString ModuleDefinitionFile
QString CLRImageType
triState GenerateWindowsMetadata
QString KeyContainer
linkerDebugOption DebugInfoOption
QStringList ForceSymbolReferences
QStringList AddModuleNamesToAssembly
triState SwapRunFromNet
triState SupportUnloadOfDelayLoadedDLL
triState CLRUnmanagedCodeCheck
QString CLRSupportLastError
qlonglong TypeLibraryResourceID
QStringList AdditionalManifestDependencies
QString EntryPointSymbol
termSvrAwarenessType TerminalServerAware
QStringList AdditionalLibraryDirectories
triState GenerateDebugInformation
subSystemOption SubSystem
QString LinkErrorReporting
bool parseOption(const char *option) override
QStringList AdditionalOptions
midlStructMemberAlignOption StructMemberAlignment
triState GenerateTypeLibrary
QStringList PreprocessorDefinitions
QString ClientStubFile
triState SuppressCompilerWarnings
QString RedirectOutputAndErrors
triState ErrorCheckAllocations
triState ValidateParameters
triState IgnoreStandardIncludePath
QStringList AdditionalIncludeDirectories
triState ApplicationConfigurationMode
QString GenerateClientFiles
triState SuppressStartupBanner
triState ErrorCheckStubData
QString TypeLibraryName
triState ValidateAllParameters
triState WarnAsError
midlErrorCheckOption EnableErrorChecks
QString InterfaceIdentifierFileName
QStringList UndefinePreprocessorDefinitions
triState MkTypLibCompatible
midlWarningLevelOption WarningLevel
QStringList CPreprocessOptions
triState ErrorCheckRefPointers
QString ProxyFileName
triState ErrorCheckEnumRange
QStringList FullIncludePath
QString ServerStubFile
triState GenerateStublessProxies
QString OutputDirectory
QString HeaderFileName
QString TypeLibFormat
midlTargetEnvironment TargetEnvironment
QString GenerateServerFiles
QString DLLDataFileName
midlCharOption DefaultCharType
VCConfiguration * config
triState ErrorCheckBounds
triState EmbedManifest
bool parseOption(const char *option) override
VCPostBuildEventTool()
QList< VCProjectSingleConfig > SingleProjects
QString ProjectGUID
QString SccLocalPath
QString PlatformName
QStringList ExtraCompilers
QString SccProjectName
const VCFilter & filterByName(const QString &name) const
const VCFilter & filterForExtraCompiler(const QString &compilerName) const
VCFilterList ExtraCompilersFiles
VCConfiguration Configuration
friend class TreeNode
virtual void write(XmlOutput &, VCProjectSingleConfig &)
enumResourceLangID Culture
QStringList AdditionalIncludeDirectories
QStringList PreprocessorDefinitions
linkProgressOption ShowProgress
static QStringList fixCommandLine(const QString &input)
bool autogenPrecompSource
Definition: msvc_vcproj.h:62
QHash< QString, QStringList > extraCompilerSources
Definition: msvc_vcproj.h:65
QString precompHFilename
Definition: msvc_vcproj.h:60
QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &, ReplaceFor) override
QString precompSource
Definition: msvc_vcproj.h:60
QHash< QString, QString > extraCompilerOutputs
Definition: msvc_vcproj.h:66
static bool hasBuiltinCompiler(const QString &file)
const QString customBuildToolFilterFileSuffix
Definition: msvc_vcproj.h:67
QString precompH
Definition: msvc_vcproj.h:60
QString str
[2]
QStyleOptionButton opt
bool parse()
int const char * version
Definition: zlib.h:814
backing_store_ptr info
[4]
Definition: jmemsys.h:161
const char _TerminalServerAware[]
const char _BrowseInformation[]
const char _TypeLibraryResourceID[]
const char _MergedIDLBaseFileName[]
const char _StripPrivateSymbols[]
const char _OmitFramePointers[]
const char _WarnAsError[]
const char _WarningLevel[]
const char _LargeAddressAware[]
const char _Keyword[]
const char _DelayLoadDLLs[]
const char _EntryPointSymbol[]
const char _OptimizeForProcessor[]
const char _HeapReserveSize[]
const char _ResourceOutputFileName[]
const char _OpenMP[]
const char _PrecompiledHeaderThrough[]
const char _SwapRunFromNet[]
XmlOutput::xml_output attrL(const char *name, qint64 v)
const char _SwapRunFromCD[]
const char _ProgramDataBaseFileName[]
const char _ShowProgress[]
const char _StackCommitSize[]
const char q_File[]
const char _TurnOffAssemblyGeneration[]
const char _AddModuleNamesToAssembly[]
const char _AssemblerListingLocation[]
const char _DeleteExtensionsOnClean[]
const char _TargetMachine[]
const char _MinimalRebuild[]
const char _EnableErrorChecks[]
XmlOutput::xml_output xformUsePrecompiledHeaderForNET2005(pchOption whatPch, DotNET compilerVersion)
const char _IgnoreStandardIncludePath[]
const char _VCCustomBuildTool[]
const char _RedirectOutputAndErrors[]
const char _ExportNamedFunctions[]
const char _DebugInformationFormat[]
const char _Configuration[]
const char _StackReserveSize[]
const char _IgnoreEmbeddedIDL[]
const char _OptimizeForWindowsApplication[]
const char _ImportLibrary[]
const char q_Files[]
const char _AdditionalUsingDirectories[]
const char _HeapCommitSize[]
const char _FullIncludePath[]
const char _SmallerTypeCheck[]
const char _VCResourceCompilerTool[]
const char _Culture[]
const char _MapFileName[]
const char _Version[]
const char _VCMIDLTool[]
const char _EnableIntrinsicFunctions[]
const char _SubSystem[]
const char _GenerateStublessProxies[]
const char _CompileOnly[]
const char _CharacterSet[]
const char _ErrorCheckStubData[]
const char _FloatingPointModel[]
const char _PrecompiledHeaderFile[]
const char _HeaderFileName[]
const char _DataExecutionPrevention[]
const char _OutputDirectory[]
const char _CPreprocessOptions[]
const char _UsePrecompiledHeader[]
const char _CommandLine[]
const char _UseOfATL[]
const char _GenerateManifest[]
const char _UndefineAllPreprocessorDefinitions[]
const char _BuildBrowserInformation[]
const char _Description[]
const char _Platforms[]
const char _GenerateMapFile[]
const char _ProgramDatabaseFile[]
XmlOutput::xml_output attrT(const char *name, const triState v)
const char _AdditionalDependencies[]
const char _ExceptionHandling[]
const char _ErrorCheckEnumRange[]
const char _TreatWChar_tAsBuiltInType[]
const char _Optimization[]
const char _ExcludedFromBuild[]
const char _PreprocessorDefinitions[]
const char _AdditionalFiles[]
const char _ErrorCheckRefPointers[]
const char _ObjectFile[]
const char _ProgramDatabase[]
const char _EnableFiberSafeOptimizations[]
const char _EnableEnhancedInstructionSet[]
const char _TargetEnvironment[]
const char _VCLibrarianTool[]
const char _SccProjectName[]
const char _EnableCOMDATFolding[]
const char _GenerateTypeLibrary[]
const char _LinkToManagedResourceFile[]
const char _LinkIncremental[]
XmlOutput::xml_output attrS(const char *name, const QString &v)
const char _ErrorCheckAllocations[]
const char _AdditionalOptions[]
const char _InlineFunctionExpansion[]
const char _FileConfiguration[]
const char _SupportUnloadOfDelayLoadedDLL[]
const char _UndefinePreprocessorDefinitions[]
const char _TypeLibraryFile[]
const char _BaseAddress[]
const char _BrowseInformationFile[]
const char _AdditionalIncludeDirectories[]
const char _InterfaceIdentifierFileName[]
const char _IntermediateDirectory[]
const char _EmbedManifest[]
const char _MapExports[]
const char _ForcedUsingFiles[]
const char _OutputFile[]
const char _ImproveFloatingPointConsistency[]
const char _SetChecksum[]
const char _TypeLibraryName[]
const char _OptimizeForWindows98[]
const char _FavorSizeOrSpeed[]
const char _StructMemberAlignment[]
const char _RegisterOutput[]
const char _CompileForArchitecture[]
const char _AssemblerOutput[]
const char _Platform[]
const char _SccLocalPath[]
const char _AdditionalLibraryDirectories[]
const char _ValidateParameters[]
const char _SuppressStartupBanner[]
const char _ForcedIncludeFiles[]
XmlOutput::xml_output xformExceptionHandlingNET2005(exceptionHandling eh, DotNET compilerVersion)
XmlOutput::xml_output attrX(const char *name, const QStringList &v, const char *s=",")
const char _LinkDLL[]
const char _DLLDataFileName[]
const char _CallingConvention[]
const char _GeneratePreprocessedFile[]
const char _OptimizeReferences[]
triState operator!(const triState &rhs)
const char _MergeSections[]
const char _PrimaryOutput[]
const char _Filter[]
const char _Name[]
const char _UniqueIdentifier[]
const char _IgnoreImportLibrary[]
const char _ProjectGUID[]
const char _ATLMinimizesCRunTimeLibraryUsage[]
const char _StringPooling[]
const char _RelativePath[]
const char _VisualStudioProject[]
const char _RuntimeLibrary[]
const char _Detect64BitPortabilityProblems[]
const char _CompileAs[]
const char _VCManifestTool[]
const char _ShowIncludes[]
const char _EnableFunctionLevelLinking[]
const char _MapLines[]
const char _Outputs[]
const char _DefaultCharType[]
const char _ResourceOnlyDLL[]
XmlOutput::xml_output attrE(const char *name, int v)
const char _LinkTimeCodeGeneration[]
const char _ProxyFileName[]
const char _MidlCommandFile[]
QT_BEGIN_NAMESPACE DotNET vsVersionFromString(const ProString &versionString)
const char _IgnoreDefaultLibraryNames[]
const char _KeepComments[]
const char _RemoteDirectory[]
const char _GenerateDebugInformation[]
const char _Configurations[]
const char _ExpandAttributedSource[]
const char _ForceSymbolReferences[]
const char _FunctionOrder[]
const char _InterworkCalls[]
const char _Globals[]
const char _UseOfMfc[]
const char _WholeProgramOptimization[]
const char _ErrorCheckBounds[]
const char _FloatingPointExceptions[]
const char _DisableLanguageExtensions[]
const char _RandomizedBaseAddress[]
const char _ParseFiles[]
const char _BasicRuntimeChecks[]
const char _VCCLCompilerTool[]
const char _Path[]
const char _ConfigurationType[]
const char _IgnoreAllDefaultLibraries[]
const char _Tool[]
const char _GlobalOptimizations[]
const char _RuntimeTypeInfo[]
const char _ProjectType[]
const char _CompileAsManaged[]
const char _ForceConformanceInForLoopScope[]
const char _ModuleDefinitionFile[]
const char _BufferSecurityCheck[]
const char _DisableSpecificWarnings[]
const char _VCLinkerTool[]
const char _MkTypLibCompatible[]
@ typeStaticLibrary
@ typeApplication
@ asmListingAsmMachine
@ asmListingAssemblyOnly
@ asmListingNone
@ asmListingAsmMachineSrc
@ asmListingAsmSrc
triState
@ _False
@ _True
@ unset
@ expandDisable
@ expandDefault
@ expandOnlyInline
@ expandAnySuitable
@ midlDisableAll
@ midlEnableAll
@ midlEnableCustom
@ linkIncrementalNo
@ linkIncrementalYes
@ linkIncrementalDefault
@ managedAssemblyPure
@ managedAssemblyOldSyntax
@ managedAssemblySafe
@ managedDefault
@ managedAssembly
@ optWin98Yes
@ optWin98Default
@ optWin98No
@ procOptimizePentiumProAndAbove
@ procOptimizePentium4AndAbove
@ procOptimizeBlended
@ procOptimizePentium
@ favorSpeed
@ favorSize
@ favorNone
@ midlAlignFourBytes
@ midlAlignTwoBytes
@ midlAlignNotSet
@ midlAlignSixteenBytes
@ midlAlignEightBytes
@ midlAlignSingleByte
@ rcUseDefault
pchOption
@ pchCreateUsingSpecific
@ pchUseUsingSpecific
@ pchUnset
@ pchGenerateAuto
@ pchNone
@ useMfcStdWin
DotNET
@ NET2015
@ NET2003
@ NET2005
@ NET2002
@ NET2008
@ NET2013
@ NET2022
@ NET2012
@ NET2017
@ NET2010
@ NETUnknown
@ NET2019
@ brAllInfo
@ brNoLocalSymbols
@ brInfoNone
@ subSystemConsole
@ subSystemNotSet
@ subSystemWindows
@ registerNo
@ preprocessUnknown
@ preprocessYes
@ preprocessNo
@ linkerDebugOptionNone
@ linkerDebugOptionFastLink
@ midlTargetWin32
@ midlTargetNotSet
@ midlTargetWin64
@ alignNotSet
@ alignSixteenBytes
@ alignTwoBytes
@ alignEightBytes
@ alignFourBytes
@ alignSingleByte
@ rtMultiThreadedDLL
@ rtMultiThreadedDebugDLL
@ rtMultiThreadedDebug
@ rtUnknown
@ rtMultiThreaded
@ rtSingleThreaded
@ rtSingleThreadedDebug
@ midlCharUnsigned
@ midlCharAscii7
@ midlCharSigned
@ optimizeDisabled
@ optimizeMaxSpeed
@ optimizeDefault
@ optimizeCustom
@ optimizeFull
@ optimizeMinSpace
@ linkProgressLibs
@ linkProgressAll
@ linkProgressNotSet
@ archNotSet
@ archSSE2
@ archSSE
@ debugOldStyleInfo
@ debugLineInfoOnly
@ debugEditAndContinue
@ debugDisabled
@ debugEnabled
@ debugUnknown
@ floatingPointPrecise
@ floatingPointFast
@ floatingPointNotSet
@ floatingPointStrict
@ charSetNotSet
@ optReferences
@ optNoReferences
@ optReferencesDefault
basicRuntimeCheckOption
@ runtimeBasicCheckAll
@ runtimeCheckStackFrame
@ runtimeCheckUninitVariables
@ runtimeBasicCheckNone
@ optNoFolding
@ optFoldingDefault
@ optFolding
@ addrAwareNoLarge
@ addrAwareLarge
@ addrAwareDefault
@ machineX64
@ machineNotSet
@ machineX86
exceptionHandling
@ ehNone
@ ehNoSEH
@ ehSEH
@ ehDefault
@ useATLNotSet
@ archUnknown
@ archArmv5
@ archArmv5T
@ archMips16
@ archMips2
@ archMips5
@ archMips1
@ archArmv4T
@ archArmv4
@ archMips32
@ archMips64
@ archMips3
@ archMips4
@ compileAsDefault
@ compileAsCPlusPlus
@ compileAsC
@ optLTCGDefault
@ optLTCGEnabled
@ optLTCGOptimize
@ optLTCGInstrument
@ optLTCGUpdate
@ warningLevelUnknown
@ warningLevel_2
@ warningLevel_4
@ warningLevel_3
@ warningLevel_1
@ warningLevel_0
@ midlWarningLevel_1
@ midlWarningLevel_4
@ midlWarningLevel_3
@ midlWarningLevel_2
@ midlWarningLevel_0
@ callConventionStdCall
@ callConventionDefault
@ callConventionFastCall
@ callConventionCDecl
@ termSvrAwareNo
@ termSvrAwareDefault
@ termSvrAwareYes
void warn_msg(QMakeWarn type, const char *fmt,...)
Definition: option.cpp:565
#define QString()
Definition: parse-defines.h:51
int PRIV() strcmp(PCRE2_SPTR str1, PCRE2_SPTR str2)
int PRIV() strncmp(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len)
PCRE2_SIZE PRIV() strlen(PCRE2_SPTR str)
Q_CORE_EXPORT int qstricmp(const char *, const char *)
#define Q_FALLTHROUGH()
QList< QString > QStringList
Definition: qcontainerfwd.h:64
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
Definition: qglobal.h:332
unsigned int uint
Definition: qglobal.h:334
long long qint64
Definition: qglobal.h:298
#define qWarning
Definition: qlogging.h:179
@ WarnLogic
Definition: option.h:51
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
const GLfloat * m
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLuint end
GLfloat GLfloat f
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLboolean GLboolean g
GLuint name
GLint first
GLfloat GLfloat GLfloat GLfloat h
const GLubyte * c
Definition: qopenglext.h:12701
GLenum GLsizei len
Definition: qopenglext.h:3292
GLdouble s
[6]
Definition: qopenglext.h:235
GLuint GLenum option
Definition: qopenglext.h:5929
GLenum GLenum GLenum input
Definition: qopenglext.h:10816
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
#define QStringLiteral(str)
Q_UNUSED(salary)
[21]
QFile file
[0]
QTextStream out(stdout)
[7]
QObject::connect nullptr
QXmlStreamReader xml
[0]
QStringList files
[8]
QStringList::Iterator it
static QStringList c_ext
Definition: option.h:86
static QString fixPathToTargetOS(const QString &in, bool fix_env=true, bool canonical=true)
Definition: option.h:133
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:53
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
Definition: qlist.h:966
#define rhs
XmlOutput::xml_output tag(const QString &name)
Definition: xmloutput.h:154
XmlOutput::xml_output closetag()
Definition: xmloutput.h:175
XmlOutput::xml_output noxml()
Definition: xmloutput.h:132
XmlOutput::xml_output decl(const QString &version=QString("1.0"), const QString &encoding=QString())
Definition: xmloutput.h:148
XmlOutput::xml_output attr(const QString &name, const QString &value)
Definition: xmloutput.h:202