2019-12-26 23:01:54 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
2018-01-02 15:30:26 -05:00
using System ;
2016-12-13 11:58:16 -05:00
using System.Collections.Generic ;
using System.Linq ;
2019-03-13 11:41:19 -04:00
using System.Reflection ;
2017-08-31 12:08:38 -04:00
using Tools.DotNETCommon ;
2016-12-13 11:58:16 -05:00
namespace UnrealBuildTool
{
2017-01-30 16:52:08 -05:00
/// <summary>
/// The type of target
/// </summary>
[Serializable]
public enum TargetType
{
/// <summary>
/// Cooked monolithic game executable (GameName.exe). Also used for a game-agnostic engine executable (UE4Game.exe or RocketGame.exe)
/// </summary>
Game ,
/// <summary>
/// Uncooked modular editor executable and DLLs (UE4Editor.exe, UE4Editor*.dll, GameName*.dll)
/// </summary>
Editor ,
/// <summary>
/// Cooked monolithic game client executable (GameNameClient.exe, but no server code)
/// </summary>
Client ,
/// <summary>
/// Cooked monolithic game server executable (GameNameServer.exe, but no client code)
/// </summary>
Server ,
/// <summary>
/// Program (standalone program, e.g. ShaderCompileWorker.exe, can be modular or monolithic depending on the program)
/// </summary>
Program ,
}
/// <summary>
/// Specifies how to link all the modules in this target
/// </summary>
[Serializable]
public enum TargetLinkType
{
/// <summary>
/// Use the default link type based on the current target type
/// </summary>
Default ,
/// <summary>
/// Link all modules into a single binary
/// </summary>
Monolithic ,
/// <summary>
/// Link modules into individual dynamic libraries
/// </summary>
Modular ,
}
/// <summary>
/// Specifies whether to share engine binaries and intermediates with other projects, or to create project-specific versions. By default,
/// editor builds always use the shared build environment (and engine binaries are written to Engine/Binaries/Platform), but monolithic builds
/// and programs do not (except in installed builds). Using the shared build environment prevents target-specific modifications to the build
/// environment.
/// </summary>
[Serializable]
public enum TargetBuildEnvironment
{
/// <summary>
/// Engine binaries and intermediates are output to the engine folder. Target-specific modifications to the engine build environment will be ignored.
/// </summary>
Shared ,
/// <summary>
/// Engine binaries and intermediates are specific to this target
/// </summary>
Unique ,
}
2019-09-06 15:59:52 -04:00
/// <summary>
/// Determines which version of the engine to take default build settings from. This allows for backwards compatibility as new options are enabled by default.
/// </summary>
public enum BuildSettingsVersion
{
/// <summary>
/// Legacy default build settings for 4.23 and earlier.
/// </summary>
V1 ,
/// <summary>
/// New defaults for 4.24: ModuleRules.PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs, ModuleRules.bLegacyPublicIncludePaths = false.
/// </summary>
V2 ,
// *** When adding new entries here, be sure to update GameProjectUtils::GetDefaultBuildSettingsVersion() to ensure that new projects are created correctly. ***
/// <summary>
/// Always use the defaults for the current engine version. Note that this may cause compatibility issues when upgrading.
/// </summary>
Latest
}
2018-01-11 16:07:16 -05:00
/// <summary>
/// Attribute used to mark fields which much match between targets in the shared build environment
/// </summary>
2018-11-27 09:02:34 -05:00
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
2018-01-11 16:07:16 -05:00
class RequiresUniqueBuildEnvironmentAttribute : Attribute
{
}
2019-03-13 11:41:19 -04:00
/// <summary>
/// Attribute used to mark configurable sub-objects
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
class ConfigSubObjectAttribute : Attribute
{
}
2016-12-13 11:58:16 -05:00
/// <summary>
/// TargetRules is a data structure that contains the rules for defining a target (application/executable)
/// </summary>
2019-05-03 08:03:23 -04:00
public abstract partial class TargetRules
2016-12-13 11:58:16 -05:00
{
/// <summary>
2017-01-30 16:52:08 -05:00
/// Static class wrapping constants aliasing the global TargetType enum.
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public static class TargetType
2016-12-13 11:58:16 -05:00
{
/// <summary>
2017-01-30 16:52:08 -05:00
/// Alias for TargetType.Game
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public const global :: UnrealBuildTool . TargetType Game = global :: UnrealBuildTool . TargetType . Game ;
2016-12-13 11:58:16 -05:00
/// <summary>
2017-01-30 16:52:08 -05:00
/// Alias for TargetType.Editor
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public const global :: UnrealBuildTool . TargetType Editor = global :: UnrealBuildTool . TargetType . Editor ;
2016-12-13 11:58:16 -05:00
/// <summary>
2017-01-30 16:52:08 -05:00
/// Alias for TargetType.Client
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public const global :: UnrealBuildTool . TargetType Client = global :: UnrealBuildTool . TargetType . Client ;
2016-12-13 11:58:16 -05:00
/// <summary>
2017-01-30 16:52:08 -05:00
/// Alias for TargetType.Server
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public const global :: UnrealBuildTool . TargetType Server = global :: UnrealBuildTool . TargetType . Server ;
2016-12-13 11:58:16 -05:00
/// <summary>
2017-01-30 16:52:08 -05:00
/// Alias for TargetType.Program
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public const global :: UnrealBuildTool . TargetType Program = global :: UnrealBuildTool . TargetType . Program ;
2016-12-13 11:58:16 -05:00
}
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// The name of this target.
2017-01-30 16:52:08 -05:00
/// </summary>
public readonly string Name ;
2018-10-30 12:58:16 -04:00
/// <summary>
/// File containing this target
/// </summary>
internal FileReference File ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Platform that this target is being built for.
2017-01-30 16:52:08 -05:00
/// </summary>
public readonly UnrealTargetPlatform Platform ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// The configuration being built.
2017-01-30 16:52:08 -05:00
/// </summary>
public readonly UnrealTargetConfiguration Configuration ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Architecture that the target is being built for (or an empty string for the default).
2017-01-30 16:52:08 -05:00
/// </summary>
public readonly string Architecture ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Path to the project file for the project containing this target.
2017-01-30 16:52:08 -05:00
/// </summary>
public readonly FileReference ProjectFile ;
2018-01-11 16:07:16 -05:00
/// <summary>
/// The current build version
/// </summary>
public readonly ReadOnlyBuildVersion Version ;
2016-12-13 11:58:16 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// The type of target.
2016-12-13 11:58:16 -05:00
/// </summary>
2017-01-30 16:52:08 -05:00
public global :: UnrealBuildTool . TargetType Type = global :: UnrealBuildTool . TargetType . Game ;
2016-12-13 11:58:16 -05:00
2019-09-06 15:59:52 -04:00
/// <summary>
/// Specifies the engine version to maintain backwards-compatible default build settings with (eg. DefaultSettingsVersion.Release_4_23, DefaultSettingsVersion.Release_4_24). Specify DefaultSettingsVersion.Latest to always
/// use defaults for the current engine version, at the risk of introducing build errors while upgrading.
/// </summary>
2019-10-02 14:56:47 -04:00
public BuildSettingsVersion DefaultBuildSettings
{
get { return DefaultBuildSettingsPrivate ? ? BuildSettingsVersion . V1 ; }
set { DefaultBuildSettingsPrivate = value ; }
}
private BuildSettingsVersion ? DefaultBuildSettingsPrivate ; // Cannot be initialized inline; potentially overridden before the constructor is called.
2019-09-06 15:59:52 -04:00
2019-06-10 19:47:29 -04:00
/// <summary>
/// Tracks a list of config values read while constructing this target
/// </summary>
internal ConfigValueTracker ConfigValueTracker = new ConfigValueTracker ( ) ;
2016-12-13 11:58:16 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether the target uses Steam.
2016-12-13 11:58:16 -05:00
/// </summary>
public bool bUsesSteam ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether the target uses CEF3.
2016-12-13 11:58:16 -05:00
/// </summary>
public bool bUsesCEF3 ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether the project uses visual Slate UI (as opposed to the low level windowing/messaging, which is always available).
2016-12-13 11:58:16 -05:00
/// </summary>
public bool bUsesSlate = true ;
/// <summary>
2019-09-30 15:13:56 -04:00
/// Forces linking against the static CRT. This is not fully supported across the engine due to the need for allocator implementations to be shared (for example), and TPS
2016-12-13 11:58:16 -05:00
/// libraries to be consistent with each other, but can be used for utility programs.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2016-12-13 11:58:16 -05:00
public bool bUseStaticCRT = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Enables the debug C++ runtime (CRT) for debug builds. By default we always use the release runtime, since the debug
/// version isn't particularly useful when debugging Unreal Engine projects, and linking against the debug CRT libraries forces
/// our third party library dependencies to also be compiled using the debug CRT (and often perform more slowly). Often
2016-12-13 11:58:16 -05:00
/// it can be inconvenient to require a separate copy of the debug versions of third party static libraries simply
/// so that you can debug your program's code.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[XmlConfigFile(Category = "BuildConfiguration")]
2016-12-13 11:58:16 -05:00
public bool bDebugBuildsActuallyUseDebugCRT = false ;
/// <summary>
2019-09-30 15:13:56 -04:00
/// Whether the output from this target can be publicly distributed, even if it has dependencies on modules that are in folders
2017-03-14 15:48:33 -04:00
/// with special restrictions (eg. CarefullyRedist, NotForLicensees, NoRedist).
2016-12-13 11:58:16 -05:00
/// </summary>
2019-07-29 15:00:54 -04:00
public bool bLegalToDistributeBinary = false ;
/// <summary>
/// Obsolete. Use bLegalToDistributeBinary instead.
/// </summary>
[Obsolete("bOutputPubliclyDistributable has been deprecated in 4.24. Use bLegalToDistributeBinary instead.")]
public bool bOutputPubliclyDistributable
{
get { return bLegalToDistributeBinary ; }
set { bLegalToDistributeBinary = value ; }
}
2016-12-13 11:58:16 -05:00
/// <summary>
/// Specifies the configuration whose binaries do not require a "-Platform-Configuration" suffix.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2016-12-13 11:58:16 -05:00
public UnrealTargetConfiguration UndecoratedConfiguration = UnrealTargetConfiguration . Development ;
2020-04-10 11:30:32 -04:00
/// <summary>
/// Whether this target supports hot reload
/// </summary>
public bool bAllowHotReload
{
get { return bAllowHotReloadOverride ? ? ( Type = = TargetType . Editor & & LinkType = = TargetLinkType . Modular ) ; }
set { bAllowHotReloadOverride = value ; }
}
private bool? bAllowHotReloadOverride ;
2016-12-13 11:58:16 -05:00
/// <summary>
2019-09-30 15:13:56 -04:00
/// Build all the plugins that we can find, even if they're not enabled. This is particularly useful for content-only projects,
2016-12-13 11:58:16 -05:00
/// where you're building the UE4Editor target but running it with a game that enables a plugin.
/// </summary>
2018-01-20 11:19:29 -05:00
[Obsolete("bBuildAllPlugins has been deprecated. Use bPrecompile to build all modules which are not part of the target.")]
2016-12-13 11:58:16 -05:00
public bool bBuildAllPlugins = false ;
2018-08-14 18:32:34 -04:00
/// <summary>
/// Build all the modules that are valid for this target type. Used for CIS and making installed engine builds.
/// </summary>
[CommandLine("-AllModules")]
public bool bBuildAllModules = false ;
2019-11-07 15:55:07 -05:00
/// <summary>
/// Additional plugins that are built for this target type but not enabled.
/// </summary>
[CommandLine("-BuildPlugin=", ListSeparator = '+')]
public List < string > BuildPlugins = new List < string > ( ) ;
2016-12-13 11:58:16 -05:00
/// <summary>
/// A list of additional plugins which need to be included in this target. This allows referencing non-optional plugin modules
/// which cannot be disabled, and allows building against specific modules in program targets which do not fit the categories
/// in ModuleHostType.
/// </summary>
public List < string > AdditionalPlugins = new List < string > ( ) ;
2018-05-23 21:04:31 -04:00
/// <summary>
2018-06-15 19:00:49 -04:00
/// Additional plugins that should be included for this target.
/// </summary>
[CommandLine("-EnablePlugin=", ListSeparator = '+')]
public List < string > EnablePlugins = new List < string > ( ) ;
/// <summary>
/// List of plugins to be disabled for this target. Note that the project file may still reference them, so they should be marked
2018-05-23 21:04:31 -04:00
/// as optional to avoid failing to find them at runtime.
/// </summary>
2018-06-15 19:00:49 -04:00
[CommandLine("-DisablePlugin=", ListSeparator = '+')]
public List < string > DisablePlugins = new List < string > ( ) ;
/// <summary>
/// Accessor for
/// </summary>
[Obsolete("The ExcludePlugins setting has been renamed to DisablePlugins. Please update your code to avoid build failures in future versions of the engine.")]
public List < string > ExcludePlugins
{
get { return DisablePlugins ; }
}
2018-05-23 21:04:31 -04:00
2016-12-13 11:58:16 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Path to the set of pak signing keys to embed in the executable.
2016-12-13 11:58:16 -05:00
/// </summary>
public string PakSigningKeysFile = "" ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Allows a Program Target to specify it's own solution folder path.
2016-12-13 11:58:16 -05:00
/// </summary>
public string SolutionDirectory = String . Empty ;
2017-04-26 08:28:56 -04:00
/// <summary>
/// Whether the target should be included in the default solution build configuration
/// </summary>
public bool? bBuildInSolutionByDefault = null ;
2017-03-24 09:53:37 -04:00
/// <summary>
/// Whether this target should be compiled as a DLL. Requires LinkType to be set to TargetLinkType.Monolithic.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2019-02-28 17:02:41 -05:00
[CommandLine("-CompileAsDll")]
2017-03-24 09:53:37 -04:00
public bool bShouldCompileAsDLL = false ;
2019-09-30 15:13:56 -04:00
2016-12-13 11:58:16 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Subfolder to place executables in, relative to the default location.
2016-12-13 11:58:16 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2016-12-13 11:58:16 -05:00
public string ExeBinariesSubFolder = String . Empty ;
/// <summary>
/// Allow target module to override UHT code generation version.
/// </summary>
public EGeneratedCodeVersion GeneratedCodeVersion = EGeneratedCodeVersion . None ;
2018-07-31 02:23:26 -04:00
/// <summary>
2018-12-14 12:51:26 -05:00
/// Whether to enable the mesh editor.
2018-07-31 02:23:26 -04:00
/// </summary>
[RequiresUniqueBuildEnvironment]
2019-07-17 08:08:20 -04:00
public bool bEnableMeshEditor = false ;
2018-07-31 02:23:26 -04:00
2018-12-14 12:51:26 -05:00
/// <summary>
/// Whether to compile the Chaos physics plugin.
/// </summary>
[RequiresUniqueBuildEnvironment]
2020-01-08 02:00:17 -05:00
[CommandLine("-NoCompileChaos", Value = "false")]
2020-01-15 14:42:16 -05:00
[CommandLine("-CompileChaos", Value = "true")]
2020-03-19 14:37:43 -04:00
public bool bCompileChaos = true ;
2018-07-31 02:23:26 -04:00
2018-12-14 12:51:26 -05:00
/// <summary>
/// Whether to use the Chaos physics interface. This overrides the physx flags to disable APEX and NvCloth
/// </summary>
[RequiresUniqueBuildEnvironment]
2020-01-08 02:00:17 -05:00
[CommandLine("-NoUseChaos", Value = "false")]
2020-01-15 14:42:16 -05:00
[CommandLine("-UseChaos", Value = "true")]
2020-03-19 14:37:43 -04:00
public bool bUseChaos = true ;
2018-12-14 12:51:26 -05:00
/// <summary>
2019-08-06 18:04:01 -04:00
/// Whether to compile in checked chaos features for debugging
2018-12-14 12:51:26 -05:00
/// </summary>
[RequiresUniqueBuildEnvironment]
2019-08-06 18:04:01 -04:00
public bool bUseChaosChecked = false ;
2018-07-31 02:23:26 -04:00
2019-10-02 17:27:26 -04:00
/// <summary>
/// Whether to compile in chaos memory tracking features
/// </summary>
[RequiresUniqueBuildEnvironment]
public bool bUseChaosMemoryTracking = false ;
2018-12-14 12:51:26 -05:00
/// <summary>
/// Whether scene query acceleration is done by UE4. The physx scene query structure is still created, but we do not use it.
/// </summary>
[RequiresUniqueBuildEnvironment]
2019-06-10 19:47:29 -04:00
public bool bCustomSceneQueryStructure = false ;
2018-12-14 12:51:26 -05:00
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to include PhysX support.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bCompilePhysX = true ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to include PhysX APEX support.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileApex")]
public bool bCompileAPEX = true ;
2017-02-08 17:53:41 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to include NvCloth.
2017-02-08 17:53:41 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-10-06 04:43:18 -04:00
public bool bCompileNvCloth = true ;
2019-09-30 15:13:56 -04:00
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to include ICU unicode/i18n support in Core.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileICU")]
public bool bCompileICU = true ;
/// <summary>
/// Whether to compile CEF3 support.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileCEF3")]
public bool bCompileCEF3 = true ;
2019-12-13 23:35:01 -05:00
/// <summary>
/// Whether to compile using ISPC.
/// </summary>
[RequiresUniqueBuildEnvironment]
public bool bCompileISPC = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to compile the editor or not. Only desktop platforms (Windows or Mac) will use this, other platforms force this to false.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-11-27 09:02:34 -05:00
public bool bBuildEditor
{
get { return ( Type = = TargetType . Editor ) ; }
set { Log . TraceWarning ( "Setting {0}.bBuildEditor is deprecated. Set {0}.Type instead." , GetType ( ) . Name ) ; }
}
2019-01-10 20:03:35 -05:00
2017-01-30 16:52:08 -05:00
/// <summary>
/// Whether to compile code related to building assets. Consoles generally cannot build assets. Desktop platforms generally can.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2019-09-06 16:22:36 -04:00
public bool bBuildRequiresCookedData
{
get { return bBuildRequiresCookedDataOverride ? ? ( Type = = TargetType . Game | | Type = = TargetType . Client | | Type = = TargetType . Server ) ; }
set { bBuildRequiresCookedDataOverride = value ; }
}
bool? bBuildRequiresCookedDataOverride ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2019-09-06 16:22:36 -04:00
public bool bBuildWithEditorOnlyData
{
get { return bBuildWithEditorOnlyDataOverride ? ? ( Type = = TargetType . Editor | | Type = = TargetType . Program ) ; }
set { bBuildWithEditorOnlyDataOverride = value ; }
}
private bool? bBuildWithEditorOnlyDataOverride ;
2017-01-30 16:52:08 -05:00
2018-11-27 09:02:34 -05:00
/// <summary>
/// Manually specified value for bBuildDeveloperTools.
/// </summary>
bool? bBuildDeveloperToolsOverride ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// Whether to compile the developer tools.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2018-11-27 09:02:34 -05:00
public bool bBuildDeveloperTools
{
set { bBuildDeveloperToolsOverride = value ; }
2019-08-30 16:40:52 -04:00
get { return bBuildDeveloperToolsOverride ? ? ( bCompileAgainstEngine & & ( Type = = TargetType . Editor | | Type = = TargetType . Program | | ( Configuration ! = UnrealTargetConfiguration . Test & & Configuration ! = UnrealTargetConfiguration . Shipping ) ) ) ; }
2018-11-27 09:02:34 -05:00
}
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to force compiling the target platform modules, even if they wouldn't normally be built.
2017-01-30 16:52:08 -05:00
/// </summary>
public bool bForceBuildTargetPlatforms = false ;
/// <summary>
/// Whether to force compiling shader format modules, even if they wouldn't normally be built.
/// </summary>
public bool bForceBuildShaderFormats = false ;
2018-11-27 09:02:34 -05:00
/// <summary>
2019-01-10 20:03:35 -05:00
/// Whether we should compile SQLite using the custom "Unreal" platform (true), or using the native platform (false).
/// </summary>
[RequiresUniqueBuildEnvironment]
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileCustomSQLitePlatform")]
public bool bCompileCustomSQLitePlatform = true ;
/// <summary>
2017-01-30 16:52:08 -05:00
/// Whether to compile lean and mean version of UE.
/// </summary>
2018-11-27 09:02:34 -05:00
[Obsolete("bCompileLeanAndMeanUE is deprecated. Set bBuildDeveloperTools to the opposite value instead.")]
public bool bCompileLeanAndMeanUE
{
get { return ! bBuildDeveloperTools ; }
set { bBuildDeveloperTools = ! value ; }
}
2017-01-30 16:52:08 -05:00
2019-09-30 15:13:56 -04:00
/// <summary>
2017-06-08 10:21:39 -04:00
/// Whether to utilize cache freed OS allocs with MallocBinned
2017-01-30 16:52:08 -05:00
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-06-08 10:21:39 -04:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bUseCacheFreedOSAllocs")]
2019-09-30 15:13:56 -04:00
public bool bUseCacheFreedOSAllocs = true ;
2017-06-08 10:21:39 -04:00
2019-09-30 15:13:56 -04:00
/// <summary>
/// Enabled for all builds that include the engine project. Disabled only when building standalone apps that only link with Core.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2019-09-30 15:13:56 -04:00
public bool bCompileAgainstEngine = true ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bCompileAgainstCoreUObject = true ;
2018-08-14 18:32:34 -04:00
/// <summary>
/// Enabled for builds that need to initialize the ApplicationCore module. Command line utilities do not normally need this.
/// </summary>
[RequiresUniqueBuildEnvironment]
public bool bCompileAgainstApplicationCore = true ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to compile Recast navmesh generation.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileRecast")]
public bool bCompileRecast = true ;
/// <summary>
/// Whether to compile SpeedTree support.
/// </summary>
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileSpeedTree")]
2018-11-27 09:02:34 -05:00
bool? bOverrideCompileSpeedTree ;
/// <summary>
/// Whether we should compile in support for Simplygon or not.
/// </summary>
[RequiresUniqueBuildEnvironment]
public bool bCompileSpeedTree
{
set { bOverrideCompileSpeedTree = value ; }
get { return bOverrideCompileSpeedTree ? ? Type = = TargetType . Editor ; }
}
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Enable exceptions for all modules.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bForceEnableExceptions = false ;
2017-12-12 18:32:45 -05:00
/// <summary>
/// Enable inlining for all modules.
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-12-12 18:32:45 -05:00
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseInlining = true ;
2017-08-15 16:16:21 -04:00
/// <summary>
/// Enable exceptions for all modules.
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-08-15 16:16:21 -04:00
public bool bForceEnableObjCExceptions = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Enable RTTI for all modules.
2017-01-30 16:52:08 -05:00
/// </summary>
2019-10-21 16:11:26 -04:00
[CommandLine("-rtti")]
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bForceEnableRTTI = false ;
/// <summary>
/// Compile server-only code.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2019-09-06 16:22:36 -04:00
public bool bWithServerCode
{
get { return bWithServerCodeOverride ? ? ( Type ! = TargetType . Client ) ; }
set { bWithServerCodeOverride = value ; }
}
private bool? bWithServerCodeOverride ;
2017-01-30 16:52:08 -05:00
2020-01-14 11:48:31 -05:00
/// <summary>
2020-02-21 16:39:20 -05:00
/// When enabled, Push Model Networking support will be compiled in.
/// This can help reduce CPU overhead of networking, at the cost of more memory.
/// Always enabled in editor builds.
2020-01-14 11:48:31 -05:00
/// </summary>
[RequiresUniqueBuildEnvironment]
2020-02-21 16:39:20 -05:00
public bool bWithPushModel
{
get
{
return bWithPushModelOverride ? ? ( bBuildEditor ) ;
}
set
{
bWithPushModelOverride = value ;
}
}
private bool? bWithPushModelOverride ;
2020-01-14 11:48:31 -05:00
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to include stats support even without the engine.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bCompileWithStatsWithoutEngine = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to include plugin support.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileWithPluginSupport")]
public bool bCompileWithPluginSupport = false ;
2017-07-21 17:56:56 -04:00
/// <summary>
/// Whether to allow plugins which support all target platforms.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2019-09-06 16:22:36 -04:00
public bool bIncludePluginsForTargetPlatforms
{
get { return bIncludePluginsForTargetPlatformsOverride ? ? ( Type = = TargetType . Editor ) ; }
set { bIncludePluginsForTargetPlatformsOverride = value ; }
}
private bool? bIncludePluginsForTargetPlatformsOverride ;
2017-07-21 17:56:56 -04:00
2019-06-07 05:27:42 -04:00
/// <summary>
/// Whether to allow accessibility code in both Slate and the OS layer.
/// </summary>
[RequiresUniqueBuildEnvironment]
public bool bCompileWithAccessibilitySupport = true ;
/// <summary>
/// Whether to include PerfCounters support.
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2019-09-06 16:22:36 -04:00
public bool bWithPerfCounters
{
get { return bWithPerfCountersOverride ? ? ( Type = = TargetType . Editor | | Type = = TargetType . Server ) ; }
set { bWithPerfCountersOverride = value ; }
}
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bWithPerfCounters")]
2019-09-06 16:22:36 -04:00
bool? bWithPerfCountersOverride ;
2017-01-30 16:52:08 -05:00
2019-03-06 18:16:41 -05:00
/// <summary>
/// Whether to enable support for live coding
/// </summary>
[RequiresUniqueBuildEnvironment]
2019-07-11 14:39:32 -04:00
public bool bWithLiveCoding
{
get { return bWithLiveCodingPrivate ? ? ( Platform = = UnrealTargetPlatform . Win64 & & Configuration ! = UnrealTargetConfiguration . Shipping & & Type ! = TargetType . Program ) ; }
set { bWithLiveCodingPrivate = value ; }
}
bool? bWithLiveCodingPrivate ;
2019-03-06 18:16:41 -05:00
2019-05-22 11:57:41 -04:00
/// <summary>
/// Whether to enable support for live coding
/// </summary>
[RequiresUniqueBuildEnvironment]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseDebugLiveCodingConsole = false ;
2019-06-03 06:48:38 -04:00
/// <summary>
/// Whether to enable support for DirectX Math
/// </summary>
[RequiresUniqueBuildEnvironment]
public bool bWithDirectXMath = false ;
2019-05-22 11:57:41 -04:00
/// <summary>
/// Whether to turn on logging for test/shipping builds.
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2019-09-30 15:13:56 -04:00
public bool bUseLoggingInShipping = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to turn on logging to memory for test/shipping builds.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bLoggingToMemoryEnabled ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to check that the process was launched through an external launcher.
2017-01-30 16:52:08 -05:00
/// </summary>
2019-09-30 15:13:56 -04:00
public bool bUseLauncherChecks = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to turn on checks (asserts) for test/shipping builds.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bUseChecksInShipping = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// True if we need FreeType support.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileFreeType")]
public bool bCompileFreeType = true ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// True if we want to favor optimizing size over speed.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-04-26 14:11:04 -04:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[ConfigFile(ConfigHierarchyType.Engine, "/Script/BuildSettings.BuildSettings", "bCompileForSize")]
public bool bCompileForSize = false ;
2019-09-30 15:13:56 -04:00
/// <summary>
/// Whether to compile development automation tests.
/// </summary>
public bool bForceCompileDevelopmentAutomationTests = false ;
2017-01-30 16:52:08 -05:00
2019-09-30 15:13:56 -04:00
/// <summary>
/// Whether to compile performance automation tests.
/// </summary>
public bool bForceCompilePerformanceAutomationTests = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// If true, event driven loader will be used in cooked builds. @todoio This needs to be replaced by a runtime solution after async loading refactor.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
public bool bEventDrivenLoader ;
2017-09-07 22:18:47 -04:00
/// <summary>
/// Whether the XGE controller worker and modules should be included in the engine build.
/// These are required for distributed shader compilation using the XGE interception interface.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseXGEController = true ;
2018-01-20 11:19:29 -05:00
/// <summary>
/// Whether to use backwards compatible defaults for this module. By default, engine modules always use the latest default settings, while project modules do not (to support
/// an easier migration path).
/// </summary>
2019-09-06 15:59:52 -04:00
[Obsolete("Set DefaultBuildSettings to the appropriate engine version (eg. BuildSettingsVersion.Release_4_23) or BuildSettingsVersion.Latest instead")]
public bool bUseBackwardsCompatibleDefaults
{
get { return DefaultBuildSettings ! = BuildSettingsVersion . Latest ; }
set { DefaultBuildSettings = ( value ? BuildSettingsVersion . V1 : BuildSettingsVersion . Latest ) ; }
}
2018-01-20 11:19:29 -05:00
2017-10-24 10:14:07 -04:00
/// <summary>
2019-09-06 15:59:52 -04:00
/// Enables "include what you use" by default for modules in this target. Changes the default PCH mode for any module in this project to PCHUsageMode.UseExplicitOrSharedPCHs.
2017-10-24 10:14:07 -04:00
/// </summary>
[CommandLine("-IWYU")]
public bool bIWYU = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// Enforce "include what you use" rules; warns if monolithic headers (Engine.h, UnrealEd.h, etc...) are used, and checks that source files include their matching header first.
/// </summary>
public bool bEnforceIWYU = true ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether the final executable should export symbols.
2017-01-30 16:52:08 -05:00
/// </summary>
2019-09-06 16:22:36 -04:00
public bool bHasExports
{
get { return bHasExportsOverride ? ? ( LinkType = = TargetLinkType . Modular ) ; }
set { bHasExportsOverride = value ; }
}
private bool? bHasExportsOverride ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Make static libraries for all engine modules as intermediates for this target.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-Precompile")]
public bool bPrecompile = false ;
/// <summary>
/// Whether we should compile with support for OS X 10.9 Mavericks. Used for some tools that we need to be compatible with this version of OS X.
/// </summary>
public bool bEnableOSX109Support = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// True if this is a console application that's being built.
2017-01-30 16:52:08 -05:00
/// </summary>
public bool bIsBuildingConsoleApplication = false ;
2019-06-10 19:47:29 -04:00
/// <summary>
/// If true, creates an additional console application. Hack for Windows, where it's not possible to conditionally inherit a parent's console Window depending on how
/// the application is invoked; you have to link the same executable with a different subsystem setting.
/// </summary>
2019-09-06 16:22:36 -04:00
public bool bBuildAdditionalConsoleApp
{
get { return bBuildAdditionalConsoleAppOverride ? ? ( Type = = TargetType . Editor ) ; }
set { bBuildAdditionalConsoleAppOverride = value ; }
}
private bool? bBuildAdditionalConsoleAppOverride ;
2019-06-10 19:47:29 -04:00
2017-01-30 16:52:08 -05:00
/// <summary>
/// True if debug symbols that are cached for some platforms should not be created.
/// </summary>
public bool bDisableSymbolCache = true ;
/// <summary>
/// Whether to unify C++ code into larger files for faster compilation.
/// </summary>
[CommandLine("-DisableUnity", Value = "false")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseUnityBuild = true ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to force C++ source files to be combined into larger files for faster compilation.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-ForceUnity")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bForceUnityBuild = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Use a heuristic to determine which files are currently being iterated on and exclude them from unity blobs, result in faster
/// incremental compile times. The current implementation uses the read-only flag to distinguish the working set, assuming that files will
/// be made writable by the source control system if they are being modified. This is true for Perforce, but not for Git.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseAdaptiveUnityBuild = true ;
/// <summary>
/// Disable optimization for files that are in the adaptive non-unity working set.
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
2017-08-07 15:12:17 -04:00
public bool bAdaptiveUnityDisablesOptimizations = false ;
2017-01-30 16:52:08 -05:00
2017-02-21 15:51:42 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Disables force-included PCHs for files that are in the adaptive non-unity working set.
2017-02-21 15:51:42 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
2019-03-20 13:00:14 -04:00
public bool bAdaptiveUnityDisablesPCH = false ;
2017-02-21 15:51:42 -05:00
2019-02-22 02:09:30 -05:00
/// <summary>
/// Backing storage for bAdaptiveUnityDisablesProjectPCH.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
bool? bAdaptiveUnityDisablesProjectPCHForProjectPrivate ;
/// <summary>
/// Whether to disable force-included PCHs for project source files in the adaptive non-unity working set. Defaults to bAdaptiveUnityDisablesPCH;
/// </summary>
public bool bAdaptiveUnityDisablesPCHForProject
{
get { return bAdaptiveUnityDisablesProjectPCHForProjectPrivate ? ? bAdaptiveUnityDisablesPCH ; }
set { bAdaptiveUnityDisablesProjectPCHForProjectPrivate = value ; }
}
2018-08-14 18:32:34 -04:00
/// <summary>
/// Creates a dedicated PCH for each source file in the working set, allowing faster iteration on cpp-only changes.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bAdaptiveUnityCreatesDedicatedPCH = false ;
/// <summary>
/// Creates a dedicated PCH for each source file in the working set, allowing faster iteration on cpp-only changes.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bAdaptiveUnityEnablesEditAndContinue = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// The number of source files in a game module before unity build will be activated for that module. This
/// allows small game modules to have faster iterative compile times for single files, at the expense of slower full
/// rebuild times. This setting can be overridden by the bFasterWithoutUnity option in a module's Build.cs file.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public int MinGameModuleSourceFilesForUnityBuild = 32 ;
/// <summary>
/// Forces shadow variable warnings to be treated as errors on platforms that support it.
/// </summary>
2019-10-25 10:39:37 -04:00
[CommandLine("-ShadowVariableErrors", Value = nameof(WarningLevel.Error))]
public WarningLevel ShadowVariableWarningLevel = WarningLevel . Warning ;
/// <summary>
/// Forces shadow variable warnings to be treated as errors on platforms that support it.
/// </summary>
[Obsolete("bShadowVariableErrors is deprecated in UE 4.24. Set ShadowVariableWarningLevel = WarningLevel.Error instead.")]
public bool bShadowVariableErrors
{
get { return ShadowVariableWarningLevel = = WarningLevel . Error ; }
set { ShadowVariableWarningLevel = ( value ? WarningLevel . Error : WarningLevel . Warning ) ; }
}
2017-01-30 16:52:08 -05:00
2020-01-17 13:27:48 -05:00
/// <summary>
/// Indicates what warning/error level to treat unsafe type casts as on platforms that support it (e.g., double->float or int64->int32)
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public WarningLevel UnsafeTypeCastWarningLevel = WarningLevel . Off ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Forces the use of undefined identifiers in conditional expressions to be treated as errors.
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
2018-04-26 14:11:04 -04:00
public bool bUndefinedIdentifierErrors = true ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// New Monolithic Graphics drivers have optional "fast calls" replacing various D3d functions
/// </summary>
[CommandLine("-FastMonoCalls", Value = "true")]
[CommandLine("-NoFastMonoCalls", Value = "false")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseFastMonoCalls = true ;
/// <summary>
/// New Xbox driver supports a "fast semantics" context type. This switches it on for the immediate and deferred contexts
/// Try disabling this if you see rendering issues and/or crashes inthe Xbox RHI.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseFastSemanticsRenderContexts = true ;
/// <summary>
/// An approximate number of bytes of C++ code to target for inclusion in a single unified C++ file.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public int NumIncludedBytesPerUnityCPP = 384 * 1024 ;
/// <summary>
/// Whether to stress test the C++ unity build robustness by including all C++ files files in a project from a single unified file.
/// </summary>
[CommandLine("-StressTestUnity")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bStressTestUnity = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to force debug info to be generated.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-ForceDebugInfo")]
public bool bForceDebugInfo = false ;
/// <summary>
/// Whether to globally disable debug info generation; see DebugInfoHeuristics.cs for per-config and per-platform options.
/// </summary>
[CommandLine("-NoDebugInfo")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bDisableDebugInfo = false ;
/// <summary>
/// Whether to disable debug info generation for generated files. This improves link times for modules that have a lot of generated glue code.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
2018-09-25 10:11:35 -04:00
public bool bDisableDebugInfoForGeneratedCode = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to disable debug info on PC in development builds (for faster developer iteration, as link times are extremely fast with debug info disabled).
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bOmitPCDebugInfoInDevelopment = false ;
/// <summary>
/// Whether PDB files should be used for Visual C++ builds.
/// </summary>
[CommandLine("-NoPDB", Value = "false")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUsePDBFiles = false ;
/// <summary>
/// Whether PCH files should be used.
/// </summary>
[CommandLine("-NoPCH", Value = "false")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUsePCHFiles = true ;
2019-09-23 15:26:04 -04:00
/// <summary>
/// Whether to just preprocess source files for this target, and skip compilation
/// </summary>
[CommandLine("-Preprocess")]
public bool bPreprocessOnly = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// The minimum number of files that must use a pre-compiled header before it will be created and used.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public int MinFilesUsingPrecompiledHeader = 6 ;
/// <summary>
/// When enabled, a precompiled header is always generated for game modules, even if there are only a few source files
/// in the module. This greatly improves compile times for iterative changes on a few files in the project, at the expense of slower
/// full rebuild times for small game projects. This can be overridden by setting MinFilesUsingPrecompiledHeaderOverride in
2017-03-14 15:48:33 -04:00
/// a module's Build.cs file.
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bForcePrecompiledHeaderForGameModules = true ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to use incremental linking or not. Incremental linking can yield faster iteration times when making small changes.
/// Currently disabled by default because it tends to behave a bit buggy on some computers (PDB-related compile errors).
2017-01-30 16:52:08 -05:00
/// </summary>
2018-05-23 21:04:31 -04:00
[CommandLine("-IncrementalLinking")]
2019-05-31 13:05:31 -04:00
[CommandLine("-NoIncrementalLinking", Value = "false")]
2017-01-30 16:52:08 -05:00
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseIncrementalLinking = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to allow the use of link time code generation (LTCG).
2017-01-30 16:52:08 -05:00
/// </summary>
2017-11-09 18:22:55 -05:00
[CommandLine("-LTCG")]
2017-01-30 16:52:08 -05:00
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bAllowLTCG = false ;
2019-09-30 15:13:56 -04:00
/// <summary>
/// Whether to enable Profile Guided Optimization (PGO) instrumentation in this build.
/// </summary>
[CommandLine("-PGOProfile", Value = "true")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bPGOProfile = false ;
2017-12-05 21:57:41 -05:00
2019-09-30 15:13:56 -04:00
/// <summary>
/// Whether to optimize this build with Profile Guided Optimization (PGO).
/// </summary>
[CommandLine("-PGOOptimize", Value = "true")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bPGOOptimize = false ;
2017-12-05 21:57:41 -05:00
2019-09-30 15:13:56 -04:00
/// <summary>
/// Whether to allow the use of ASLR (address space layout randomization) if supported. Only
/// applies to shipping builds.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
2017-01-30 16:52:08 -05:00
public bool bAllowASLRInShipping = true ;
/// <summary>
2018-08-14 18:32:34 -04:00
/// Whether to support edit and continue. Only works on Microsoft compilers.
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bSupportEditAndContinue = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to omit frame pointers or not. Disabling is useful for e.g. memory profiling on the PC.
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bOmitFramePointers = true ;
/// <summary>
/// Whether to strip iOS symbols or not (implied by bGeneratedSYMFile).
/// </summary>
2018-11-23 19:06:39 -05:00
[Obsolete("bStripSymbolsOnIOS has been deprecated. Use IOSPlatform.bStripSymbols instead.")]
public bool bStripSymbolsOnIOS
{
get { return IOSPlatform . bStripSymbols ; }
set { IOSPlatform . bStripSymbols = value ; }
}
/// <summary>
/// If true, then a stub IPA will be generated when compiling is done (minimal files needed for a valid IPA).
/// </summary>
[Obsolete("bCreateStubIPA has been deprecated. Use IOSPlatform.bCreateStubIPA instead.")]
public bool bCreateStubIPA
{
get { return IOSPlatform . bCreateStubIPA ; }
set { IOSPlatform . bCreateStubIPA = value ; }
}
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// If true, then enable memory profiling in the build (defines USE_MALLOC_PROFILER=1 and forces bOmitFramePointers=false).
2017-01-30 16:52:08 -05:00
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseMallocProfiler = false ;
/// <summary>
/// Enables "Shared PCHs", a feature which significantly speeds up compile times by attempting to
2017-03-14 15:48:33 -04:00
/// share certain PCH files between modules that UBT detects is including those PCH's header files.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-NoSharedPCH", Value = "false")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseSharedPCHs = true ;
/// <summary>
/// True if Development and Release builds should use the release configuration of PhysX/APEX.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseShippingPhysXLibraries = false ;
2019-09-30 15:13:56 -04:00
/// <summary>
/// True if Development and Release builds should use the checked configuration of PhysX/APEX. if bUseShippingPhysXLibraries is true this is ignored.
/// </summary>
2017-01-30 16:52:08 -05:00
[XmlConfigFile(Category = "BuildConfiguration")]
2019-09-30 15:13:56 -04:00
public bool bUseCheckedPhysXLibraries = false ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// Tells the UBT to check if module currently being built is violating EULA.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bCheckLicenseViolations = true ;
/// <summary>
/// Tells the UBT to break build if module currently being built is violating EULA.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bBreakBuildOnLicenseViolation = true ;
/// <summary>
/// Whether to use the :FASTLINK option when building with /DEBUG to create local PDBs on Windows. Fast, but currently seems to have problems finding symbols in the debugger.
/// </summary>
[CommandLine("-FastPDB")]
[XmlConfigFile(Category = "BuildConfiguration")]
2018-04-26 14:11:04 -04:00
public bool? bUseFastPDBLinking ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Outputs a map file as part of the build.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-MapFile")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bCreateMapFile = false ;
2019-10-11 07:21:22 -04:00
/// <summary>
/// True if runtime symbols files should be generated as a post build step for some platforms.
/// These files are used by the engine to resolve symbol names of callstack backtraces in logs.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bAllowRuntimeSymbolFiles = true ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Bundle version for Mac apps.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-BundleVersion")]
public string BundleVersion = null ;
/// <summary>
/// Whether to deploy the executable after compilation on platforms that require deployment.
/// </summary>
[CommandLine("-Deploy")]
2018-02-22 11:25:06 -05:00
[CommandLine("-SkipDeploy", Value = "false")]
2017-01-30 16:52:08 -05:00
public bool bDeployAfterCompile = false ;
/// <summary>
/// When enabled, allows XGE to compile pre-compiled header files on remote machines. Otherwise, PCHs are always generated locally.
/// </summary>
public bool bAllowRemotelyCompiledPCHs = false ;
/// <summary>
/// Whether headers in system paths should be checked for modification when determining outdated actions.
/// </summary>
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bCheckSystemHeadersForModification ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to disable linking for this target.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-NoLink")]
public bool bDisableLinking = false ;
/// <summary>
/// Indicates that this is a formal build, intended for distribution. This flag is automatically set to true when Build.version has a changelist set.
2019-09-30 15:13:56 -04:00
/// The only behavior currently bound to this flag is to compile the default resource file separately for each binary so that the OriginalFilename field is set correctly.
2017-01-30 16:52:08 -05:00
/// By default, we only compile the resource once to reduce build times.
/// </summary>
[CommandLine("-Formal")]
public bool bFormalBuild = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to clean Builds directory on a remote Mac before building.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-FlushMac")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bFlushBuildDirOnRemoteMac = false ;
/// <summary>
2017-03-14 15:48:33 -04:00
/// Whether to write detailed timing info from the compiler and linker.
2017-01-30 16:52:08 -05:00
/// </summary>
[CommandLine("-Timing")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bPrintToolChainTimingInfo = false ;
2019-04-18 15:07:10 -04:00
/// <summary>
/// Whether to parse timing data into a tracing file compatible with chrome://tracing.
/// </summary>
[CommandLine("-Tracing")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bParseTimingInfoForTracing = false ;
2017-12-05 21:57:41 -05:00
/// <summary>
2019-06-07 05:27:42 -04:00
/// Whether to expose all symbols as public by default on POSIX platforms
2017-12-05 21:57:41 -05:00
/// </summary>
2019-06-07 05:27:42 -04:00
[CommandLine("-PublicSymbolsByDefault")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bPublicSymbolsByDefault = false ;
2017-12-05 21:57:41 -05:00
2018-02-22 11:25:06 -05:00
/// <summary>
/// Allows overriding the toolchain to be created for this target. This must match the name of a class declared in the UnrealBuildTool assembly.
/// </summary>
[CommandLine("-ToolChain")]
public string ToolChainName = null ;
2018-11-19 10:12:17 -05:00
/// <summary>
/// Whether to allow engine configuration to determine if we can load unverified certificates.
/// </summary>
public bool bDisableUnverifiedCertificates = false ;
2018-10-24 13:03:31 -04:00
/// <summary>
/// Whether to load generated ini files in cooked build, (GameUserSettings.ini loaded either way)
/// </summary>
public bool bAllowGeneratedIniWhenCooked = true ;
/// <summary>
/// Whether to load non-ufs ini files in cooked build, (GameUserSettings.ini loaded either way)
/// </summary>
public bool bAllowNonUFSIniWhenCooked = true ;
2017-12-05 21:57:41 -05:00
2017-01-30 16:52:08 -05:00
/// <summary>
2018-01-20 11:19:29 -05:00
/// Add all the public folders as include paths for the compile environment.
2017-01-30 16:52:08 -05:00
/// </summary>
2019-09-06 15:59:52 -04:00
public bool bLegacyPublicIncludePaths
{
get { return bLegacyPublicIncludePathsPrivate ? ? ( DefaultBuildSettings < BuildSettingsVersion . V2 ) ; }
set { bLegacyPublicIncludePathsPrivate = value ; }
}
private bool? bLegacyPublicIncludePathsPrivate ;
2017-01-30 16:52:08 -05:00
2019-01-04 10:13:55 -05:00
/// <summary>
/// Which C++ stanard to use for compiling this target
/// </summary>
[RequiresUniqueBuildEnvironment]
2020-01-29 14:48:18 -05:00
[CommandLine("-CppStd")]
2019-01-04 10:13:55 -05:00
[XmlConfigFile(Category = "BuildConfiguration")]
public CppStandardVersion CppStandard = CppStandardVersion . Default ;
2018-10-29 21:23:02 -04:00
/// <summary>
/// Do not allow manifest changes when building this target. Used to cause earlier errors when building multiple targets with a shared build environment.
/// </summary>
[CommandLine("-NoManifestChanges")]
internal bool bNoManifestChanges = false ;
2018-04-26 14:11:04 -04:00
/// <summary>
/// The build version string
/// </summary>
2018-08-14 18:32:34 -04:00
[CommandLine("-BuildVersion")]
2018-04-26 14:11:04 -04:00
public string BuildVersion ;
2016-12-13 11:58:16 -05:00
/// <summary>
/// Specifies how to link modules in this target (monolithic or modular). This is currently protected for backwards compatibility. Call the GetLinkType() accessor
/// until support for the deprecated ShouldCompileMonolithic() override has been removed.
/// </summary>
public TargetLinkType LinkType
{
get
{
2017-01-30 16:52:08 -05:00
return ( LinkTypePrivate ! = TargetLinkType . Default ) ? LinkTypePrivate : ( ( Type = = global :: UnrealBuildTool . TargetType . Editor ) ? TargetLinkType . Modular : TargetLinkType . Monolithic ) ;
2016-12-13 11:58:16 -05:00
}
set
{
LinkTypePrivate = value ;
}
}
/// <summary>
/// Backing storage for the LinkType property.
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2017-01-30 16:52:08 -05:00
[CommandLine("-Monolithic", Value ="Monolithic")]
[CommandLine("-Modular", Value ="Modular")]
2017-03-14 15:48:33 -04:00
TargetLinkType LinkTypePrivate = TargetLinkType . Default ;
2016-12-13 11:58:16 -05:00
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Macros to define globally across the whole target.
2017-01-30 16:52:08 -05:00
/// </summary>
2018-01-11 16:07:16 -05:00
[RequiresUniqueBuildEnvironment]
2018-08-09 17:55:56 -04:00
[CommandLine("-Define:")]
2017-01-30 16:52:08 -05:00
public List < string > GlobalDefinitions = new List < string > ( ) ;
2018-01-20 11:19:29 -05:00
/// <summary>
/// Macros to define across all macros in the project.
/// </summary>
public List < string > ProjectDefinitions = new List < string > ( ) ;
2017-01-30 16:52:08 -05:00
/// <summary>
/// Specifies the name of the launch module. For modular builds, this is the module that is compiled into the target's executable.
/// </summary>
public string LaunchModuleName
{
get
{
return ( LaunchModuleNamePrivate = = null & & Type ! = global :: UnrealBuildTool . TargetType . Program ) ? "Launch" : LaunchModuleNamePrivate ;
}
set
{
LaunchModuleNamePrivate = value ;
}
}
/// <summary>
/// Backing storage for the LaunchModuleName property.
/// </summary>
private string LaunchModuleNamePrivate ;
2019-02-25 17:09:31 -05:00
/// <summary>
/// Specifies the path to write a header containing public definitions for this target. Useful when building a DLL to be consumed by external build processes.
/// </summary>
public string ExportPublicHeader ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// List of additional modules to be compiled into the target.
2017-01-30 16:52:08 -05:00
/// </summary>
public List < string > ExtraModuleNames = new List < string > ( ) ;
2018-08-14 18:32:34 -04:00
/// <summary>
/// Path to a manifest to output for this target
/// </summary>
[CommandLine("-Manifest")]
public List < FileReference > ManifestFileNames = new List < FileReference > ( ) ;
/// <summary>
/// Path to a list of dependencies for this target, when precompiling
/// </summary>
[CommandLine("-DependencyList")]
public List < FileReference > DependencyListFileNames = new List < FileReference > ( ) ;
2017-01-30 16:52:08 -05:00
/// <summary>
2019-05-03 13:03:54 -04:00
/// Backing storage for the BuildEnvironment property
2017-01-30 16:52:08 -05:00
/// </summary>
2018-04-26 14:11:04 -04:00
[CommandLine("-SharedBuildEnvironment", Value = "Shared")]
[CommandLine("-UniqueBuildEnvironment", Value = "Unique")]
2019-05-03 13:03:54 -04:00
private TargetBuildEnvironment ? BuildEnvironmentOverride ;
/// <summary>
/// Specifies the build environment for this target. See TargetBuildEnvironment for more information on the available options.
/// </summary>
public TargetBuildEnvironment BuildEnvironment
{
get
{
if ( BuildEnvironmentOverride . HasValue )
{
return BuildEnvironmentOverride . Value ;
}
if ( Type = = TargetType . Program & & ProjectFile ! = null & & File . IsUnderDirectory ( ProjectFile . Directory ) )
{
return TargetBuildEnvironment . Unique ;
}
else if ( UnrealBuildTool . IsEngineInstalled ( ) | | LinkType ! = TargetLinkType . Monolithic )
{
return TargetBuildEnvironment . Shared ;
}
else
{
return TargetBuildEnvironment . Unique ;
}
}
2019-09-30 15:13:56 -04:00
set
{
BuildEnvironmentOverride = value ;
2019-05-03 13:03:54 -04:00
}
}
2017-01-30 16:52:08 -05:00
2019-02-26 13:26:57 -05:00
/// <summary>
/// Whether to ignore violations to the shared build environment (eg. editor targets modifying definitions)
/// </summary>
[CommandLine("-OverrideBuildEnvironment")]
public bool bOverrideBuildEnvironment = false ;
2020-03-12 14:08:52 -04:00
/// <summary>
/// Specifies a list of targets which should be built before this target is built.
/// </summary>
public List < TargetInfo > PreBuildTargets = new List < TargetInfo > ( ) ;
2017-07-21 17:56:56 -04:00
/// <summary>
/// Specifies a list of steps which should be executed before this target is built, in the context of the host platform's shell.
2019-09-30 15:13:56 -04:00
/// The following variables will be expanded before execution:
2017-07-21 17:56:56 -04:00
/// $(EngineDir), $(ProjectDir), $(TargetName), $(TargetPlatform), $(TargetConfiguration), $(TargetType), $(ProjectFile).
/// </summary>
public List < string > PreBuildSteps = new List < string > ( ) ;
/// <summary>
/// Specifies a list of steps which should be executed after this target is built, in the context of the host platform's shell.
2019-09-30 15:13:56 -04:00
/// The following variables will be expanded before execution:
2017-07-21 17:56:56 -04:00
/// $(EngineDir), $(ProjectDir), $(TargetName), $(TargetPlatform), $(TargetConfiguration), $(TargetType), $(ProjectFile).
/// </summary>
public List < string > PostBuildSteps = new List < string > ( ) ;
2018-09-17 14:00:25 -04:00
/// <summary>
/// Specifies additional build products produced as part of this target.
/// </summary>
public List < string > AdditionalBuildProducts = new List < string > ( ) ;
2018-04-26 14:11:04 -04:00
/// <summary>
/// Additional arguments to pass to the compiler
/// </summary>
[RequiresUniqueBuildEnvironment]
2018-10-02 08:19:53 -04:00
[CommandLine("-CompilerArguments=")]
2018-04-26 14:11:04 -04:00
public string AdditionalCompilerArguments ;
/// <summary>
/// Additional arguments to pass to the linker
/// </summary>
[RequiresUniqueBuildEnvironment]
2018-10-02 08:19:53 -04:00
[CommandLine("-LinkerArguments=")]
2018-04-26 14:11:04 -04:00
public string AdditionalLinkerArguments ;
2019-06-20 03:53:43 -04:00
/// <summary>
/// List of modules to disable unity builds for
/// </summary>
[XmlConfigFile(Category = "ModuleConfiguration", Name = "DisableUnityBuild")]
public string [ ] DisableUnityBuildForModules = null ;
/// <summary>
/// List of modules to enable optimizations for
/// </summary>
[XmlConfigFile(Category = "ModuleConfiguration", Name = "EnableOptimizeCode")]
public string [ ] EnableOptimizeCodeForModules = null ;
/// <summary>
/// List of modules to disable optimizations for
/// </summary>
[XmlConfigFile(Category = "ModuleConfiguration", Name = "DisableOptimizeCode")]
public string [ ] DisableOptimizeCodeForModules = null ;
2018-10-24 13:03:31 -04:00
/// <summary>
/// When generating project files, specifies the name of the project file to use when there are multiple targets of the same type.
/// </summary>
public string GeneratedProjectName ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Android-specific target settings.
2017-01-30 16:52:08 -05:00
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2017-01-30 16:52:08 -05:00
public AndroidTargetRules AndroidPlatform = new AndroidTargetRules ( ) ;
2018-05-23 21:04:31 -04:00
/// <summary>
/// IOS-specific target settings.
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2018-05-23 21:04:31 -04:00
public IOSTargetRules IOSPlatform = new IOSTargetRules ( ) ;
2018-05-10 14:17:01 -04:00
/// <summary>
/// Lumin-specific target settings.
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2018-05-10 14:17:01 -04:00
public LuminTargetRules LuminPlatform = new LuminTargetRules ( ) ;
2018-09-12 15:59:49 -04:00
/// <summary>
/// Linux-specific target settings.
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2018-09-12 15:59:49 -04:00
public LinuxTargetRules LinuxPlatform = new LinuxTargetRules ( ) ;
2017-02-03 16:54:59 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Mac-specific target settings.
2017-02-03 16:54:59 -05:00
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2017-02-03 16:54:59 -05:00
public MacTargetRules MacPlatform = new MacTargetRules ( ) ;
2017-02-21 15:51:42 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// PS4-specific target settings.
2017-02-21 15:51:42 -05:00
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2017-02-21 15:51:42 -05:00
public PS4TargetRules PS4Platform = new PS4TargetRules ( ) ;
2018-05-14 09:49:35 -04:00
/// <summary>
/// Switch-specific target settings.
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2018-05-14 09:49:35 -04:00
public SwitchTargetRules SwitchPlatform = new SwitchTargetRules ( ) ;
2017-01-30 16:52:08 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Windows-specific target settings.
2017-01-30 16:52:08 -05:00
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2019-07-11 14:39:32 -04:00
public WindowsTargetRules WindowsPlatform ; // Requires 'this' parameter; initialized in constructor
2017-01-30 16:52:08 -05:00
2017-02-21 15:51:42 -05:00
/// <summary>
2017-03-14 15:48:33 -04:00
/// Xbox One-specific target settings.
2017-02-21 15:51:42 -05:00
/// </summary>
2019-03-13 11:41:19 -04:00
[ConfigSubObject]
2017-02-21 15:51:42 -05:00
public XboxOneTargetRules XboxOnePlatform = new XboxOneTargetRules ( ) ;
2019-06-10 19:47:29 -04:00
/// <summary>
/// HoloLens-specific target settings.
/// </summary>
2019-10-28 04:53:02 -04:00
[ConfigSubObject]
2020-03-13 16:21:18 -04:00
public HoloLensTargetRules HoloLensPlatform ;
2019-06-10 19:47:29 -04:00
2017-01-30 16:52:08 -05:00
/// <summary>
2018-01-20 11:19:29 -05:00
/// Constructor.
2017-01-30 16:52:08 -05:00
/// </summary>
/// <param name="Target">Information about the target being built</param>
public TargetRules ( TargetInfo Target )
{
2018-01-20 11:19:29 -05:00
this . Name = Target . Name ;
this . Platform = Target . Platform ;
this . Configuration = Target . Configuration ;
this . Architecture = Target . Architecture ;
this . ProjectFile = Target . ProjectFile ;
this . Version = Target . Version ;
2019-07-11 14:39:32 -04:00
this . WindowsPlatform = new WindowsTargetRules ( this ) ;
2020-03-13 16:21:18 -04:00
this . HoloLensPlatform = new HoloLensTargetRules ( Target ) ;
2017-01-30 16:52:08 -05:00
// Read settings from config files
2019-10-02 14:56:47 -04:00
foreach ( object ConfigurableObject in GetConfigurableObjects ( ) )
2017-01-30 16:52:08 -05:00
{
2019-06-10 19:47:29 -04:00
ConfigCache . ReadSettings ( DirectoryReference . FromFile ( ProjectFile ) , Platform , ConfigurableObject , ConfigValueTracker ) ;
2018-08-21 10:17:30 -04:00
XmlConfig . ApplyTo ( ConfigurableObject ) ;
2019-09-26 09:49:06 -04:00
if ( Target . Arguments ! = null )
{
Target . Arguments . ApplyTo ( ConfigurableObject ) ;
}
2017-01-30 16:52:08 -05:00
}
// If we've got a changelist set, set that we're making a formal build
2018-01-20 11:19:29 -05:00
bFormalBuild = ( Version . Changelist ! = 0 & & Version . IsPromotedBuild ) ;
2017-01-30 16:52:08 -05:00
2019-05-31 14:26:50 -04:00
// Allow the build platform to set defaults for this target
UEBuildPlatform . GetBuildPlatform ( Platform ) . ResetTarget ( this ) ;
2018-04-26 14:11:04 -04:00
// Set the default build version
2018-08-14 18:32:34 -04:00
if ( String . IsNullOrEmpty ( BuildVersion ) )
{
if ( String . IsNullOrEmpty ( Target . Version . BuildVersionString ) )
{
BuildVersion = String . Format ( "{0}-CL-{1}" , Target . Version . BranchName , Target . Version . Changelist ) ;
}
else
{
BuildVersion = Target . Version . BuildVersionString ;
}
}
2018-04-26 14:11:04 -04:00
2018-01-20 11:19:29 -05:00
// Setup macros for signing and encryption keys
EncryptionAndSigning . CryptoSettings CryptoSettings = EncryptionAndSigning . ParseCryptoSettings ( DirectoryReference . FromFile ( ProjectFile ) , Platform ) ;
if ( CryptoSettings . IsAnyEncryptionEnabled ( ) )
{
2018-02-05 18:11:15 -05:00
ProjectDefinitions . Add ( String . Format ( "IMPLEMENT_ENCRYPTION_KEY_REGISTRATION()=UE_REGISTER_ENCRYPTION_KEY({0})" , FormatHexBytes ( CryptoSettings . EncryptionKey . Key ) ) ) ;
2018-01-20 11:19:29 -05:00
}
2018-02-05 18:11:15 -05:00
else
{
ProjectDefinitions . Add ( "IMPLEMENT_ENCRYPTION_KEY_REGISTRATION()=" ) ;
}
2019-01-23 10:59:53 -05:00
if ( CryptoSettings . IsPakSigningEnabled ( ) )
2018-01-20 11:19:29 -05:00
{
2018-02-05 18:11:15 -05:00
ProjectDefinitions . Add ( String . Format ( "IMPLEMENT_SIGNING_KEY_REGISTRATION()=UE_REGISTER_SIGNING_KEY(UE_LIST_ARGUMENT({0}), UE_LIST_ARGUMENT({1}))" , FormatHexBytes ( CryptoSettings . SigningKey . PublicKey . Exponent ) , FormatHexBytes ( CryptoSettings . SigningKey . PublicKey . Modulus ) ) ) ;
2018-01-20 11:19:29 -05:00
}
2018-02-05 18:11:15 -05:00
else
{
ProjectDefinitions . Add ( "IMPLEMENT_SIGNING_KEY_REGISTRATION()=" ) ;
}
}
/// <summary>
/// Formats an array of bytes as a sequence of values
/// </summary>
/// <param name="Data">The data to convert into a string</param>
/// <returns>List of hexadecimal bytes</returns>
private static string FormatHexBytes ( byte [ ] Data )
{
return String . Join ( "," , Data . Select ( x = > String . Format ( "0x{0:X2}" , x ) ) ) ;
2017-01-30 16:52:08 -05:00
}
/// <summary>
/// Override any settings required for the selected target type
/// </summary>
internal void SetOverridesForTargetType ( )
{
if ( Type = = global :: UnrealBuildTool . TargetType . Game )
{
GlobalDefinitions . Add ( "UE_GAME=1" ) ;
}
else if ( Type = = global :: UnrealBuildTool . TargetType . Client )
{
GlobalDefinitions . Add ( "UE_GAME=1" ) ;
2019-09-09 18:31:08 -04:00
GlobalDefinitions . Add ( "UE_CLIENT=1" ) ;
2017-01-30 16:52:08 -05:00
}
else if ( Type = = global :: UnrealBuildTool . TargetType . Editor )
{
GlobalDefinitions . Add ( "UE_EDITOR=1" ) ;
}
else if ( Type = = global :: UnrealBuildTool . TargetType . Server )
{
GlobalDefinitions . Add ( "UE_SERVER=1" ) ;
GlobalDefinitions . Add ( "USE_NULL_RHI=1" ) ;
}
}
2018-11-08 11:26:52 -05:00
/// <summary>
/// Checks whether nativization is enabled for this target, and determine the path for the nativized plugin
/// </summary>
/// <returns>The nativized plugin file, or null if nativization is not enabled</returns>
internal FileReference GetNativizedPlugin ( )
{
if ( ProjectFile ! = null & & ( Type = = TargetType . Game | | Type = = TargetType . Client | | Type = = TargetType . Server ) )
{
// Read the config files for this project
ConfigHierarchy Config = ConfigCache . ReadHierarchy ( ConfigHierarchyType . Game , ProjectFile . Directory , BuildHostPlatform . Current . Platform ) ;
if ( Config ! = null )
{
// Determine whether or not the user has enabled nativization of Blueprint assets at cook time (default is 'Disabled')
string NativizationMethod ;
if ( Config . TryGetValue ( "/Script/UnrealEd.ProjectPackagingSettings" , "BlueprintNativizationMethod" , out NativizationMethod ) & & NativizationMethod ! = "Disabled" )
{
string PlatformName ;
if ( Platform = = UnrealTargetPlatform . Win32 | | Platform = = UnrealTargetPlatform . Win64 )
{
PlatformName = "Windows" ;
}
else
{
PlatformName = Platform . ToString ( ) ;
}
// Temp fix to force platforms that only support "Game" configurations at cook time to the correct path.
string ProjectTargetType ;
if ( Platform = = UnrealTargetPlatform . Win32 | | Platform = = UnrealTargetPlatform . Win64 | | Platform = = UnrealTargetPlatform . Linux | | Platform = = UnrealTargetPlatform . Mac )
{
ProjectTargetType = Type . ToString ( ) ;
}
else
{
ProjectTargetType = "Game" ;
}
FileReference PluginFile = FileReference . Combine ( ProjectFile . Directory , "Intermediate" , "Plugins" , "NativizedAssets" , PlatformName , ProjectTargetType , "NativizedAssets.uplugin" ) ;
if ( FileReference . Exists ( PluginFile ) )
{
return PluginFile ;
}
else
{
Log . TraceWarning ( "{0} is configured for nativization, but is missing the generated code plugin at \"{1}\". Make sure to cook {2} data before attempting to build the {3} target. If data was cooked with nativization enabled, this can also mean there were no Blueprint assets that required conversion, in which case this warning can be safely ignored." , Name , PluginFile . FullName , Type . ToString ( ) , Platform . ToString ( ) ) ;
}
}
}
}
return null ;
}
2018-12-08 15:58:08 -05:00
/// <summary>
/// Gets a list of platforms that this target supports
/// </summary>
/// <returns>Array of platforms that the target supports</returns>
internal UnrealTargetPlatform [ ] GetSupportedPlatforms ( )
{
// Otherwise take the SupportedPlatformsAttribute from the first type in the inheritance chain that supports it
for ( Type CurrentType = GetType ( ) ; CurrentType ! = null ; CurrentType = CurrentType . BaseType )
{
2019-08-20 11:35:51 -04:00
object [ ] Attributes = CurrentType . GetCustomAttributes ( typeof ( SupportedPlatformsAttribute ) , false ) ;
2018-12-08 15:58:08 -05:00
if ( Attributes . Length > 0 )
{
return Attributes . OfType < SupportedPlatformsAttribute > ( ) . SelectMany ( x = > x . Platforms ) . Distinct ( ) . ToArray ( ) ;
}
}
// Otherwise, get the default for the target type
if ( Type = = TargetType . Program )
{
return Utils . GetPlatformsInClass ( UnrealPlatformClass . Desktop ) ;
}
else if ( Type = = TargetType . Editor )
{
return Utils . GetPlatformsInClass ( UnrealPlatformClass . Editor ) ;
}
else
{
return Utils . GetPlatformsInClass ( UnrealPlatformClass . All ) ;
}
}
2019-08-20 11:35:51 -04:00
/// <summary>
/// Gets a list of configurations that this target supports
/// </summary>
/// <returns>Array of configurations that the target supports</returns>
internal UnrealTargetConfiguration [ ] GetSupportedConfigurations ( )
{
// Otherwise take the SupportedConfigurationsAttribute from the first type in the inheritance chain that supports it
for ( Type CurrentType = GetType ( ) ; CurrentType ! = null ; CurrentType = CurrentType . BaseType )
{
object [ ] Attributes = CurrentType . GetCustomAttributes ( typeof ( SupportedConfigurationsAttribute ) , false ) ;
if ( Attributes . Length > 0 )
{
return Attributes . OfType < SupportedConfigurationsAttribute > ( ) . SelectMany ( x = > x . Configurations ) . Distinct ( ) . ToArray ( ) ;
}
}
// Otherwise, get the default for the target type
if ( Type = = TargetType . Editor )
{
return new [ ] { UnrealTargetConfiguration . Debug , UnrealTargetConfiguration . DebugGame , UnrealTargetConfiguration . Development } ;
}
else
{
return ( ( UnrealTargetConfiguration [ ] ) Enum . GetValues ( typeof ( UnrealTargetConfiguration ) ) ) . Where ( x = > x ! = UnrealTargetConfiguration . Unknown ) . ToArray ( ) ;
}
}
2017-01-30 16:52:08 -05:00
/// <summary>
/// Finds all the subobjects which can be configured by command line options and config files
/// </summary>
/// <returns>Sequence of objects</returns>
internal IEnumerable < object > GetConfigurableObjects ( )
{
yield return this ;
2019-03-13 11:41:19 -04:00
foreach ( FieldInfo Field in GetType ( ) . GetFields ( BindingFlags . Public | BindingFlags . Instance ) )
{
if ( Field . GetCustomAttribute < ConfigSubObjectAttribute > ( ) ! = null )
{
yield return Field . GetValue ( this ) ;
}
}
2017-01-30 16:52:08 -05:00
}
2017-07-21 17:56:56 -04:00
/// <summary>
/// Gets the host platform being built on
/// </summary>
public UnrealTargetPlatform HostPlatform
{
get { return BuildHostPlatform . Current . Platform ; }
}
2016-12-13 11:58:16 -05:00
/// <summary>
2018-08-14 18:32:34 -04:00
/// Expose the bGenerateProjectFiles flag to targets, so we can modify behavior as appropriate for better intellisense
2016-12-13 11:58:16 -05:00
/// </summary>
2018-08-14 18:32:34 -04:00
public bool bGenerateProjectFiles
2016-12-13 11:58:16 -05:00
{
2018-08-14 18:32:34 -04:00
get { return ProjectFileGenerator . bGenerateProjectFiles ; }
}
/// <summary>
/// Expose a setting for whether or not the engine is installed
/// </summary>
/// <returns>Flag for whether the engine is installed</returns>
public bool bIsEngineInstalled
{
get { return UnrealBuildTool . IsEngineInstalled ( ) ; }
2016-12-13 11:58:16 -05:00
}
2019-09-06 15:59:52 -04:00
/// <summary>
/// Gets diagnostic messages about default settings which have changed in newer versions of the engine
/// </summary>
/// <param name="Diagnostics">List of diagnostic messages</param>
internal void GetBuildSettingsInfo ( List < string > Diagnostics )
{
2019-09-09 08:51:15 -04:00
if ( DefaultBuildSettings < BuildSettingsVersion . V2 )
2019-09-06 15:59:52 -04:00
{
Diagnostics . Add ( "[Upgrade]" ) ;
2019-10-25 10:39:37 -04:00
Diagnostics . Add ( "[Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:" ) ;
2019-09-06 15:59:52 -04:00
List < Tuple < string , string > > ModifiedSettings = new List < Tuple < string , string > > ( ) ;
if ( DefaultBuildSettings < BuildSettingsVersion . V2 )
{
2019-10-25 10:39:37 -04:00
ModifiedSettings . Add ( Tuple . Create ( String . Format ( "{0} = false" , nameof ( bLegacyPublicIncludePaths ) ) , "Omits subfolders from public include paths to reduce compiler command line length. (Previously: true)." ) ) ;
ModifiedSettings . Add ( Tuple . Create ( String . Format ( "{0} = WarningLevel.Error" , nameof ( ShadowVariableWarningLevel ) ) , "Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning)." ) ) ;
ModifiedSettings . Add ( Tuple . Create ( String . Format ( "{0} = PCHUsageMode.UseExplicitOrSharedPCHs" , nameof ( ModuleRules . PCHUsage ) ) , "Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs)." ) ) ;
2019-09-06 15:59:52 -04:00
}
2019-10-25 10:39:37 -04:00
if ( ModifiedSettings . Count > 0 )
2019-09-06 15:59:52 -04:00
{
string FormatString = String . Format ( "[Upgrade] {{0,-{0}}} => {{1}}" , ModifiedSettings . Max ( x = > x . Item1 . Length ) ) ;
foreach ( Tuple < string , string > ModifiedSetting in ModifiedSettings )
{
Diagnostics . Add ( String . Format ( FormatString , ModifiedSetting . Item1 , ModifiedSetting . Item2 ) ) ;
}
}
2019-09-24 16:13:51 -04:00
Diagnostics . Add ( String . Format ( "[Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.{1};' in {2}, and explicitly overriding settings that differ from the new defaults." , Version , ( BuildSettingsVersion ) ( BuildSettingsVersion . Latest - 1 ) , File . GetFileName ( ) ) ) ;
2019-09-06 15:59:52 -04:00
Diagnostics . Add ( "[Upgrade]" ) ;
}
}
2016-12-13 11:58:16 -05:00
}
/// <summary>
/// Read-only wrapper around an existing TargetRules instance. This exposes target settings to modules without letting them to modify the global environment.
/// </summary>
public partial class ReadOnlyTargetRules
{
/// <summary>
/// The writeable TargetRules instance
/// </summary>
TargetRules Inner ;
/// <summary>
/// Constructor
/// </summary>
/// <param name="Inner">The TargetRules instance to wrap around</param>
public ReadOnlyTargetRules ( TargetRules Inner )
{
this . Inner = Inner ;
2017-01-30 16:52:08 -05:00
AndroidPlatform = new ReadOnlyAndroidTargetRules ( Inner . AndroidPlatform ) ;
2018-05-23 21:04:31 -04:00
IOSPlatform = new ReadOnlyIOSTargetRules ( Inner . IOSPlatform ) ;
2018-05-10 14:17:01 -04:00
LuminPlatform = new ReadOnlyLuminTargetRules ( Inner . LuminPlatform ) ;
2018-09-12 15:59:49 -04:00
LinuxPlatform = new ReadOnlyLinuxTargetRules ( Inner . LinuxPlatform ) ;
2017-02-03 16:54:59 -05:00
MacPlatform = new ReadOnlyMacTargetRules ( Inner . MacPlatform ) ;
2017-02-21 15:51:42 -05:00
PS4Platform = new ReadOnlyPS4TargetRules ( Inner . PS4Platform ) ;
2018-05-14 09:49:35 -04:00
SwitchPlatform = new ReadOnlySwitchTargetRules ( Inner . SwitchPlatform ) ;
2017-01-30 16:52:08 -05:00
WindowsPlatform = new ReadOnlyWindowsTargetRules ( Inner . WindowsPlatform ) ;
2017-02-21 15:51:42 -05:00
XboxOnePlatform = new ReadOnlyXboxOneTargetRules ( Inner . XboxOnePlatform ) ;
2019-06-10 19:47:29 -04:00
HoloLensPlatform = new ReadOnlyHoloLensTargetRules ( Inner . HoloLensPlatform ) ;
2016-12-13 11:58:16 -05:00
}
/// <summary>
/// Accessors for fields on the inner TargetRules instance
/// </summary>
2019-09-30 15:13:56 -04:00
#region Read - only accessor properties
2017-04-10 11:00:33 -04:00
#if ! __MonoCS__
2017-01-30 16:52:08 -05:00
#pragma warning disable CS1591
2017-04-10 11:00:33 -04:00
#endif
2016-12-13 11:58:16 -05:00
2017-01-30 16:52:08 -05:00
public string Name
{
get { return Inner . Name ; }
}
2018-10-30 12:58:16 -04:00
internal FileReference File
{
get { return Inner . File ; }
}
2017-01-30 16:52:08 -05:00
public UnrealTargetPlatform Platform
{
get { return Inner . Platform ; }
}
public UnrealTargetConfiguration Configuration
{
get { return Inner . Configuration ; }
}
public string Architecture
{
get { return Inner . Architecture ; }
}
public FileReference ProjectFile
{
get { return Inner . ProjectFile ; }
}
2018-01-11 16:07:16 -05:00
public ReadOnlyBuildVersion Version
{
get { return Inner . Version ; }
}
2017-01-30 16:52:08 -05:00
public TargetType Type
2016-12-13 11:58:16 -05:00
{
get { return Inner . Type ; }
}
2019-09-06 15:59:52 -04:00
public BuildSettingsVersion DefaultBuildSettings
{
get { return Inner . DefaultBuildSettings ; }
}
2019-06-10 19:47:29 -04:00
internal ConfigValueTracker ConfigValueTracker
{
get { return Inner . ConfigValueTracker ; }
}
2016-12-13 11:58:16 -05:00
public bool bUsesSteam
{
get { return Inner . bUsesSteam ; }
}
public bool bUsesCEF3
{
get { return Inner . bUsesCEF3 ; }
}
public bool bUsesSlate
{
get { return Inner . bUsesSlate ; }
}
public bool bUseStaticCRT
{
get { return Inner . bUseStaticCRT ; }
}
public bool bDebugBuildsActuallyUseDebugCRT
{
get { return Inner . bDebugBuildsActuallyUseDebugCRT ; }
}
2019-07-29 15:00:54 -04:00
public bool bLegalToDistributeBinary
2016-12-13 11:58:16 -05:00
{
2019-07-29 15:00:54 -04:00
get { return Inner . bLegalToDistributeBinary ; }
2016-12-13 11:58:16 -05:00
}
public UnrealTargetConfiguration UndecoratedConfiguration
{
get { return Inner . UndecoratedConfiguration ; }
}
2020-04-10 11:30:32 -04:00
public bool bAllowHotReload
{
get { return Inner . bAllowHotReload ; }
}
2018-01-20 11:19:29 -05:00
[Obsolete("bBuildAllPlugins has been deprecated. Use bPrecompile to build all modules which are not part of the target.")]
2016-12-13 11:58:16 -05:00
public bool bBuildAllPlugins
{
get { return Inner . bBuildAllPlugins ; }
}
2018-08-14 18:32:34 -04:00
public bool bBuildAllModules
{
get { return Inner . bBuildAllModules ; }
}
2016-12-13 11:58:16 -05:00
public IEnumerable < string > AdditionalPlugins
{
get { return Inner . AdditionalPlugins ; }
}
2018-06-15 19:00:49 -04:00
public IEnumerable < string > EnablePlugins
2018-05-23 21:04:31 -04:00
{
2018-06-15 19:00:49 -04:00
get { return Inner . EnablePlugins ; }
}
public IEnumerable < string > DisablePlugins
{
get { return Inner . DisablePlugins ; }
2018-05-23 21:04:31 -04:00
}
2019-11-07 15:55:07 -05:00
public IEnumerable < string > BuildPlugins
{
get { return Inner . BuildPlugins ; }
}
2016-12-13 11:58:16 -05:00
public string PakSigningKeysFile
{
get { return Inner . PakSigningKeysFile ; }
}
public string SolutionDirectory
{
get { return Inner . SolutionDirectory ; }
}
2017-04-26 08:28:56 -04:00
public bool? bBuildInSolutionByDefault
{
get { return Inner . bBuildInSolutionByDefault ; }
}
2016-12-13 11:58:16 -05:00
public string ExeBinariesSubFolder
{
get { return Inner . ExeBinariesSubFolder ; }
}
public EGeneratedCodeVersion GeneratedCodeVersion
{
get { return Inner . GeneratedCodeVersion ; }
}
2018-12-14 12:51:26 -05:00
public bool bEnableMeshEditor
2018-07-31 02:23:26 -04:00
{
2018-12-14 12:51:26 -05:00
get { return Inner . bEnableMeshEditor ; }
2018-07-31 02:23:26 -04:00
}
2018-12-14 12:51:26 -05:00
public bool bCompileChaos
{
get { return Inner . bCompileChaos ; }
}
2019-08-06 18:04:01 -04:00
public bool bUseChaos
2018-07-31 02:23:26 -04:00
{
2019-08-06 18:04:01 -04:00
get { return Inner . bUseChaos ; }
}
2019-10-02 17:27:26 -04:00
public bool bUseChaosMemoryTracking
{
get { return Inner . bUseChaosMemoryTracking ; }
}
2019-08-06 18:04:01 -04:00
public bool bUseChaosChecked
{
get { return Inner . bUseChaosChecked ; }
2018-07-31 02:23:26 -04:00
}
2018-12-14 12:51:26 -05:00
public bool bCustomSceneQueryStructure
{
get { return Inner . bCustomSceneQueryStructure ; }
}
2017-01-30 16:52:08 -05:00
public bool bCompilePhysX
{
get { return Inner . bCompilePhysX ; }
}
public bool bCompileAPEX
{
get { return Inner . bCompileAPEX ; }
}
2017-02-08 17:53:41 -05:00
public bool bCompileNvCloth
{
get { return Inner . bCompileNvCloth ; }
}
2017-01-30 16:52:08 -05:00
public bool bCompileICU
{
get { return Inner . bCompileICU ; }
}
public bool bCompileCEF3
{
get { return Inner . bCompileCEF3 ; }
}
2019-12-13 23:35:01 -05:00
public bool bCompileISPC
{
get { return Inner . bCompileISPC ; }
}
2017-01-30 16:52:08 -05:00
public bool bBuildEditor
{
get { return Inner . bBuildEditor ; }
}
public bool bBuildRequiresCookedData
{
get { return Inner . bBuildRequiresCookedData ; }
}
public bool bBuildWithEditorOnlyData
{
get { return Inner . bBuildWithEditorOnlyData ; }
}
public bool bBuildDeveloperTools
{
2018-11-27 09:02:34 -05:00
get { return Inner . bBuildDeveloperTools ; }
2017-01-30 16:52:08 -05:00
}
public bool bForceBuildTargetPlatforms
{
get { return Inner . bForceBuildTargetPlatforms ; }
}
public bool bForceBuildShaderFormats
{
2018-10-11 09:04:26 -04:00
get { return Inner . bForceBuildShaderFormats ; }
2017-01-30 16:52:08 -05:00
}
2019-01-10 20:03:35 -05:00
public bool bCompileCustomSQLitePlatform
{
get { return Inner . bCompileCustomSQLitePlatform ; }
}
2018-11-27 09:02:34 -05:00
[Obsolete("bCompileLeanAndMeanUE is deprecated. Use bBuildDeveloperTools instead.")]
2017-01-30 16:52:08 -05:00
public bool bCompileLeanAndMeanUE
{
get { return Inner . bCompileLeanAndMeanUE ; }
}
2019-09-30 15:13:56 -04:00
public bool bUseCacheFreedOSAllocs
{
get { return Inner . bUseCacheFreedOSAllocs ; }
}
2017-06-08 10:21:39 -04:00
2019-09-30 15:13:56 -04:00
public bool bCompileAgainstEngine
2017-01-30 16:52:08 -05:00
{
get { return Inner . bCompileAgainstEngine ; }
}
public bool bCompileAgainstCoreUObject
{
get { return Inner . bCompileAgainstCoreUObject ; }
}
2018-08-14 18:32:34 -04:00
public bool bCompileAgainstApplicationCore
{
get { return Inner . bCompileAgainstApplicationCore ; }
}
2017-01-30 16:52:08 -05:00
public bool bCompileRecast
{
get { return Inner . bCompileRecast ; }
}
public bool bCompileSpeedTree
{
get { return Inner . bCompileSpeedTree ; }
}
public bool bForceEnableExceptions
{
get { return Inner . bForceEnableExceptions ; }
}
2017-08-15 16:16:21 -04:00
public bool bForceEnableObjCExceptions
{
get { return Inner . bForceEnableObjCExceptions ; }
}
2017-01-30 16:52:08 -05:00
public bool bForceEnableRTTI
{
get { return Inner . bForceEnableRTTI ; }
}
2017-12-12 18:32:45 -05:00
public bool bUseInlining
{
get { return Inner . bUseInlining ; }
}
2017-01-30 16:52:08 -05:00
public bool bWithServerCode
{
get { return Inner . bWithServerCode ; }
}
2020-01-14 11:48:31 -05:00
public bool bWithPushModel
{
get { return Inner . bWithPushModel ; }
}
2017-01-30 16:52:08 -05:00
public bool bCompileWithStatsWithoutEngine
{
get { return Inner . bCompileWithStatsWithoutEngine ; }
}
public bool bCompileWithPluginSupport
{
get { return Inner . bCompileWithPluginSupport ; }
}
2017-07-21 17:56:56 -04:00
public bool bIncludePluginsForTargetPlatforms
{
get { return Inner . bIncludePluginsForTargetPlatforms ; }
}
2019-06-07 05:27:42 -04:00
public bool bCompileWithAccessibilitySupport
{
get { return Inner . bCompileWithAccessibilitySupport ; }
}
public bool bWithPerfCounters
2017-01-30 16:52:08 -05:00
{
get { return Inner . bWithPerfCounters ; }
}
2019-03-06 18:16:41 -05:00
public bool bWithLiveCoding
{
get { return Inner . bWithLiveCoding ; }
}
2019-05-22 11:57:41 -04:00
public bool bUseDebugLiveCodingConsole
{
get { return Inner . bUseDebugLiveCodingConsole ; }
}
2019-06-03 06:48:38 -04:00
public bool bWithDirectXMath
{
get { return Inner . bWithDirectXMath ; }
}
2019-05-22 11:57:41 -04:00
public bool bUseLoggingInShipping
2017-01-30 16:52:08 -05:00
{
get { return Inner . bUseLoggingInShipping ; }
}
public bool bLoggingToMemoryEnabled
{
get { return Inner . bLoggingToMemoryEnabled ; }
}
2019-09-30 15:13:56 -04:00
public bool bUseLauncherChecks
2017-01-30 16:52:08 -05:00
{
get { return Inner . bUseLauncherChecks ; }
}
public bool bUseChecksInShipping
{
get { return Inner . bUseChecksInShipping ; }
}
public bool bCompileFreeType
{
get { return Inner . bCompileFreeType ; }
}
public bool bCompileForSize
{
get { return Inner . bCompileForSize ; }
}
2019-09-30 15:13:56 -04:00
public bool bForceCompileDevelopmentAutomationTests
2017-01-30 16:52:08 -05:00
{
get { return Inner . bForceCompileDevelopmentAutomationTests ; }
}
2019-09-30 15:13:56 -04:00
public bool bForceCompilePerformanceAutomationTests
2017-01-30 16:52:08 -05:00
{
get { return Inner . bForceCompilePerformanceAutomationTests ; }
}
2017-09-07 22:18:47 -04:00
public bool bUseXGEController
{
get { return Inner . bUseXGEController ; }
}
2017-01-30 16:52:08 -05:00
public bool bEventDrivenLoader
{
get { return Inner . bEventDrivenLoader ; }
}
2019-09-06 15:59:52 -04:00
[Obsolete("Use DefaultBuildSettings to determine the default settings used for this target instead")]
2018-01-20 11:19:29 -05:00
public bool bUseBackwardsCompatibleDefaults
{
2019-09-06 15:59:52 -04:00
#pragma warning disable CS0618
2018-01-20 11:19:29 -05:00
get { return Inner . bUseBackwardsCompatibleDefaults ; }
2019-09-06 15:59:52 -04:00
#pragma warning restore CS0618
2018-01-20 11:19:29 -05:00
}
2017-10-24 10:14:07 -04:00
public bool bIWYU
{
get { return Inner . bIWYU ; }
}
2017-01-30 16:52:08 -05:00
public bool bEnforceIWYU
{
get { return Inner . bEnforceIWYU ; }
}
public bool bHasExports
{
get { return Inner . bHasExports ; }
}
public bool bPrecompile
{
get { return Inner . bPrecompile ; }
}
public bool bEnableOSX109Support
{
get { return Inner . bEnableOSX109Support ; }
}
public bool bIsBuildingConsoleApplication
{
get { return Inner . bIsBuildingConsoleApplication ; }
}
2019-06-10 19:47:29 -04:00
public bool bBuildAdditionalConsoleApp
{
get { return Inner . bBuildAdditionalConsoleApp ; }
}
2019-09-30 15:13:56 -04:00
2017-01-30 16:52:08 -05:00
public bool bDisableSymbolCache
{
get { return Inner . bDisableSymbolCache ; }
}
public bool bUseUnityBuild
{
get { return Inner . bUseUnityBuild ; }
}
public bool bForceUnityBuild
{
get { return Inner . bForceUnityBuild ; }
}
public bool bAdaptiveUnityDisablesOptimizations
{
get { return Inner . bAdaptiveUnityDisablesOptimizations ; }
}
2017-02-21 15:51:42 -05:00
public bool bAdaptiveUnityDisablesPCH
{
get { return Inner . bAdaptiveUnityDisablesPCH ; }
}
2019-02-22 02:09:30 -05:00
public bool bAdaptiveUnityDisablesPCHForProject
{
get { return Inner . bAdaptiveUnityDisablesPCHForProject ; }
}
2018-08-14 18:32:34 -04:00
public bool bAdaptiveUnityCreatesDedicatedPCH
{
get { return Inner . bAdaptiveUnityCreatesDedicatedPCH ; }
}
public bool bAdaptiveUnityEnablesEditAndContinue
{
get { return Inner . bAdaptiveUnityEnablesEditAndContinue ; }
}
2017-01-30 16:52:08 -05:00
public int MinGameModuleSourceFilesForUnityBuild
{
get { return Inner . MinGameModuleSourceFilesForUnityBuild ; }
}
2019-10-25 10:39:37 -04:00
public WarningLevel ShadowVariableWarningLevel
2017-01-30 16:52:08 -05:00
{
2019-10-25 10:39:37 -04:00
get { return Inner . ShadowVariableWarningLevel ; }
2017-01-30 16:52:08 -05:00
}
2020-01-17 13:27:48 -05:00
public WarningLevel UnsafeTypeCastWarningLevel
{
get { return Inner . UnsafeTypeCastWarningLevel ; }
}
2017-01-30 16:52:08 -05:00
public bool bUndefinedIdentifierErrors
{
get { return Inner . bUndefinedIdentifierErrors ; }
}
public bool bUseFastMonoCalls
{
get { return Inner . bUseFastMonoCalls ; }
}
public bool bUseFastSemanticsRenderContexts
{
get { return Inner . bUseFastSemanticsRenderContexts ; }
}
public int NumIncludedBytesPerUnityCPP
{
get { return Inner . NumIncludedBytesPerUnityCPP ; }
}
public bool bStressTestUnity
{
get { return Inner . bStressTestUnity ; }
}
public bool bDisableDebugInfo
{
get { return Inner . bDisableDebugInfo ; }
}
public bool bDisableDebugInfoForGeneratedCode
{
get { return Inner . bDisableDebugInfoForGeneratedCode ; }
}
public bool bOmitPCDebugInfoInDevelopment
{
get { return Inner . bOmitPCDebugInfoInDevelopment ; }
}
public bool bUsePDBFiles
{
get { return Inner . bUsePDBFiles ; }
}
public bool bUsePCHFiles
{
get { return Inner . bUsePCHFiles ; }
}
2019-09-23 15:26:04 -04:00
public bool bPreprocessOnly
{
get { return Inner . bPreprocessOnly ; }
}
2017-01-30 16:52:08 -05:00
public int MinFilesUsingPrecompiledHeader
{
get { return Inner . MinFilesUsingPrecompiledHeader ; }
}
public bool bForcePrecompiledHeaderForGameModules
{
get { return Inner . bForcePrecompiledHeaderForGameModules ; }
}
public bool bUseIncrementalLinking
{
get { return Inner . bUseIncrementalLinking ; }
}
public bool bAllowLTCG
{
get { return Inner . bAllowLTCG ; }
}
2019-09-30 15:13:56 -04:00
public bool bPGOProfile
{
get { return Inner . bPGOProfile ; }
}
2017-01-30 16:52:08 -05:00
2019-09-30 15:13:56 -04:00
public bool bPGOOptimize
{
get { return Inner . bPGOOptimize ; }
}
2017-12-05 21:57:41 -05:00
2019-09-30 15:13:56 -04:00
public bool bAllowASLRInShipping
2017-01-30 16:52:08 -05:00
{
get { return Inner . bAllowASLRInShipping ; }
}
public bool bSupportEditAndContinue
{
get { return Inner . bSupportEditAndContinue ; }
}
public bool bOmitFramePointers
{
get { return Inner . bOmitFramePointers ; }
}
2018-11-23 19:06:39 -05:00
[Obsolete("bStripSymbolsOnIOS has been deprecated. Use IOSPlatform.bStripSymbols instead.")]
2017-01-30 16:52:08 -05:00
public bool bStripSymbolsOnIOS
{
2018-11-23 19:06:39 -05:00
get { return IOSPlatform . bStripSymbols ; }
2017-01-30 16:52:08 -05:00
}
public bool bUseMallocProfiler
{
get { return Inner . bUseMallocProfiler ; }
}
public bool bUseSharedPCHs
{
get { return Inner . bUseSharedPCHs ; }
}
public bool bUseShippingPhysXLibraries
{
get { return Inner . bUseShippingPhysXLibraries ; }
}
2019-09-30 15:13:56 -04:00
public bool bUseCheckedPhysXLibraries
2017-01-30 16:52:08 -05:00
{
get { return Inner . bUseCheckedPhysXLibraries ; }
}
public bool bCheckLicenseViolations
{
get { return Inner . bCheckLicenseViolations ; }
}
public bool bBreakBuildOnLicenseViolation
{
get { return Inner . bBreakBuildOnLicenseViolation ; }
}
2018-04-26 14:11:04 -04:00
public bool? bUseFastPDBLinking
2017-01-30 16:52:08 -05:00
{
get { return Inner . bUseFastPDBLinking ; }
}
public bool bCreateMapFile
{
get { return Inner . bCreateMapFile ; }
}
2019-10-11 07:21:22 -04:00
public bool bAllowRuntimeSymbolFiles
{
get { return Inner . bAllowRuntimeSymbolFiles ; }
}
2017-01-30 16:52:08 -05:00
public string BundleVersion
{
get { return Inner . BundleVersion ; }
}
public bool bDeployAfterCompile
{
get { return Inner . bDeployAfterCompile ; }
}
2018-11-23 19:06:39 -05:00
[Obsolete("bCreateStubIPA has been deprecated. Use IOSPlatform.bCreateStubIPA instead.")]
2017-01-30 16:52:08 -05:00
public bool bCreateStubIPA
{
2018-11-23 19:06:39 -05:00
get { return IOSPlatform . bCreateStubIPA ; }
2017-01-30 16:52:08 -05:00
}
public bool bAllowRemotelyCompiledPCHs
{
get { return Inner . bAllowRemotelyCompiledPCHs ; }
}
public bool bCheckSystemHeadersForModification
{
get { return Inner . bCheckSystemHeadersForModification ; }
}
public bool bDisableLinking
{
get { return Inner . bDisableLinking ; }
}
public bool bFormalBuild
{
get { return Inner . bFormalBuild ; }
}
public bool bUseAdaptiveUnityBuild
{
get { return Inner . bUseAdaptiveUnityBuild ; }
}
public bool bFlushBuildDirOnRemoteMac
{
get { return Inner . bFlushBuildDirOnRemoteMac ; }
}
public bool bPrintToolChainTimingInfo
{
get { return Inner . bPrintToolChainTimingInfo ; }
}
2019-04-18 15:07:10 -04:00
public bool bParseTimingInfoForTracing
{
get { return Inner . bParseTimingInfoForTracing ; }
}
2019-06-07 05:27:42 -04:00
public bool bPublicSymbolsByDefault
2017-12-05 21:57:41 -05:00
{
2019-06-07 05:27:42 -04:00
get { return Inner . bPublicSymbolsByDefault ; }
2017-12-05 21:57:41 -05:00
}
2018-02-22 11:25:06 -05:00
public string ToolChainName
{
get { return Inner . ToolChainName ; }
}
2018-01-20 11:19:29 -05:00
public bool bLegacyPublicIncludePaths
2017-01-30 16:52:08 -05:00
{
2018-01-20 11:19:29 -05:00
get { return Inner . bLegacyPublicIncludePaths ; }
2017-01-30 16:52:08 -05:00
}
2019-01-04 10:13:55 -05:00
public CppStandardVersion CppStandard
{
get { return Inner . CppStandard ; }
}
2018-10-29 21:23:02 -04:00
internal bool bNoManifestChanges
{
get { return Inner . bNoManifestChanges ; }
}
2018-04-26 14:11:04 -04:00
public string BuildVersion
{
get { return Inner . BuildVersion ; }
}
2017-01-30 16:52:08 -05:00
public TargetLinkType LinkType
2016-12-13 11:58:16 -05:00
{
get { return Inner . LinkType ; }
}
2017-01-30 16:52:08 -05:00
public IReadOnlyList < string > GlobalDefinitions
{
get { return Inner . GlobalDefinitions . AsReadOnly ( ) ; }
}
2018-01-20 11:19:29 -05:00
public IReadOnlyList < string > ProjectDefinitions
{
get { return Inner . ProjectDefinitions . AsReadOnly ( ) ; }
}
2017-01-30 16:52:08 -05:00
public string LaunchModuleName
{
get { return Inner . LaunchModuleName ; }
}
2019-02-25 17:09:31 -05:00
public string ExportPublicHeader
{
get { return Inner . ExportPublicHeader ; }
}
2017-01-30 16:52:08 -05:00
public IReadOnlyList < string > ExtraModuleNames
{
get { return Inner . ExtraModuleNames . AsReadOnly ( ) ; }
}
2018-08-14 18:32:34 -04:00
public IReadOnlyList < FileReference > ManifestFileNames
{
get { return Inner . ManifestFileNames . AsReadOnly ( ) ; }
}
public IReadOnlyList < FileReference > DependencyListFileNames
{
get { return Inner . DependencyListFileNames . AsReadOnly ( ) ; }
}
2017-01-30 16:52:08 -05:00
public TargetBuildEnvironment BuildEnvironment
{
get { return Inner . BuildEnvironment ; }
}
2019-02-26 13:26:57 -05:00
public bool bOverrideBuildEnvironment
{
get { return Inner . bOverrideBuildEnvironment ; }
}
2020-03-12 14:08:52 -04:00
public IReadOnlyList < TargetInfo > PreBuildTargets
{
get { return Inner . PreBuildTargets ; }
}
2017-07-21 17:56:56 -04:00
public IReadOnlyList < string > PreBuildSteps
{
get { return Inner . PreBuildSteps ; }
}
public IReadOnlyList < string > PostBuildSteps
{
get { return Inner . PostBuildSteps ; }
}
2018-09-17 14:00:25 -04:00
public IReadOnlyList < string > AdditionalBuildProducts
{
get { return Inner . AdditionalBuildProducts ; }
}
2018-04-26 14:11:04 -04:00
public string AdditionalCompilerArguments
{
get { return Inner . AdditionalCompilerArguments ; }
}
public string AdditionalLinkerArguments
{
get { return Inner . AdditionalLinkerArguments ; }
}
2018-10-24 13:03:31 -04:00
public string GeneratedProjectName
{
get { return Inner . GeneratedProjectName ; }
}
2017-01-30 16:52:08 -05:00
public ReadOnlyAndroidTargetRules AndroidPlatform
{
get ;
private set ;
}
2019-01-26 14:33:56 -05:00
2018-05-10 14:17:01 -04:00
public ReadOnlyLuminTargetRules LuminPlatform
{
get ;
private set ;
}
2017-01-30 16:52:08 -05:00
2018-09-12 15:59:49 -04:00
public ReadOnlyLinuxTargetRules LinuxPlatform
{
get ;
private set ;
}
2018-05-23 21:04:31 -04:00
public ReadOnlyIOSTargetRules IOSPlatform
{
get ;
private set ;
}
2017-02-03 16:54:59 -05:00
public ReadOnlyMacTargetRules MacPlatform
{
get ;
private set ;
}
2017-02-21 15:51:42 -05:00
public ReadOnlyPS4TargetRules PS4Platform
{
get ;
private set ;
}
2018-05-14 09:49:35 -04:00
public ReadOnlySwitchTargetRules SwitchPlatform
{
get ;
private set ;
}
2017-01-30 16:52:08 -05:00
public ReadOnlyWindowsTargetRules WindowsPlatform
{
get ;
private set ;
}
2019-06-10 19:47:29 -04:00
public ReadOnlyHoloLensTargetRules HoloLensPlatform
{
get ;
private set ;
}
2017-02-21 15:51:42 -05:00
public ReadOnlyXboxOneTargetRules XboxOnePlatform
{
get ;
private set ;
}
2017-03-24 09:53:37 -04:00
public bool bShouldCompileAsDLL
{
get { return Inner . bShouldCompileAsDLL ; }
}
2017-04-10 11:00:33 -04:00
2018-08-14 18:32:34 -04:00
public bool bGenerateProjectFiles
{
get { return Inner . bGenerateProjectFiles ; }
}
2018-09-24 11:07:49 -04:00
public bool bIsEngineInstalled
{
get { return Inner . bIsEngineInstalled ; }
}
2019-06-20 03:53:43 -04:00
public IReadOnlyList < string > DisableUnityBuildForModules
{
get { return Inner . DisableUnityBuildForModules ; }
}
public IReadOnlyList < string > EnableOptimizeCodeForModules
{
get { return Inner . EnableOptimizeCodeForModules ; }
}
public IReadOnlyList < string > DisableOptimizeCodeForModules
{
get { return Inner . DisableOptimizeCodeForModules ; }
}
#if ! __MonoCS__
#pragma warning restore C1591
#endif
2016-12-13 11:58:16 -05:00
#endregion
2017-01-30 16:52:08 -05:00
/// <summary>
/// Provide access to the RelativeEnginePath property for code referencing ModuleRules.BuildConfiguration.
/// </summary>
public string RelativeEnginePath
{
get { return UnrealBuildTool . EngineDirectory . MakeRelativeTo ( DirectoryReference . GetCurrentDirectory ( ) ) ; }
}
/// <summary>
/// Provide access to the UEThirdPartySourceDirectory property for code referencing ModuleRules.UEBuildConfiguration.
/// </summary>
public string UEThirdPartySourceDirectory
{
get { return "ThirdParty/" ; }
}
/// <summary>
/// Provide access to the UEThirdPartyBinariesDirectory property for code referencing ModuleRules.UEBuildConfiguration.
/// </summary>
public string UEThirdPartyBinariesDirectory
{
get { return "../Binaries/ThirdParty/" ; }
}
2018-03-21 11:09:41 -04:00
/// <summary>
/// Checks if current platform is part of a given platform group
/// </summary>
/// <param name="Group">The platform group to check</param>
/// <returns>True if current platform is part of a platform group</returns>
public bool IsInPlatformGroup ( UnrealPlatformGroup Group )
{
return UEBuildPlatform . IsPlatformInGroup ( Platform , Group ) ;
}
2019-09-06 15:59:52 -04:00
/// <summary>
/// Gets diagnostic messages about default settings which have changed in newer versions of the engine
/// </summary>
/// <param name="Diagnostics">List of messages to be appended to</param>
internal void GetBuildSettingsInfo ( List < string > Diagnostics )
{
Inner . GetBuildSettingsInfo ( Diagnostics ) ;
}
2016-12-13 11:58:16 -05:00
}
2018-09-25 10:11:35 -04:00
}