In 4.19.2, the probably best way to do this is in the MyProject.Build.cs
file, just by adding bEnableExceptions = true;
.
But yea it is completely non-obvious and it took me hours to find a solution that works… But I think this is the one to go, as no global toolchain files have to be modified.
using UnrealBuildTool;
public class MyProject : ModuleRules
{
public MyProject(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
bEnableExceptions = true; // Add this...
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay" });
}
}