Hi,
I have only recently begun to use the Unreal Engine as a developer, and I am trying to build from source (with on occasion, experimental versions of the clang++ 4, 5 and 6).
Apparently, the build process on Linux is:
git clone git@github.com:EpicGames/UnrealEngine.git
cd UnrealEngine
./Setup.sh
./GenerateProjectFiles.sh
make UE4Editor
The last command equates to running:
mono Engine/Binaries/DotNET/UnrealBuildTool.exe UE4Editor Linux Development
Lets say for instance that I have almost completed a full rebuild of the UE4Editor target, but a few errors persist that demand that we disable specific compiler warning that are flagged as errors (due to the use of -Werror).
I realize that to add a flag globally, I would, for instance, add it somewhere in GetCLArguments_Global (Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs):
if (CompilerVersionGreaterOrEqual(6, 0, 0))
{
Result += " -Wno-enum-compare-switch";
}
In order to avoid a global recompilation of all sources, I would prefer to apply the change only within the LandscapeEditor.
Is it possible to add this special compilation flag locally to the module where the error manifests?
I had expected that this would be possible by making edits in the LandscapeEditor.Build.cs, but that don’t appear to be any members in the ModuleRules class meant to add custom flags for local use.
If this is so, is there a reason it was designed this way?
Are there any reasons to forbid it?
Thanks in advance.
P.S. Incidentally, the build normally runs quite well. However, I am encountering compiler crashes that I am unable to diagnose, as the behavior doesn’t repeat if the compiler command is invoked directly, from outside of the UnrealBuildTool environment (this is another issue). Any suggestions?