Files
UnrealEngineUWP/Engine/Source/Programs/LowLevelTests/LowLevelTests.Target.cs
chris constantinescu 9212fef5a7 LLT 2.0 on preflights
- bIncludeAllTests flag on target will compile with all tests: used on LowLevelTests target to run on preflights
- Preflights now running low level tests by default, only those from LowLevelTests and its dependencies stemming from Core and Projects
#preflight 61f930bb8b4112f7cc95e807
#rb Mark.Lintott

[CL 18807604 by chris constantinescu in ue5-main branch]
2022-02-01 09:04:25 -05:00

93 lines
2.7 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
using UnrealBuildTool;
[SupportedPlatforms(UnrealPlatformClass.All)]
public class LowLevelTestsTarget : TargetRules
{
public LowLevelTestsTarget(TargetInfo Target) : base(Target)
{
ExeBinariesSubFolder = LaunchModuleName = "LowLevelTests";
SolutionDirectory = "Programs/LowLevelTests";
Type = TargetType.Program;
LinkType = TargetLinkType.Monolithic;
// LowLevelTests to produce executable with Core tests
if (GetType() == typeof(LowLevelTestsTarget))
{
bIncludeAllTestsOverride = true;
}
bDeployAfterCompile = false;
bIsBuildingConsoleApplication = true;
// Disabling default true flags that aren't necessary for tests
// Lean and Mean mode
bBuildDeveloperTools = false;
// No localization
bCompileICU = false;
// No need for shaders by default
bForceBuildShaderFormats = false;
// Do not link against the engine, no Chromium Embedded Framework etc.
bCompileAgainstEngine = false;
bCompileCEF3 = false;
bCompileAgainstCoreUObject = false;
bCompileAgainstApplicationCore = false;
bUseLoggingInShipping = true;
bool bDebugOrDevelopment = Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.Development;
bBuildWithEditorOnlyData = Target.Platform.IsInGroup(UnrealPlatformGroup.Desktop) && bDebugOrDevelopment;
// Disable malloc profiling in tests
bUseMallocProfiler = false;
// Useful for debugging test failures
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
bDebugBuildsActuallyUseDebugCRT = true;
}
SetupPreprocessorDefinitions(Target);
}
protected void SetupModule()
{
LaunchModuleName = this.GetType().Name.Replace("Target", string.Empty);
ExeBinariesSubFolder = LaunchModuleName;
}
protected virtual void SetupPreprocessorDefinitions(TargetInfo Target)
{
GlobalDefinitions.Add("STATS=0");
// Platform specific setup
if (Target.Platform == UnrealTargetPlatform.Android)
{
UndecoratedConfiguration = Target.Configuration;
string VersionScriptFile = Path.Combine(Directory.GetCurrentDirectory(), @"Developer\LowLevelTestsRunner\Private\Platform\Android\HideSymbols.ldscript");
AdditionalLinkerArguments = " -Wl,--version-script=" + VersionScriptFile;
GlobalDefinitions.Add("USE_ANDROID_INPUT=0");
GlobalDefinitions.Add("USE_ANDROID_OPENGL=0");
GlobalDefinitions.Add("USE_ANDROID_LAUNCH=0");
GlobalDefinitions.Add("USE_ANDROID_JNI=0");
}
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
GlobalDefinitions.Add("HAS_METAL=0");
bIsBuildingConsoleApplication = false;
// Required for IOS, but needs to fix compilation errors
bCompileAgainstApplicationCore = true;
}
}
}