📄 msvc_objectmodel.cpp
字号:
ImproveFloatingPointConsistency( unset ), InlineFunctionExpansion( expandOnlyInline ), KeepComments( unset ), MinimalRebuild( unset ), OmitFramePointers( unset ), Optimization( optimizeDisabled ), OptimizeForProcessor( procOptimizeBlended ), OptimizeForWindowsApplication( unset ), RuntimeLibrary( rtMultiThreaded ), RuntimeTypeInfo( unset ), ShowIncludes( unset ), SmallerTypeCheck( unset ), StringPooling( unset ), StructMemberAlignment( alignNotSet ), SuppressStartupBanner( unset ), TreatWChar_tAsBuiltInType( unset ), TurnOffAssemblyGeneration( unset ), UndefineAllPreprocessorDefinitions( unset ), UsePrecompiledHeader( pchGenerateAuto ), WarnAsError( unset ), WarningLevel( warningLevel_0 ), WholeProgramOptimization( unset ){}QTextStream &operator<<( QTextStream &strm, const VCCLCompilerTool &tool ){ strm << _begTool3; strm << _VCCLCompilerToolName; strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); strm << XPair( _AdditionalOptions, tool.AdditionalOptions, " " ); strm << XPair( _AdditionalUsingDirectories, tool.AdditionalUsingDirectories ); strm << SPair( _AssemblerListingLocation, tool.AssemblerListingLocation ); if ( tool.AssemblerOutput != asmListingNone ) strm << EPair( _AssemblerOutput, tool.AssemblerOutput ); if ( tool.BasicRuntimeChecks != runtimeBasicCheckNone ) strm << EPair( _BasicRuntimeChecks, tool.BasicRuntimeChecks ); if ( tool.BrowseInformation != brInfoNone ) strm << EPair( _BrowseInformation, tool.BrowseInformation ); strm << SPair( _BrowseInformationFile, tool.BrowseInformationFile ); strm << TPair( _BufferSecurityCheck, tool.BufferSecurityCheck ); if ( tool.CallingConvention != callConventionDefault ) strm << EPair( _CallingConvention, tool.CallingConvention ); if ( tool.CompileAs != compileAsDefault ) strm << EPair( _CompileAs, tool.CompileAs ); if ( tool.CompileAsManaged != managedDefault ) strm << EPair( _CompileAsManaged, tool.CompileAsManaged ); strm << TPair( _CompileOnly, tool.CompileOnly ); strm << EPair( _DebugInformationFormat, tool.DebugInformationFormat ); strm << TPair( _DefaultCharIsUnsigned, tool.DefaultCharIsUnsigned ); strm << TPair( _Detect64BitPortabilityProblems, tool.Detect64BitPortabilityProblems ); strm << TPair( _DisableLanguageExtensions, tool.DisableLanguageExtensions ); strm << XPair( _DisableSpecificWarnings, tool.DisableSpecificWarnings ); strm << TPair( _EnableFiberSafeOptimizations, tool.EnableFiberSafeOptimizations ); strm << TPair( _EnableFunctionLevelLinking, tool.EnableFunctionLevelLinking ); strm << TPair( _EnableIntrinsicFunctions, tool.EnableIntrinsicFunctions ); strm << TPair( _ExceptionHandling, tool.ExceptionHandling ); strm << TPair( _ExpandAttributedSource, tool.ExpandAttributedSource ); if ( tool.FavorSizeOrSpeed != favorNone ) strm << EPair( _FavorSizeOrSpeed, tool.FavorSizeOrSpeed ); strm << TPair( _ForceConformanceInForLoopScope, tool.ForceConformanceInForLoopScope ); strm << XPair( _ForcedIncludeFiles, tool.ForcedIncludeFiles ); strm << XPair( _ForcedUsingFiles, tool.ForcedUsingFiles ); strm << EPair( _GeneratePreprocessedFile, tool.GeneratePreprocessedFile ); strm << TPair( _GlobalOptimizations, tool.GlobalOptimizations ); strm << TPair( _IgnoreStandardIncludePath, tool.IgnoreStandardIncludePath ); strm << TPair( _ImproveFloatingPointConsistency, tool.ImproveFloatingPointConsistency ); strm << EPair( _InlineFunctionExpansion, tool.InlineFunctionExpansion ); strm << TPair( _KeepComments, tool.KeepComments ); strm << TPair( _MinimalRebuild, tool.MinimalRebuild ); strm << SPair( _ObjectFile, tool.ObjectFile ); strm << TPair( _OmitFramePointers, tool.OmitFramePointers ); strm << EPair( _Optimization, tool.Optimization ); if ( tool.OptimizeForProcessor != procOptimizeBlended ) strm << EPair( _OptimizeForProcessor, tool.OptimizeForProcessor ); strm << TPair( _OptimizeForWindowsApplication, tool.OptimizeForWindowsApplication ); strm << SPair( _OutputFile, tool.OutputFile ); strm << SPair( _PrecompiledHeaderFile, tool.PrecompiledHeaderFile ); strm << SPair( _PrecompiledHeaderThrough, tool.PrecompiledHeaderThrough ); strm << XPair( _PreprocessorDefinitions, tool.PreprocessorDefinitions ); strm << SPair( _ProgramDataBaseFileName, tool.ProgramDataBaseFileName ); strm << EPair( _RuntimeLibrary, tool.RuntimeLibrary ); strm << TPair( _RuntimeTypeInfo, tool.RuntimeTypeInfo ); strm << TPair( _ShowIncludes, tool.ShowIncludes ); strm << TPair( _SmallerTypeCheck, tool.SmallerTypeCheck ); strm << TPair( _StringPooling, tool.StringPooling ); if ( tool.StructMemberAlignment != alignNotSet ) strm << EPair( _StructMemberAlignment, tool.StructMemberAlignment ); strm << TPair( _SuppressStartupBanner, tool.SuppressStartupBanner ); strm << TPair( _TreatWChar_tAsBuiltInType, tool.TreatWChar_tAsBuiltInType ); strm << TPair( _TurnOffAssemblyGeneration, tool.TurnOffAssemblyGeneration ); strm << TPair( _UndefineAllPreprocessorDefinitions, tool.UndefineAllPreprocessorDefinitions ); strm << XPair( _UndefinePreprocessorDefinitions, tool.UndefinePreprocessorDefinitions ); if ( !tool.PrecompiledHeaderFile.isEmpty() || !tool.PrecompiledHeaderThrough.isEmpty() ) strm << EPair( _UsePrecompiledHeader, tool.UsePrecompiledHeader ); strm << TPair( _WarnAsError, tool.WarnAsError ); strm << EPair( _WarningLevel, tool.WarningLevel ); strm << TPair( _WholeProgramOptimization, tool.WholeProgramOptimization ); strm << "/>";return strm;}bool VCCLCompilerTool::parseOption( const char* option ){ // skip index 0 ('/' or '-') char first = option[1]; char second = option[2]; char third = option[3]; char fourth = option[4]; bool found = TRUE; switch ( first ) { case '?': case 'h': qWarning( "Generator: Option '/?', '/help': MSVC.NET projects do not support outputting help info" ); found = FALSE; break; case '@': qWarning( "Generator: Option '/@': MSVC.NET projects do not support the use of a response file" ); found = FALSE; break; case 'l': qWarning( "Generator: Option '/link': qmake generator does not support passing link options through the compiler tool" ); found = FALSE; break; case 'A': if ( second != 'I' ) { found = FALSE; break; } AdditionalUsingDirectories += option+2; break; case 'C': KeepComments = _True; break; case 'D': PreprocessorDefinitions += option+1; break; case 'E': if ( second == 'H' ) { if ( third == 'a' || third == 'c' || third == 's' ) { // ExceptionHandling must be false, or it will override // with an /EHsc option ExceptionHandling = _False; AdditionalOptions += option; break; } found = FALSE; break; } GeneratePreprocessedFile = preprocessYes; break; case 'F': if ( second <= '9' && second >= '0' ) { AdditionalOptions += option; break; } else { switch ( second ) { case 'A': if ( third == 'c' ) { AssemblerOutput = asmListingAsmMachine; if ( fourth == 's' ) AssemblerOutput = asmListingAsmMachineSrc; } else if ( third == 's' ) { AssemblerOutput = asmListingAsmSrc; } else { AssemblerOutput = asmListingAssemblyOnly; } break; case 'a': AssemblerListingLocation = option+3; break; case 'I': ForcedIncludeFiles += option+3; break; case 'R': BrowseInformation = brAllInfo; BrowseInformationFile = option+3; break; case 'r': BrowseInformation = brNoLocalSymbols; BrowseInformationFile = option+3; break; case 'U': ForcedUsingFiles += option+3; break; case 'd': ProgramDataBaseFileName = option+3; break; case 'e': OutputFile = option+3; break; case 'm': AdditionalOptions += option; break; case 'o': ObjectFile = option+3; break; case 'p': PrecompiledHeaderFile = option+3; break; case 'x': ExpandAttributedSource = _True; break; default: found = FALSE; break; } } break; case 'G': switch ( second ) { case '3': case '4': qWarning( "Option '/G3' and '/G4' were phased out in Visual C++ 5.0" ); found = FALSE; break; case '5': OptimizeForProcessor = procOptimizePentium; break; case '6': case 'B': OptimizeForProcessor = procOptimizePentiumProAndAbove; break; case 'A': OptimizeForWindowsApplication = _True; break; case 'F': StringPooling = _True; break; case 'H': AdditionalOptions += option; break; case 'L': WholeProgramOptimization = _True; if ( third == '-' ) WholeProgramOptimization = _False; break; case 'R': RuntimeTypeInfo = _True; if ( third == '-' ) RuntimeTypeInfo = _False; break; case 'S': BufferSecurityCheck = _True; break; case 'T': EnableFiberSafeOptimizations = _True; break; case 'X': case 'Z': case 'e': case 'h': AdditionalOptions += option; break; case 'd': CallingConvention = callConventionCDecl; break; case 'f': StringPooling = _True; AdditionalOptions += option; break; case 'm': MinimalRebuild = _True; if ( third == '-' ) MinimalRebuild = _False; break; case 'r': CallingConvention = callConventionFastCall; break; case 's': // Warning: following [num] is not used, // were should we put it? BufferSecurityCheck = _True; break; case 'y': EnableFunctionLevelLinking = _True; break; case 'z': CallingConvention = callConventionStdCall; break; default: found = FALSE; break; } break; case 'H': AdditionalOptions += option; break; case 'I': AdditionalIncludeDirectories += option+2; break; case 'L': if ( second == 'D' ) { AdditionalOptions += option; break; } found = FALSE; break; case 'M': if ( second == 'D' ) { RuntimeLibrary = rtMultiThreadedDLL; if ( third == 'd' ) RuntimeLibrary = rtMultiThreadedDebugDLL; break; } else if ( second == 'L' ) { RuntimeLibrary = rtSingleThreaded; if ( third == 'd' ) RuntimeLibrary = rtSingleThreadedDebug; break; } else if ( second == 'T' ) { RuntimeLibrary = rtMultiThreaded; if ( third == 'd' ) RuntimeLibrary = rtMultiThreadedDebug; break; } found = FALSE; break; case 'O': switch ( second ) { case '1': Optimization = optimizeMinSpace; break; case '2': Optimization = optimizeMaxSpeed; break; case 'a': AdditionalOptions += option; break; case 'b': if ( third == '0' ) InlineFunctionExpansion = expandDisable; else if ( third == '1' ) InlineFunctionExpansion = expandOnlyInline; else if ( third == '2' ) InlineFunctionExpansion = expandAnySuitable; else found = FALSE; break; case 'd': Optimization = optimizeDisabled; break; case 'g': GlobalOptimizations = _True; break; case 'i': EnableIntrinsicFunctions = _True; break; case 'p': ImproveFloatingPointConsistency = _True; if ( third == '-' ) ImproveFloatingPointConsistency = _False; break; case 's': FavorSizeOrSpeed = favorSize; break; case 't': FavorSizeOrSpeed = favorSpeed; break; case 'w': AdditionalOptions += option; break; case 'x': Optimization = optimizeFull; break; case 'y': OmitFramePointers = _True; if ( third == '-' ) OmitFramePointers = _False; break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -