You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Can be used to reduce the number of build actions that will be run in parallel by ParallelExecutor or TaskExecutor.
Example use, in MyProject.Target.cs:
public class MyProjectTarget : TargetRules
{
public MyProjectTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "MyProject" } );
MemoryPerActionGB = 4;
}
}
#jira none
#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 17546182 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17546186 by jonathan adamczewski in ue5-release-engine-test branch]
35 lines
836 B
C#
35 lines
836 B
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
abstract class ActionExecutor
|
|
{
|
|
public abstract string Name
|
|
{
|
|
get;
|
|
}
|
|
|
|
static protected double MemoryPerActionBytesOverride
|
|
{
|
|
get;
|
|
private set;
|
|
} = 0.0;
|
|
|
|
/// <summary>
|
|
/// Allow targets to override the expected amount of memory required for compiles, used to control the number
|
|
/// of parallel action processes.
|
|
/// </summary>
|
|
/// <param name="MemoryPerActionOverrideGB"></param>
|
|
public static void SetMemoryPerActionOverride(double MemoryPerActionOverrideGB)
|
|
{
|
|
MemoryPerActionBytesOverride = Math.Max(MemoryPerActionBytesOverride, MemoryPerActionOverrideGB * 1024 * 1024 * 1024);
|
|
}
|
|
|
|
public abstract bool ExecuteActions(List<LinkedAction> ActionsToExecute);
|
|
}
|
|
|
|
}
|