diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-08-05 15:26:07 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-08-10 08:53:03 (GMT) |
commit | 88002eb433150615bc2b171d3642bca6a18c9916 (patch) | |
tree | 263eb0267e5d7adede8e9f23c5631998432eb7f0 /qmake/generators/win32/msbuild_objectmodel.h | |
parent | 79c4e65945b4741deed948c0c8e8d80818f0fbfb (diff) | |
download | Qt-88002eb433150615bc2b171d3642bca6a18c9916.zip Qt-88002eb433150615bc2b171d3642bca6a18c9916.tar.gz Qt-88002eb433150615bc2b171d3642bca6a18c9916.tar.bz2 |
qmake: duplicated code removed from msbuild_objectmodel.cpp
Rubber-stamped-by: ossi
Diffstat (limited to 'qmake/generators/win32/msbuild_objectmodel.h')
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.h | 562 |
1 files changed, 23 insertions, 539 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h index af45330..498552e 100644 --- a/qmake/generators/win32/msbuild_objectmodel.h +++ b/qmake/generators/win32/msbuild_objectmodel.h @@ -54,519 +54,24 @@ QT_BEGIN_NAMESPACE - -class VCXConfiguration; -class VCXProject; - -class VCXCLCompilerTool : public VCToolBase -{ -public: - // Functions - VCXCLCompilerTool(); - virtual ~VCXCLCompilerTool(){} - bool parseOption(const char* option); - - // Variables - QStringList AdditionalIncludeDirectories; - QStringList AdditionalOptions; - QStringList AdditionalUsingDirectories; - QString AlwaysAppend; - QString AssemblerListingLocation; - QString AssemblerOutput; - QString BasicRuntimeChecks; - triState BrowseInformation; - QString BrowseInformationFile; - triState BufferSecurityCheck; - QString CallingConvention; - QString CompileAs; - QString CompileAsManaged; - triState CreateHotpatchableImage; - QString DebugInformationFormat; - triState DisableLanguageExtensions; - QStringList DisableSpecificWarnings; - QString EnableEnhancedInstructionSet; - triState EnableFiberSafeOptimizations; - triState EnablePREfast; - QString ErrorReporting; - QString ExceptionHandling; - triState ExpandAttributedSource; - QString FavorSizeOrSpeed; - triState FloatingPointExceptions; - QString FloatingPointModel; - triState ForceConformanceInForLoopScope; - QStringList ForcedIncludeFiles; - QStringList ForcedUsingFiles; - triState FunctionLevelLinking; - triState GenerateXMLDocumentationFiles; - triState IgnoreStandardIncludePath; - QString InlineFunctionExpansion; - triState IntrinsicFunctions; - triState MinimalRebuild; - triState MultiProcessorCompilation; - QString ObjectFileName; - QStringList ObjectFiles; - triState OmitDefaultLibName; - triState OmitFramePointers; - triState OpenMPSupport; - QString Optimization; - QString PrecompiledHeader; - QString PrecompiledHeaderFile; - QString PrecompiledHeaderOutputFile; - triState PreprocessKeepComments; - QStringList PreprocessorDefinitions; - QString PreprocessOutputPath; - triState PreprocessSuppressLineNumbers; - triState PreprocessToFile; - QString ProgramDataBaseFileName; - QString ProcessorNumber; - QString RuntimeLibrary; - triState RuntimeTypeInfo; - triState ShowIncludes; - triState SmallerTypeCheck; - triState StringPooling; - QString StructMemberAlignment; - triState SuppressStartupBanner; - QString TreatSpecificWarningsAsErrors; - triState TreatWarningAsError; - triState TreatWChar_tAsBuiltInType; - triState UndefineAllPreprocessorDefinitions; - QStringList UndefinePreprocessorDefinitions; - triState UseFullPaths; - triState UseUnicodeForAssemblerListing; - QString WarningLevel; - triState WholeProgramOptimization; - QString XMLDocumentationFileName; - - VCXConfiguration* config; -}; - -class VCXLinkerTool : public VCToolBase -{ -public: - // Functions - VCXLinkerTool(); - virtual ~VCXLinkerTool(){} - bool parseOption(const char* option); - - // Variables - QStringList AdditionalDependencies; - QStringList AdditionalLibraryDirectories; - QStringList AdditionalManifestDependencies; - QStringList AdditionalOptions; - QStringList AddModuleNamesToAssembly; - triState AllowIsolation; - triState AssemblyDebug; - QStringList AssemblyLinkResource; - QString BaseAddress; - QString CLRImageType; - QString CLRSupportLastError; - QString CLRThreadAttribute; - QString CLRUnmanagedCodeCheck; - QString CreateHotPatchableImage; - triState DataExecutionPrevention; - QStringList DelayLoadDLLs; - triState DelaySign; - QString Driver; - QStringList EmbedManagedResourceFile; - triState EnableCOMDATFolding; - triState EnableUAC; - QString EntryPointSymbol; - triState FixedBaseAddress; - QString ForceFileOutput; - QStringList ForceSymbolReferences; - QString FunctionOrder; - triState GenerateDebugInformation; - triState GenerateManifest; - triState GenerateMapFile; - qlonglong HeapCommitSize; - qlonglong HeapReserveSize; - triState IgnoreAllDefaultLibraries; - triState IgnoreEmbeddedIDL; - triState IgnoreImportLibrary; - QStringList IgnoreSpecificDefaultLibraries; - triState ImageHasSafeExceptionHandlers; - QString ImportLibrary; - QString KeyContainer; - QString KeyFile; - triState LargeAddressAware; - triState LinkDLL; - QString LinkErrorReporting; - triState LinkIncremental; - triState LinkStatus; - QString LinkTimeCodeGeneration; - QString ManifestFile; - triState MapExports; - QString MapFileName; - QString MergedIDLBaseFileName; - QString MergeSections; - QString MidlCommandFile; - QString ModuleDefinitionFile; - QString MSDOSStubFileName; - triState NoEntryPoint; - triState OptimizeReferences; - QString OutputFile; - triState PreventDllBinding; - QString Profile; - QString ProfileGuidedDatabase; - QString ProgramDatabaseFile; - triState RandomizedBaseAddress; - triState RegisterOutput; - qlonglong SectionAlignment; - triState SetChecksum; - QString ShowProgress; - QString SpecifySectionAttributes; - QString StackCommitSize; - QString StackReserveSize; - QString StripPrivateSymbols; - QString SubSystem; - triState SupportNobindOfDelayLoadedDLL; - triState SupportUnloadOfDelayLoadedDLL; - triState SuppressStartupBanner; - triState SwapRunFromCD; - triState SwapRunFromNet; - QString TargetMachine; - triState TerminalServerAware; - triState TreatLinkerWarningAsErrors; - triState TurnOffAssemblyGeneration; - QString TypeLibraryFile; - qlonglong TypeLibraryResourceID; - QString UACExecutionLevel; - triState UACUIAccess; - QString Version; - - - VCXConfiguration* config; -}; - -class VCXMIDLTool : public VCToolBase -{ -public: - // Functions - VCXMIDLTool(); - virtual ~VCXMIDLTool(){} - bool parseOption(const char* option); - - // Variables - QStringList AdditionalIncludeDirectories; - QStringList AdditionalOptions; - triState ApplicationConfigurationMode; - QString ClientStubFile; - QString CPreprocessOptions; - QString DefaultCharType; - QString DLLDataFileName; - QString EnableErrorChecks; - triState ErrorCheckAllocations; - triState ErrorCheckBounds; - triState ErrorCheckEnumRange; - triState ErrorCheckRefPointers; - triState ErrorCheckStubData; - QString GenerateClientFiles; - QString GenerateServerFiles; - triState GenerateStublessProxies; - triState GenerateTypeLibrary; - QString HeaderFileName; - triState IgnoreStandardIncludePath; - QString InterfaceIdentifierFileName; - qlonglong LocaleID; - triState MkTypLibCompatible; - QString OutputDirectory; - QStringList PreprocessorDefinitions; - QString ProxyFileName; - QString RedirectOutputAndErrors; - QString ServerStubFile; - QString StructMemberAlignment; - triState SuppressCompilerWarnings; - triState SuppressStartupBanner; - QString TargetEnvironment; - QString TypeLibFormat; - QString TypeLibraryName; - QStringList UndefinePreprocessorDefinitions; - triState ValidateAllParameters; - triState WarnAsError; - QString WarningLevel; - - VCXConfiguration* config; -}; - -class VCXLibrarianTool : public VCToolBase -{ -public: - // Functions - VCXLibrarianTool(); - virtual ~VCXLibrarianTool(){} - bool parseOption(const char*){ return false; }; - - // Variables - QStringList AdditionalDependencies; - QStringList AdditionalLibraryDirectories; - QStringList AdditionalOptions; - QString DisplayLibrary; - QString ErrorReporting; - QStringList ExportNamedFunctions; - QStringList ForceSymbolReferences; - triState IgnoreAllDefaultLibraries; - QStringList IgnoreSpecificDefaultLibraries; - triState LinkTimeCodeGeneration; - QString ModuleDefinitionFile; - QString Name; - QString OutputFile; - QStringList RemoveObjects; - QString SubSystem; - triState SuppressStartupBanner; - QString TargetMachine; - triState TreatLibWarningAsErrors; - triState Verbose; - -}; - -class VCXCustomBuildTool : public VCToolBase -{ -public: - // Functions - VCXCustomBuildTool(); - virtual ~VCXCustomBuildTool(){} - bool parseOption(const char*){ return false; }; - - // Variables - QStringList AdditionalDependencies; - QStringList CommandLine; - QString Description; - QStringList Outputs; - QString ToolName; - QString ToolPath; - QString ConfigName; -}; - -class VCXResourceCompilerTool : public VCToolBase -{ -public: - // Functions - VCXResourceCompilerTool(); - virtual ~VCXResourceCompilerTool(){} - bool parseOption(const char*){ return false; }; - - // Variables - QStringList AdditionalIncludeDirectories; - QString AdditionalOptions; - QString Culture; - triState IgnoreStandardIncludePath; - triState NullTerminateStrings; - QStringList PreprocessorDefinitions; - QString ResourceOutputFileName; - triState ShowProgress; - triState SuppressStartupBanner; - QString TrackerLogDirectory; - QString UndefinePreprocessorDefinitions; -}; - -class VCXDeploymentTool -{ -public: - // Functions - VCXDeploymentTool(); - virtual ~VCXDeploymentTool() {} - - // Variables - QString DeploymentTag; - QString RemoteDirectory; - QString AdditionalFiles; -}; - -class VCXEventTool : public VCToolBase -{ -protected: - // Functions - VCXEventTool() : UseInBuild(unset){}; - virtual ~VCXEventTool(){} - bool parseOption(const char*){ return false; }; - -public: - // Variables - QString CommandLine; - QString Description; - triState UseInBuild; - QString EventName; - QString ToolPath; -}; - -class VCXPostBuildEventTool : public VCXEventTool -{ -public: - VCXPostBuildEventTool(); - ~VCXPostBuildEventTool(){} -}; - -class VCXPreBuildEventTool : public VCXEventTool -{ -public: - VCXPreBuildEventTool(); - ~VCXPreBuildEventTool(){} -}; - -class VCXPreLinkEventTool : public VCXEventTool -{ -public: - VCXPreLinkEventTool(); - ~VCXPreLinkEventTool(){} -}; - -class VCXConfiguration -{ -public: - // Functions - VCXConfiguration(); - ~VCXConfiguration(){} - - // Variables - triState ATLMinimizesCRunTimeLibraryUsage; - triState BuildBrowserInformation; - QString CharacterSet; - QString ConfigurationType; - QString DeleteExtensionsOnClean; - QString ImportLibrary; - QString IntermediateDirectory; - QString Name; - QString ConfigurationName; - QString OutputDirectory; - QString PrimaryOutput; - QString ProgramDatabase; - triState RegisterOutput; - QString TargetName; - QString UseOfATL; - QString UseOfMfc; - triState WholeProgramOptimization; - - // XML sub-parts - VCXCLCompilerTool compiler; - VCXLibrarianTool librarian; - VCXLinkerTool linker; - VCXMIDLTool idl; - VCXResourceCompilerTool resource; - VCXCustomBuildTool custom; - VCXDeploymentTool deployment; // Not likely to be supported: http://msdn.microsoft.com/en-us/library/sa69he4t.aspx - VCXPostBuildEventTool postBuild; - VCXPreBuildEventTool preBuild; - VCXPreLinkEventTool preLink; -}; - -struct VCXFilterFile -{ - VCXFilterFile() - { excludeFromBuild = false; } - VCXFilterFile(const QString &filename, bool exclude = false ) - { file = filename; excludeFromBuild = exclude; } - VCXFilterFile(const QString &filename, const QString &additional, bool exclude = false ) - { file = filename; excludeFromBuild = exclude; additionalFile = additional; } - bool operator==(const VCXFilterFile &other){ - return file == other.file - && additionalFile == other.additionalFile - && excludeFromBuild == other.excludeFromBuild; - } - - bool excludeFromBuild; - QString file; - QString additionalFile; // For tools like MOC -}; - -class VcxprojGenerator; -class VCXFilter -{ -public: - // Functions - VCXFilter(); - ~VCXFilter(){}; - - void addFile(const QString& filename); // equal - void addFile(const VCXFilterFile& fileInfo);// equal - void addFiles(const QStringList& fileList);// equal - bool addExtraCompiler(const VCXFilterFile &info); //equal - void modifyPCHstage(QString str); //almost equal -> file comment .vcxproj, PrecompiledHeader property - - // Variables - QString Name; - QString Filter; - QString Guid; - triState ParseFiles; - VcxprojGenerator* Project; - VCXConfiguration* Config; - QList<VCXFilterFile> Files; - - customBuildCheck CustomBuild; - - bool useCustomBuildTool; - VCXCustomBuildTool CustomBuildTool; - - bool useCompilerTool; - VCXCLCompilerTool CompilerTool; -}; - -typedef QList<VCXFilter> VCXFilterList; -class VCXProjectSingleConfig -{ -public: - enum FilterTypes { - None, - Source, - Header, - Generated, - LexYacc, - Translation, - Resources, - Extras - }; - // Functions - VCXProjectSingleConfig(){}; - ~VCXProjectSingleConfig(){} - - // Variables - QString Name; - QString Version; - QString ProjectGUID; - QString Keyword; - QString SccProjectName; - QString SccLocalPath; - QString PlatformName; - - // XML sub-parts - VCXConfiguration Configuration; - VCXFilter RootFiles; - VCXFilter SourceFiles; - VCXFilter HeaderFiles; - VCXFilter GeneratedFiles; - VCXFilter LexYaccFiles; - VCXFilter TranslationFiles; - VCXFilter FormFiles; - VCXFilter ResourceFiles; - VCXFilterList ExtraCompilersFiles; - - bool flat_files; - - // Accessor for extracompilers - VCXFilter &filterForExtraCompiler(const QString &compilerName); - // ### this function is the same as in VCProjectSingleConfig ----> DIE DIE DIE -}; - - - // Tree & Flat view of files -------------------------------------------------- -class VCXFilter; class XNode { public: virtual ~XNode() { } - void addElement(const VCXFilterFile &file) { + void addElement(const VCFilterFile &file) { addElement(file.file, file); } - virtual void addElement(const QString &filepath, const VCXFilterFile &allInfo) = 0; + virtual void addElement(const QString &filepath, const VCFilterFile &allInfo) = 0; virtual void removeElements()= 0; - virtual void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCXProject &tool, const QString &filter) = 0; + virtual void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, const QString &filter) = 0; virtual bool hasElements() = 0; }; class XTreeNode : public XNode { typedef QMap<QString, XTreeNode*> ChildrenMap; - VCXFilterFile info; + VCFilterFile info; ChildrenMap children; public: @@ -582,7 +87,7 @@ public: return Uindex; } - void addElement(const QString &filepath, const VCXFilterFile &allInfo){ + void addElement(const QString &filepath, const VCFilterFile &allInfo){ QString newNodeName(filepath); int index = pathIndex(filepath); @@ -609,7 +114,7 @@ public: children.clear(); } - void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCXProject &tool, const QString &filter); + void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, const QString &filter); bool hasElements() { return children.size() != 0; } @@ -617,7 +122,7 @@ public: class XFlatNode : public XNode { - typedef QMap<QString, VCXFilterFile> ChildrenMapFlat; + typedef QMap<QString, VCFilterFile> ChildrenMapFlat; ChildrenMapFlat children; public: @@ -633,7 +138,7 @@ public: return Uindex; } - void addElement(const QString &filepath, const VCXFilterFile &allInfo){ + void addElement(const QString &filepath, const VCFilterFile &allInfo){ QString newKey(filepath); int index = pathIndex(filepath); @@ -649,55 +154,34 @@ public: children.clear(); } - void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCXProject &proj, const QString &filter); + void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &proj, const QString &filter); bool hasElements() { return children.size() != 0; } }; -// ---------------------------------------------------------------------------- - -class VCXProject -{ -public: - // Variables - QString Name; - QString Version; - QString ProjectGUID; - QString Keyword; - QString SccProjectName; - QString SccLocalPath; - QString PlatformName; - - // Single projects - QList<VCXProjectSingleConfig> SingleProjects; - - // List of all extracompilers - QStringList ExtraCompilers; -}; class VCXProjectWriter : public VCProjectWriter { public: - // ### replace the X classes with the standard names! - void write(XmlOutput &, VCXProjectSingleConfig &); - void write(XmlOutput &, VCXProject &); + void write(XmlOutput &, VCProjectSingleConfig &); + void write(XmlOutput &, VCProject &); - void write(XmlOutput &, const VCXCLCompilerTool &); - void write(XmlOutput &, const VCXLinkerTool &); - void write(XmlOutput &, const VCXMIDLTool &); - void write(XmlOutput &, const VCXCustomBuildTool &); - void write(XmlOutput &, const VCXLibrarianTool &); - void write(XmlOutput &, const VCXResourceCompilerTool &); - void write(XmlOutput &, const VCXEventTool &); + void write(XmlOutput &, const VCCLCompilerTool &); + void write(XmlOutput &, const VCLinkerTool &); + void write(XmlOutput &, const VCMIDLTool &); + void write(XmlOutput &, const VCCustomBuildTool &); + void write(XmlOutput &, const VCLibrarianTool &); + void write(XmlOutput &, const VCResourceCompilerTool &); + void write(XmlOutput &, const VCEventTool &); void write(XmlOutput &, const VCDeploymentTool &); - void write(XmlOutput &, const VCXConfiguration &); + void write(XmlOutput &, const VCConfiguration &); void write(XmlOutput &, VCFilter &); private: - static void addFilters(VCXProject &project, XmlOutput &xmlFilter, const QString &filterName); - static void outputFilter(VCXProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filtername); - static void outputFileConfigs(VCXProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCXFilterFile &info, const QString &filtername); - static bool outputFileConfig(VCXFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, const QString &filtername, bool fileAllreadyAdded); + static void addFilters(VCProject &project, XmlOutput &xmlFilter, const QString &filterName); + static void outputFilter(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filtername); + static void outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCFilterFile &info, const QString &filtername); + static bool outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, const QString &filtername, bool fileAllreadyAdded); friend class XTreeNode; friend class XFlatNode; |