amazon-gamelift-plugin-unreal
amazon-gamelift-plugin-unreal copied to clipboard
Clang compilation in Windows fails.
Using Clang compilation for Windows targets, which can be enabled like so from the project Target.cs.
WindowsPlatform.Compiler = WindowsCompiler.Clang;
Fails due to rapidjson not handling MSVC_VER still being defined, and pushing warning codes that don't exist in Clang. The solution is to reorder the various if blocks disabling warning to check for clang first.
For example, from meta.h
#if defined(__GNUC__) || defined(__clang__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(6334)
#endif