A generated header that is created in the source tree causes problems for multiple build directories using the same tree. The plugin-macros header has this problem. It could be solved by moving the generated file into the build directory, but CMake provides a better option. Instead of using a generated .h file, use the add_compile_definitions() macro to add the needed macros to the compiler configuration. This allows the generation of plugin-macros.generated.h to be dropped entirely.
How Has This Been Tested?
Tested locally on MacOS and Ubuntu, and in GitHub actions CI
Types of changes
Tweak (non-breaking change to improve existing functionality)
Description
A generated header that is created in the source tree causes problems for multiple build directories using the same tree. The plugin-macros header has this problem. It could be solved by moving the generated file into the build directory, but CMake provides a better option. Instead of using a generated .h file, use the add_compile_definitions() macro to add the needed macros to the compiler configuration. This allows the generation of plugin-macros.generated.h to be dropped entirely.
How Has This Been Tested?
Tested locally on MacOS and Ubuntu, and in GitHub actions CI
Types of changes
Checklist: