📄 msvc_objectmodel.cpp
字号:
/******************************************************************************** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.**** This file is part of the qmake application of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file. Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://trolltech.com/products/qt/licenses/licensing/opensource/**** If you are unsure which license is appropriate for your use, please** review the following information:** http://trolltech.com/products/qt/licenses/licensing/licensingoverview** or contact the sales department at sales@trolltech.com.**** In addition, as a special exception, Trolltech gives you certain** additional rights. These rights are described in the Trolltech GPL** Exception version 1.0, which can be found at** http://www.trolltech.com/products/qt/gplexception/ and in the file** GPL_EXCEPTION.txt in this package.**** In addition, as a special exception, Trolltech, as the sole copyright** holder for Qt Designer, grants users of the Qt/Eclipse Integration** plug-in the right for the Qt/Eclipse Integration to link to** functionality provided by Qt Designer and its related libraries.**** Trolltech reserves all rights not expressly granted herein.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "msvc_objectmodel.h"#include "msvc_vcproj.h"#include <qstringlist.h>#include <qfileinfo.h>// XML Tags ---------------------------------------------------------const char _Configuration[] = "Configuration";const char _Configurations[] = "Configurations";const char _File[] = "File";const char _FileConfiguration[] = "FileConfiguration";const char _Files[] = "Files";const char _Filter[] = "Filter";const char _Globals[] = "Globals";const char _Platform[] = "Platform";const char _Platforms[] = "Platforms";const char _Tool[] = "Tool";const char _VisualStudioProject[] = "VisualStudioProject";// XML Properties ---------------------------------------------------const char _AddModuleNamesToAssembly[] = "AddModuleNamesToAssembly";const char _AdditionalDependencies[] = "AdditionalDependencies";const char _AdditionalIncludeDirectories[] = "AdditionalIncludeDirectories";const char _AdditionalLibraryDirectories[] = "AdditionalLibraryDirectories";const char _AdditionalOptions[] = "AdditionalOptions";const char _AdditionalUsingDirectories[] = "AdditionalUsingDirectories";const char _AssemblerListingLocation[] = "AssemblerListingLocation";const char _AssemblerOutput[] = "AssemblerOutput";const char _ATLMinimizesCRunTimeLibraryUsage[] = "ATLMinimizesCRunTimeLibraryUsage";const char _BaseAddress[] = "BaseAddress";const char _BasicRuntimeChecks[] = "BasicRuntimeChecks";const char _BrowseInformation[] = "BrowseInformation";const char _BrowseInformationFile[] = "BrowseInformationFile";const char _BufferSecurityCheck[] = "BufferSecurityCheck";const char _BuildBrowserInformation[] = "BuildBrowserInformation";const char _CPreprocessOptions[] = "CPreprocessOptions";const char _CallingConvention[] = "CallingConvention";const char _CharacterSet[] = "CharacterSet";const char _CommandLine[] = "CommandLine";const char _CompileAs[] = "CompileAs";const char _CompileAsManaged[] = "CompileAsManaged";const char _CompileOnly[] = "CompileOnly";const char _ConfigurationType[] = "ConfigurationType";const char _Culture[] = "Culture";const char _DLLDataFileName[] = "DLLDataFileName";const char _DebugInformationFormat[] = "DebugInformationFormat";const char _DefaultCharIsUnsigned[] = "DefaultCharIsUnsigned";const char _DefaultCharType[] = "DefaultCharType";const char _DelayLoadDLLs[] = "DelayLoadDLLs";const char _DeleteExtensionsOnClean[] = "DeleteExtensionsOnClean";const char _Description[] = "Description";const char _Detect64BitPortabilityProblems[] = "Detect64BitPortabilityProblems";const char _DisableLanguageExtensions[] = "DisableLanguageExtensions";const char _DisableSpecificWarnings[] = "DisableSpecificWarnings";const char _EnableCOMDATFolding[] = "EnableCOMDATFolding";const char _EnableErrorChecks[] = "EnableErrorChecks";const char _EnableEnhancedInstructionSet[] = "EnableEnhancedInstructionSet";const char _EnableFiberSafeOptimizations[] = "EnableFiberSafeOptimizations";const char _EnableFunctionLevelLinking[] = "EnableFunctionLevelLinking";const char _EnableIntrinsicFunctions[] = "EnableIntrinsicFunctions";const char _EntryPointSymbol[] = "EntryPointSymbol";const char _ErrorCheckAllocations[] = "ErrorCheckAllocations";const char _ErrorCheckBounds[] = "ErrorCheckBounds";const char _ErrorCheckEnumRange[] = "ErrorCheckEnumRange";const char _ErrorCheckRefPointers[] = "ErrorCheckRefPointers";const char _ErrorCheckStubData[] = "ErrorCheckStubData";const char _ExceptionHandling[] = "ExceptionHandling";const char _ExcludedFromBuild[] = "ExcludedFromBuild";const char _ExpandAttributedSource[] = "ExpandAttributedSource";const char _ExportNamedFunctions[] = "ExportNamedFunctions";const char _FavorSizeOrSpeed[] = "FavorSizeOrSpeed";const char _FloatingPointModel[] = "FloatingPointModel";const char _FloatingPointExceptions[] = "FloatingPointExceptions";const char _ForceConformanceInForLoopScope[] = "ForceConformanceInForLoopScope";const char _ForceSymbolReferences[] = "ForceSymbolReferences";const char _ForcedIncludeFiles[] = "ForcedIncludeFiles";const char _ForcedUsingFiles[] = "ForcedUsingFiles";const char _FullIncludePath[] = "FullIncludePath";const char _FunctionOrder[] = "FunctionOrder";const char _GenerateDebugInformation[] = "GenerateDebugInformation";const char _GenerateMapFile[] = "GenerateMapFile";const char _GeneratePreprocessedFile[] = "GeneratePreprocessedFile";const char _GenerateStublessProxies[] = "GenerateStublessProxies";const char _GenerateTypeLibrary[] = "GenerateTypeLibrary";const char _GlobalOptimizations[] = "GlobalOptimizations";const char _HeaderFileName[] = "HeaderFileName";const char _HeapCommitSize[] = "HeapCommitSize";const char _HeapReserveSize[] = "HeapReserveSize";const char _IgnoreAllDefaultLibraries[] = "IgnoreAllDefaultLibraries";const char _IgnoreDefaultLibraryNames[] = "IgnoreDefaultLibraryNames";const char _IgnoreEmbeddedIDL[] = "IgnoreEmbeddedIDL";const char _IgnoreImportLibrary[] = "IgnoreImportLibrary";const char _IgnoreStandardIncludePath[] = "IgnoreStandardIncludePath";const char _ImportLibrary[] = "ImportLibrary";const char _ImproveFloatingPointConsistency[] = "ImproveFloatingPointConsistency";const char _InlineFunctionExpansion[] = "InlineFunctionExpansion";const char _InterfaceIdentifierFileName[] = "InterfaceIdentifierFileName";const char _IntermediateDirectory[] = "IntermediateDirectory";const char _KeepComments[] = "KeepComments";const char _LargeAddressAware[] = "LargeAddressAware";const char _LinkDLL[] = "LinkDLL";const char _LinkIncremental[] = "LinkIncremental";const char _LinkTimeCodeGeneration[] = "LinkTimeCodeGeneration";const char _LinkToManagedResourceFile[] = "LinkToManagedResourceFile";const char _MapExports[] = "MapExports";const char _MapFileName[] = "MapFileName";const char _MapLines[] = "MapLines ";const char _MergeSections[] = "MergeSections";const char _MergedIDLBaseFileName[] = "MergedIDLBaseFileName";const char _MidlCommandFile[] = "MidlCommandFile";const char _MinimalRebuild[] = "MinimalRebuild";const char _MkTypLibCompatible[] = "MkTypLibCompatible";const char _ModuleDefinitionFile[] = "ModuleDefinitionFile";const char _Name[] = "Name";const char _ObjectFile[] = "ObjectFile";const char _OmitFramePointers[] = "OmitFramePointers";const char _Optimization[] = "Optimization ";const char _OptimizeForProcessor[] = "OptimizeForProcessor";const char _OptimizeForWindows98[] = "OptimizeForWindows98";const char _OptimizeForWindowsApplication[] = "OptimizeForWindowsApplication";const char _OptimizeReferences[] = "OptimizeReferences";const char _OutputDirectory[] = "OutputDirectory";const char _OutputFile[] = "OutputFile";const char _Outputs[] = "Outputs";const char _ParseFiles[] = "ParseFiles";const char _PrecompiledHeaderFile[] = "PrecompiledHeaderFile";const char _PrecompiledHeaderThrough[] = "PrecompiledHeaderThrough";const char _PreprocessorDefinitions[] = "PreprocessorDefinitions";const char _PrimaryOutput[] = "PrimaryOutput";const char _ProjectGUID[] = "ProjectGUID";const char _Keyword[] = "Keyword";const char _ProjectType[] = "ProjectType";const char _ProgramDatabase[] = "ProgramDatabase";const char _ProgramDataBaseFileName[] = "ProgramDataBaseFileName";const char _ProgramDatabaseFile[] = "ProgramDatabaseFile";const char _ProxyFileName[] = "ProxyFileName";const char _RedirectOutputAndErrors[] = "RedirectOutputAndErrors";const char _RegisterOutput[] = "RegisterOutput";const char _RelativePath[] = "RelativePath";const char _ResourceOnlyDLL[] = "ResourceOnlyDLL";const char _ResourceOutputFileName[] = "ResourceOutputFileName";const char _RuntimeLibrary[] = "RuntimeLibrary";const char _RuntimeTypeInfo[] = "RuntimeTypeInfo";const char _SccProjectName[] = "SccProjectName";const char _SccLocalPath[] = "SccLocalPath";const char _SetChecksum[] = "SetChecksum";const char _ShowIncludes[] = "ShowIncludes";const char _ShowProgress[] = "ShowProgress";const char _SmallerTypeCheck[] = "SmallerTypeCheck";const char _StackCommitSize[] = "StackCommitSize";const char _StackReserveSize[] = "StackReserveSize";const char _StringPooling[] = "StringPooling";const char _StripPrivateSymbols[] = "StripPrivateSymbols";const char _StructMemberAlignment[] = "StructMemberAlignment";const char _SubSystem[] = "SubSystem";const char _SupportUnloadOfDelayLoadedDLL[] = "SupportUnloadOfDelayLoadedDLL";const char _SuppressStartupBanner[] = "SuppressStartupBanner";const char _SwapRunFromCD[] = "SwapRunFromCD";const char _SwapRunFromNet[] = "SwapRunFromNet";const char _TargetEnvironment[] = "TargetEnvironment";const char _TargetMachine[] = "TargetMachine";const char _TerminalServerAware[] = "TerminalServerAware";const char _Path[] = "Path";const char _TreatWChar_tAsBuiltInType[] = "TreatWChar_tAsBuiltInType";const char _TurnOffAssemblyGeneration[] = "TurnOffAssemblyGeneration";const char _TypeLibraryFile[] = "TypeLibraryFile";const char _TypeLibraryName[] = "TypeLibraryName";const char _TypeLibraryResourceID[] = "TypeLibraryResourceID";const char _UndefineAllPreprocessorDefinitions[]= "UndefineAllPreprocessorDefinitions";const char _UndefinePreprocessorDefinitions[] = "UndefinePreprocessorDefinitions";const char _UniqueIdentifier[] = "UniqueIdentifier";const char _UseOfATL[] = "UseOfATL";const char _UseOfMfc[] = "UseOfMfc";const char _UsePrecompiledHeader[] = "UsePrecompiledHeader";const char _ValidateParameters[] = "ValidateParameters";const char _VCCLCompilerTool[] = "VCCLCompilerTool";const char _VCLibrarianTool[] = "VCLibrarianTool";const char _VCLinkerTool[] = "VCLinkerTool";const char _VCCustomBuildTool[] = "VCCustomBuildTool";const char _VCResourceCompilerTool[] = "VCResourceCompilerTool";const char _VCMIDLTool[] = "VCMIDLTool";const char _Version[] = "Version";const char _WarnAsError[] = "WarnAsError";const char _WarningLevel[] = "WarningLevel";const char _WholeProgramOptimization[] = "WholeProgramOptimization";// XmlOutput stream functions ------------------------------inline XmlOutput::xml_output attrT(const char *name, const triState v){ if(v == unset) return noxml(); return attr(name, (v == _True ? "true" : "false"));}inline XmlOutput::xml_output attrE(const char *name, int v){ return attr(name, QString::number(v));}/*ifNot version*/inline XmlOutput::xml_output attrE(const char *name, int v, int ifn){ if (v == ifn) return noxml(); return attr(name, QString::number(v));}inline XmlOutput::xml_output attrL(const char *name, qint64 v){ return attr(name, QString::number(v));}/*ifNot version*/inline XmlOutput::xml_output attrL(const char *name, qint64 v, qint64 ifn){ if (v == ifn) return noxml(); return attr(name, QString::number(v));}inline XmlOutput::xml_output attrS(const char *name, const QString &v){ if(v.isEmpty()) return noxml(); return attr(name, v);}inline XmlOutput::xml_output attrX(const char *name, const QStringList &v, const char *s = ","){ if(v.isEmpty()) return noxml(); return attr(name, v.join(s));}// VCCLCompilerTool -------------------------------------------------VCCLCompilerTool::VCCLCompilerTool() : AssemblerOutput(asmListingNone), BasicRuntimeChecks(runtimeBasicCheckNone), BrowseInformation(brInfoNone), BufferSecurityCheck(_False), CallingConvention(callConventionDefault), CompileAs(compileAsDefault), CompileAsManaged(managedDefault), CompileOnly(unset), DebugInformationFormat(debugDisabled), DefaultCharIsUnsigned(unset), Detect64BitPortabilityProblems(unset), DisableLanguageExtensions(unset), EnableEnhancedInstructionSet(archNotSet), EnableFiberSafeOptimizations(unset), EnableFunctionLevelLinking(unset), EnableIntrinsicFunctions(unset), ExceptionHandling(ehDefault), ExpandAttributedSource(unset), FavorSizeOrSpeed(favorNone), FloatingPointModel(floatingPointNotSet), FloatingPointExceptions(unset), ForceConformanceInForLoopScope(unset), GeneratePreprocessedFile(preprocessNo), GlobalOptimizations(unset), IgnoreStandardIncludePath(unset), ImproveFloatingPointConsistency(unset), InlineFunctionExpansion(expandDefault), KeepComments(unset), MinimalRebuild(unset), OmitFramePointers(unset), Optimization(optimizeCustom), OptimizeForProcessor(procOptimizeBlended), OptimizeForWindowsApplication(unset), ProgramDataBaseFileName(""), RuntimeLibrary(rtMultiThreaded), RuntimeTypeInfo(unset), ShowIncludes(unset), SmallerTypeCheck(unset), StringPooling(unset),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -