2021-09-29 15:50:07 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
2022-09-22 22:18:55 -04:00
|
|
|
using System.IO;
|
2021-09-29 15:50:07 -04:00
|
|
|
using UnrealBuildTool;
|
|
|
|
|
|
2021-10-15 12:15:53 -04:00
|
|
|
[SupportedPlatforms(UnrealPlatformClass.All)]
|
2023-02-07 12:02:31 -05:00
|
|
|
public class FoundationTestsTarget : TestTargetRules
|
2021-09-29 15:50:07 -04:00
|
|
|
{
|
2023-02-07 12:02:31 -05:00
|
|
|
public FoundationTestsTarget(TargetInfo Target) : base(Target)
|
2021-09-29 15:50:07 -04:00
|
|
|
{
|
2023-02-06 14:27:24 -05:00
|
|
|
// Collects all tests decorated with #if WITH_LOW_LEVELTESTS from dependencies
|
2022-04-27 12:36:35 -04:00
|
|
|
bWithLowLevelTestsOverride = true;
|
2023-06-23 14:22:58 -04:00
|
|
|
bCompileWithPluginSupport = true;
|
2022-09-22 22:18:55 -04:00
|
|
|
|
2023-02-16 14:40:17 -05:00
|
|
|
bBuildWithEditorOnlyData = Target.Platform.IsInGroup(UnrealPlatformGroup.Desktop)
|
|
|
|
|
&& (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.Development);
|
|
|
|
|
|
2022-09-22 22:18:55 -04:00
|
|
|
if (Target.Platform == UnrealTargetPlatform.Android)
|
|
|
|
|
{
|
|
|
|
|
string VersionScriptFile = Path.GetTempPath() + "LLTWorkaroundScrip.ldscript";
|
|
|
|
|
using (StreamWriter Writer = File.CreateText(VersionScriptFile))
|
|
|
|
|
{
|
|
|
|
|
// Workaround for a linker bug when building LowLevelTests for Android
|
|
|
|
|
Writer.WriteLine("{ local: *; };");
|
|
|
|
|
}
|
|
|
|
|
AdditionalLinkerArguments = " -Wl,--version-script=\"" + VersionScriptFile + "\"";
|
|
|
|
|
}
|
2021-09-29 15:50:07 -04:00
|
|
|
}
|
|
|
|
|
}
|