Created
May 12, 2020 01:05
-
-
Save ericwomer/bf23bac7cd4319dffde400d7ac196c6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Engine/Source/Programs/UnrealBuildTool/Configuration/UEBuildModuleCPP.cs b/Engine/Source/Programs/UnrealBuildTool/Configuration/UEBuildModuleCPP.cs | |
index 4c0428ad373..93de90ce24c 100644 | |
--- a/Engine/Source/Programs/UnrealBuildTool/Configuration/UEBuildModuleCPP.cs | |
+++ b/Engine/Source/Programs/UnrealBuildTool/Configuration/UEBuildModuleCPP.cs | |
@@ -404,6 +404,7 @@ namespace UnrealBuildTool | |
// Write all the definitions to a separate file | |
CreateHeaderForDefinitions(CompileEnvironment, IntermediateDirectory, null, Graph); | |
+ CompileEnvironment.Definitions.Clear(); | |
// Mapping of source file to unity file. We output this to intermediate directories for other tools (eg. live coding) to use. | |
Dictionary<FileItem, FileItem> SourceFileToUnityFile = new Dictionary<FileItem, FileItem>(); | |
@@ -874,6 +875,7 @@ namespace UnrealBuildTool | |
{ | |
// Write all the definitions out to a separate file | |
CreateHeaderForDefinitions(CompileEnvironment, IntermediateDirectory, "Adaptive", Graph); | |
+ CompileEnvironment.Definitions.Clear(); | |
// Compile the files | |
return ToolChain.CompileCPPFiles(CompileEnvironment, Files, IntermediateDirectory, ModuleName, Graph); | |
@@ -886,6 +888,7 @@ namespace UnrealBuildTool | |
// Write all the definitions out to a separate file | |
CreateHeaderForDefinitions(CompileEnvironment, IntermediateDirectory, "Adaptive", Graph); | |
+ CompileEnvironment.Definitions.Clear(); | |
// Compile the files | |
return ToolChain.CompileCPPFiles(CompileEnvironment, Files, IntermediateDirectory, ModuleName, Graph); | |
@@ -1039,7 +1042,7 @@ namespace UnrealBuildTool | |
using (StringWriter Writer = new StringWriter()) | |
{ | |
WriteDefinitions(CompileEnvironment.Definitions, Writer); | |
- CompileEnvironment.Definitions.Clear(); | |
+ // CompileEnvironment.Definitions.Clear(); | |
FileItem PrivateDefinitionsFileItem = Graph.CreateIntermediateTextFile(PrivateDefinitionsFile, Writer.ToString()); | |
CompileEnvironment.ForceIncludeFiles.Add(PrivateDefinitionsFileItem); | |
diff --git a/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/ProjectFileGenerator.cs b/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/ProjectFileGenerator.cs | |
index c645578522f..f9b5ae9ead2 100644 | |
--- a/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/ProjectFileGenerator.cs | |
+++ b/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/ProjectFileGenerator.cs | |
@@ -1862,6 +1862,7 @@ namespace UnrealBuildTool | |
{ | |
CppCompileEnvironment ModuleCompileEnvironment = Module.CreateCompileEnvironmentForIntellisense(Target.Rules, BinaryCompileEnvironment); | |
ProjectFileForIDE.AddModule(Module, ModuleCompileEnvironment); | |
+ BinaryCompileEnvironment.Definitions.Clear(); | |
} | |
} | |
} | |
diff --git a/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/Rider/RiderProjectFile.cs b/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/Rider/RiderProjectFile.cs | |
index 06b5c590ab4..eaa897216a1 100644 | |
--- a/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/Rider/RiderProjectFile.cs | |
+++ b/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/Rider/RiderProjectFile.cs | |
@@ -152,6 +152,7 @@ namespace UnrealBuildTool | |
if (ModuleCpp != null) | |
{ | |
CppCompileEnvironment ModuleCompileEnvironment = ModuleCpp.CreateCompileEnvironmentForIntellisense(Target.Rules, BinaryCompileEnvironment); | |
+ BinaryCompileEnvironment.Definitions.Clear(); | |
ExportModuleCpp(ModuleCpp, ModuleCompileEnvironment, Writer); | |
} | |
Writer.WriteObjectEnd(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment