I read this article.
https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/IWYUReferenceGuide/index.html
It says “IWYU mode is enabled by default for the Engine and Engine plugins.”
So, I turned on IWYU mode by adding PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; to my module.
It makes a lot of errors because of “*.cpp files include their matching *.h files first.”
So, my question is,
- if some cpp files shares one header files(ex. one header file defines API and several cpp files have implementation), what header file should I include first?
- Some Unreal engine file like ‘AutomationCommandline.cpp’ include “CoreMinimal.h” first. It looks like being against the IWYU rules. If it is, how it can be compiled without error?
Thanks.