本文整理汇总了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);