2019-12-26 23:01:54 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Collections.Generic;
|
2014-04-02 18:09:23 -04:00
|
|
|
using System.Xml;
|
|
|
|
|
using System.Reflection;
|
2017-08-31 12:08:38 -04:00
|
|
|
using Tools.DotNETCommon;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
namespace UnrealBuildTool
|
|
|
|
|
{
|
2019-01-14 12:11:24 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Global settings for building. Should not contain any target-specific settings.
|
|
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
class BuildConfiguration
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2019-10-11 16:59:16 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to ignore import library files that are out of date when building targets. Set this to true to improve iteration time.
|
|
|
|
|
/// By default, we do not bother re-linking targets if only a dependent .lib has changed, as chances are that
|
|
|
|
|
/// the import library was not actually different unless a dependent header file of this target was also changed,
|
|
|
|
|
/// in which case the target would automatically be rebuilt.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[XmlConfigFile]
|
2017-01-30 16:52:08 -05:00
|
|
|
public bool bIgnoreOutdatedImportLibraries = true;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2018-08-14 18:32:34 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Use existing static libraries for all engine modules in this target.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[CommandLine("-UsePrecompiled")]
|
|
|
|
|
public bool bUsePrecompiled = false;
|
|
|
|
|
|
2015-09-24 12:37:21 -04:00
|
|
|
/// <summary>
|
2014-03-14 14:13:41 -04:00
|
|
|
/// Whether debug info should be written to the console.
|
2015-09-24 12:37:21 -04:00
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile]
|
|
|
|
|
public bool bPrintDebugInfo = false;
|
2015-04-26 18:19:28 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to log detailed action stats. This forces local execution.
|
|
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile]
|
|
|
|
|
public bool bLogDetailedActionStats = false;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2019-01-14 12:11:24 -05:00
|
|
|
/// <summary>
|
2019-10-11 16:59:16 -04:00
|
|
|
/// Whether the hybrid executor will be used (a remote executor and local executor).
|
2019-01-14 12:11:24 -05:00
|
|
|
/// </summary>
|
|
|
|
|
[XmlConfigFile]
|
|
|
|
|
public bool bAllowHybridExecutor = false;
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether XGE may be used.
|
|
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile]
|
|
|
|
|
[CommandLine("-NoXGE", Value = "false")]
|
|
|
|
|
public bool bAllowXGE = true;
|
2016-01-22 08:13:18 -05:00
|
|
|
|
2019-12-12 15:44:03 -05:00
|
|
|
#if __FASTBUILD_AVAILABLE__
|
2019-12-06 17:10:57 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether FASTBuild may be used.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[XmlConfigFile]
|
|
|
|
|
[CommandLine("-NoFASTBuild", Value = "false")]
|
|
|
|
|
public bool bAllowFASTBuild = true;
|
2019-12-12 15:44:03 -05:00
|
|
|
#endif
|
2019-12-06 17:10:57 -05:00
|
|
|
|
2015-09-24 12:37:21 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether SN-DBS may be used.
|
|
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile]
|
|
|
|
|
public bool bAllowSNDBS = true;
|
2014-10-21 06:47:56 -04:00
|
|
|
|
2014-07-31 09:34:11 -04:00
|
|
|
/// <summary>
|
2019-10-11 16:59:16 -04:00
|
|
|
/// Enables support for very fast iterative builds by caching target data. Turning this on causes Unreal Build Tool to emit
|
|
|
|
|
/// 'UBT Makefiles' for targets when they are built the first time. Subsequent builds will load these Makefiles and begin
|
|
|
|
|
/// outdatedness checking and build invocation very quickly. The caveat is that if source files are added or removed to
|
|
|
|
|
/// the project, UBT will need to gather information about those in order for your build to complete successfully. Currently,
|
2014-08-13 08:17:43 -04:00
|
|
|
/// you must run the project file generator after adding/removing source files to tell UBT to re-gather this information.
|
2015-01-07 14:16:46 -05:00
|
|
|
///
|
2014-08-13 08:17:43 -04:00
|
|
|
/// Events that can invalidate the 'UBT Makefile':
|
|
|
|
|
/// - Adding/removing .cpp files
|
|
|
|
|
/// - Adding/removing .h files with UObjects
|
2019-10-11 16:59:16 -04:00
|
|
|
/// - Adding new UObject types to a file that did not previously have any
|
|
|
|
|
/// - Changing global build settings (most settings in this file qualify)
|
2014-08-13 08:17:43 -04:00
|
|
|
/// - Changed code that affects how Unreal Header Tool works
|
2015-01-07 14:16:46 -05:00
|
|
|
///
|
2019-10-11 16:59:16 -04:00
|
|
|
/// You can force regeneration of the 'UBT Makefile' by passing the '-gather' argument, or simply regenerating project files.
|
2015-01-07 14:16:46 -05:00
|
|
|
///
|
|
|
|
|
/// This also enables the fast include file dependency scanning and caching system that allows Unreal Build Tool to detect out
|
2019-10-11 16:59:16 -04:00
|
|
|
/// of date dependencies very quickly. When enabled, a deep C++ include graph does not have to be generated, and instead,
|
|
|
|
|
/// we only scan and cache indirect includes for after a dependent build product was already found to be out of date. During the
|
|
|
|
|
/// next build, we will load those cached indirect includes and check for outdatedness.
|
2014-08-13 08:17:43 -04:00
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile]
|
|
|
|
|
[CommandLine("-NoUBTMakefiles", Value = "false")]
|
|
|
|
|
public bool bUseUBTMakefiles = true;
|
2015-09-24 12:37:21 -04:00
|
|
|
|
2014-07-31 07:33:17 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether DMUCS/Distcc may be used.
|
2019-10-11 16:59:16 -04:00
|
|
|
/// Distcc requires some setup -- so by default, disable it so that we do not break local or remote building.
|
2014-07-31 07:33:17 -04:00
|
|
|
/// </summary>
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile]
|
|
|
|
|
public bool bAllowDistcc = false;
|
2014-12-04 05:35:51 -05:00
|
|
|
|
2018-05-23 21:04:31 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to allow using parallel executor on Windows.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[XmlConfigFile]
|
|
|
|
|
public bool bAllowParallelExecutor = true;
|
|
|
|
|
|
2017-01-30 16:52:08 -05:00
|
|
|
/// <summary>
|
2019-10-11 16:59:16 -04:00
|
|
|
/// If true, force header regeneration. Intended for the build machine.
|
2017-01-30 16:52:08 -05:00
|
|
|
/// </summary>
|
|
|
|
|
[CommandLine("-ForceHeaderGeneration")]
|
|
|
|
|
[XmlConfigFile(Category = "UEBuildConfiguration")]
|
|
|
|
|
public bool bForceHeaderGeneration = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-10-11 16:59:16 -04:00
|
|
|
/// If true, do not build UHT, assume it is already built.
|
2017-01-30 16:52:08 -05:00
|
|
|
/// </summary>
|
|
|
|
|
[CommandLine("-NoBuildUHT")]
|
|
|
|
|
[XmlConfigFile(Category = "UEBuildConfiguration")]
|
|
|
|
|
public bool bDoNotBuildUHT = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If true, fail if any of the generated header files is out of date.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[CommandLine("-FailIfGeneratedCodeChanges")]
|
|
|
|
|
[XmlConfigFile(Category = "UEBuildConfiguration")]
|
|
|
|
|
public bool bFailIfGeneratedCodeChanges = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-10-11 16:59:16 -04:00
|
|
|
/// True if hot-reload from IDE is allowed.
|
2017-01-30 16:52:08 -05:00
|
|
|
/// </summary>
|
2019-01-14 12:11:24 -05:00
|
|
|
[CommandLine("-NoHotReloadFromIDE", Value="false")]
|
2017-01-30 16:52:08 -05:00
|
|
|
[XmlConfigFile(Category = "UEBuildConfiguration")]
|
|
|
|
|
public bool bAllowHotReloadFromIDE = true;
|
|
|
|
|
|
2017-02-02 14:41:50 -05:00
|
|
|
/// <summary>
|
2019-10-11 16:59:16 -04:00
|
|
|
/// If true, the Debug version of UnrealHeaderTool will be built and run instead of the Development version.
|
2017-02-02 14:41:50 -05:00
|
|
|
/// </summary>
|
|
|
|
|
[XmlConfigFile(Category = "UEBuildConfiguration")]
|
2018-06-14 08:49:21 -04:00
|
|
|
public bool bForceDebugUnrealHeaderTool = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-14 12:11:24 -05:00
|
|
|
/// Whether to skip compiling rules assemblies and just assume they are valid
|
2018-06-14 08:49:21 -04:00
|
|
|
/// </summary>
|
2019-01-14 12:11:24 -05:00
|
|
|
[CommandLine("-SkipRulesCompile")]
|
|
|
|
|
public bool bSkipRulesCompile = false;
|
2020-02-25 20:48:25 -05:00
|
|
|
|
2020-02-25 21:05:31 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum recommended root path length.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[XmlConfigFile(Category = "WindowsPlatform")]
|
|
|
|
|
public int MaxRootPathLength = 50;
|
|
|
|
|
|
2020-02-25 20:48:25 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum length of a path relative to the root directory. Used on Windows to ensure paths are portable between machines. Defaults to off.
|
|
|
|
|
/// </summary>
|
2020-02-25 21:05:31 -05:00
|
|
|
[XmlConfigFile(Category = "WindowsPlatform")]
|
|
|
|
|
public int MaxNestedPathLength = 200;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|