当前位置: 首页>>代码示例>>C#>>正文


C# CPPEnvironment.CompileFiles方法代码示例

本文整理汇总了C#中UnrealBuildTool.CPPEnvironment.CompileFiles方法的典型用法代码示例。如果您正苦于以下问题:C# CPPEnvironment.CompileFiles方法的具体用法?C# CPPEnvironment.CompileFiles怎么用?C# CPPEnvironment.CompileFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnrealBuildTool.CPPEnvironment的用法示例。


在下文中一共展示了CPPEnvironment.CompileFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Compile


//.........这里部分代码省略.........

                        if( SharedPCHHeaderFile != null )
                        {
                            // Disallow DLLExports when generating shared PCHs.  These headers aren't able to export anything, because they're potentially shared between many modules.
                            bAllowDLLExports = false;

                            // Save shared PCHs to a specific folder
                            PCHOutputDirectory = Path.Combine( CompileEnvironment.Config.OutputDirectory, "SharedPCHs" );

                            // Use a fake module name for "shared" PCHs.  It may be used by many modules, so we don't want to use this module's name.
                            PCHModuleName = "Shared";
                        }

                        var PCHOutput = PrecompileHeaderEnvironment.GeneratePCHCreationAction(
                            CPPFilesToBuild[0].PCHHeaderNameInCode,
                            ModulePCHEnvironment.PrecompiledHeaderIncludeFilename,
                            ModuleCompileEnvironment,
                            PCHOutputDirectory,
                            PCHModuleName,
                            bAllowDLLExports );
                        ModulePCHEnvironment.PrecompiledHeaderFile = PCHOutput.PrecompiledHeaderFile;

                        ModulePCHEnvironment.OutputObjectFiles.Clear();
                        ModulePCHEnvironment.OutputObjectFiles.AddRange( PCHOutput.ObjectFiles );
                    }

                    if( ModulePCHEnvironment.PrecompiledHeaderFile != null )
                    {
                        // Link in the object files produced by creating the precompiled header.
                        LinkInputFiles.AddRange( ModulePCHEnvironment.OutputObjectFiles );

                        // if pch action was generated for the environment then use pch
                        ModulePCHCompileEnvironment.PrecompiledHeaderFile = ModulePCHEnvironment.PrecompiledHeaderFile;
                        LinkInputFiles.AddRange( ModulePCHCompileEnvironment.CompileFiles( CPPFilesToBuild, Name ).ObjectFiles );
                    }
                    else
                    {
                        // otherwise, compile non-pch
                        LinkInputFiles.AddRange( ModuleCompileEnvironment.CompileFiles( CPPFilesToBuild, Name ).ObjectFiles );
                    }

                    bWasModuleCodeCompiled = true;
                }

                if( BuildConfiguration.bPrintPerformanceInfo )
                {
                var TotalPCHTime = DateTime.UtcNow - PCHTimerStart;
                    Trace.TraceInformation( "PCH time for " + Name + " is " + TotalPCHTime.TotalSeconds + "s (shared PCHs: " + SharedPCHTotalTime + "s)" );
                }
            }

            if( !bWasModuleCodeCompiled )
            {
                if( CPPFiles.Count > 0 )
                {
                    var CPPFilesToCompile = CPPFiles;
                    if (bModuleUsesUnityBuild)
                    {
                        CPPFilesToCompile = Unity.GenerateUnityCPPs( CPPFilesToCompile, ModuleCompileEnvironment, Name );
                    }
                    LinkInputFiles.AddRange( ModuleCompileEnvironment.CompileFiles( CPPFilesToCompile, Name ).ObjectFiles );
                }
            }

            // Compile C files directly.
            LinkInputFiles.AddRange(ModuleCompileEnvironment.CompileFiles(CFiles, Name).ObjectFiles);
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:67,代码来源:UEBuildModule.cs


注:本文中的UnrealBuildTool.CPPEnvironment.CompileFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。