Exclude API code injection lines from includes cache

This commit is contained in:
2023-03-14 19:48:51 +02:00
parent edd4e37111
commit 9e4fd9fadb

View File

@@ -323,6 +323,18 @@ namespace Flax.Build.NativeCpp
//continue;
}
// Skip lines containing API_INJECT_CODE
if (includedFile.EndsWith('\\'))
{
int j = includeStart;
while (j-- > 1 && fileContents[j-1] != '\n')
{
}
var injectCode = fileContents.Substring(j, "API_INJECT_CODE".Length);
if (injectCode == "API_INJECT_CODE")
continue;
}
// Relative to the workspace root
var includedFilePath = Path.Combine(Globals.Root, "Source", includedFile);
if (!FileExists(includedFilePath))