Mark as system includes unless building standalone
Marking as system headers prevents the compiler from emitting warnings from these headers.
I think I would rather fix the warnings. What warnings did you encounter?
This can be done additionally but new compilers will bring new warnings and even if you manage to fix all warnings in the upstream project, most folks will use a (slightly) older release and will still be affected by new warnings. Having third party dependencies potentially issue warnings in their header files essentially makes it impossible to use warnings as errors for own projects. That's why it's more or less?good practice to mark external depenency header files as system includes.
As for the exact warnings I was seeing, I'll have to check again 👀
Catch2 also doesn't mark the includes as SYSTEM: https://github.com/catchorg/Catch2/blob/devel/src/CMakeLists.txt#L395
If you use ExternalProject you can patch there. If you vendor you can just modify the CMakeLists.txt.
I already vendor because of this, but figured that others could profit from this as well if this was incorporated in the main project. And afaict there is no downside to doing this :shrug: