When I build my 5.2 C++ solution, warnings are not treated as errors. I want them to be. I tried adding AdditionalCompilerArguments = "/WX";
to my target.cs, but that gives me the error “MyProject modifies the value of AdditionalCompilerArguments. This is not allowed, as MyProject has build products in common with UnrealGame.
” I tried adding DefaultWarningLevel = WarningLevel.Error;
but that gives me the error “MyProjectEditor modifies the value of DefaultWarningLevel. This is not allowed, as MyProjectEditor has build products in common with UnrealEditor.
” I tried adding “BuildEnvironment = TargetBuildEnvironment.Unique;
” but that gives me the error “Targets with a unique build environment cannot be built with an installed engine.
”
So how can I configure my project to treat warnings as errors?