// Copyright Epic Games, Inc. All Rights Reserved. using System; using System.IO; using System.Collections.Generic; using System.Xml; using System.Reflection; using EpicGames.Core; namespace UnrealBuildTool { /// /// Global settings for building. Should not contain any target-specific settings. /// class BuildConfiguration { /// /// 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. /// [XmlConfigFile] public bool bIgnoreOutdatedImportLibraries = true; /// /// Use existing static libraries for all engine modules in this target. /// [CommandLine("-UsePrecompiled")] public bool bUsePrecompiled = false; /// /// Whether debug info should be written to the console. /// [XmlConfigFile] [CommandLine("-PrintDebugInfo", Value = "true")] public bool bPrintDebugInfo = false; /// /// Whether the hybrid executor will be used (a remote executor and local executor). /// [XmlConfigFile] public bool bAllowHybridExecutor = false; /// /// Whether XGE may be used. /// [XmlConfigFile] [CommandLine("-NoXGE", Value = "false")] public bool bAllowXGE = true; /// /// Whether FASTBuild may be used. /// [XmlConfigFile] [CommandLine("-NoFASTBuild", Value = "false")] public bool bAllowFASTBuild = true; /// /// Whether SN-DBS may be used. /// [XmlConfigFile] public bool bAllowSNDBS = true; /// /// Whether the experimental async TaskExecutor may be used. /// [XmlConfigFile] public bool bAllowTaskExecutor = false; /// /// 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, /// you must run the project file generator after adding/removing source files to tell UBT to re-gather this information. /// /// Events that can invalidate the 'UBT Makefile': /// - Adding/removing .cpp files /// - Adding/removing .h files with UObjects /// - Adding new UObject types to a file that did not previously have any /// - Changing global build settings (most settings in this file qualify) /// - Changed code that affects how Unreal Header Tool works /// /// You can force regeneration of the 'UBT Makefile' by passing the '-gather' argument, or simply regenerating project files. /// /// This also enables the fast include file dependency scanning and caching system that allows Unreal Build Tool to detect out /// 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. /// [XmlConfigFile] [CommandLine("-NoUBTMakefiles", Value = "false")] public bool bUseUBTMakefiles = true; /// /// Number of actions that can be executed in parallel. If 0 then code will pick a default based /// on the number of cores and memory available. Applies to the ParallelExecutor, HybridExecutor, and LocalExecutor /// [XmlConfigFile] [CommandLine("-MaxParallelActions")] public int MaxParallelActions = 0; /// /// If true, force header regeneration. Intended for the build machine. /// [CommandLine("-ForceHeaderGeneration")] [XmlConfigFile(Category = "UEBuildConfiguration")] public bool bForceHeaderGeneration = false; /// /// If true, do not build UHT, assume it is already built. /// [CommandLine("-NoBuildUHT")] [XmlConfigFile(Category = "UEBuildConfiguration")] public bool bDoNotBuildUHT = false; /// /// If true, fail if any of the generated header files is out of date. /// [CommandLine("-FailIfGeneratedCodeChanges")] [XmlConfigFile(Category = "UEBuildConfiguration")] public bool bFailIfGeneratedCodeChanges = false; /// /// True if hot-reload from IDE is allowed. /// [CommandLine("-NoHotReloadFromIDE", Value="false")] [XmlConfigFile(Category = "UEBuildConfiguration")] public bool bAllowHotReloadFromIDE = true; /// /// If true, the Debug version of UnrealHeaderTool will be built and run instead of the Development version. /// [XmlConfigFile(Category = "UEBuildConfiguration")] public bool bForceDebugUnrealHeaderTool = false; /// /// Whether to skip compiling rules assemblies and just assume they are valid /// [CommandLine("-SkipRulesCompile")] public bool bSkipRulesCompile = false; /// /// Whether to force compiling rules assemblies, regardless of whether they are valid /// [CommandLine("-ForceRulesCompile")] public bool bForceRulesCompile = false; /// /// Maximum recommended root path length. /// [XmlConfigFile(Category = "WindowsPlatform")] public int MaxRootPathLength = 50; /// /// Maximum length of a path relative to the root directory. Used on Windows to ensure paths are portable between machines. Defaults to off. /// [XmlConfigFile(Category = "WindowsPlatform")] public int MaxNestedPathLength = 200; } }