Compiling module with exotic C++ command line option


in order to compile the C++ source code for my game/plugin module. I need to add an exotic command line option to be passed to the C++ compiler. The option is not currently supported by the Unreal build system, so there’s no way to add it by “normal” tweaking of the TargetRules and/or ModuleRules in the XXXTarget.cs and XXXBuild.cs files. I saw that there is an AdditionalArguments field in class CppCompileEnvironment, which could be used for this reason, but I could not find a way to modify it from XXXTarget.cs and XXXBuild.cs. Although I could, I do not want to modify any of the Unreal source files. Is that possible?

Thanks in advance,

Did you find a solution?

Unfortunately no. I haven’t had time to look into it with the Unreal 4.20 toolchain, however.