celtera / libremidi

A modern C++ MIDI 1 / MIDI 2 real-time & file I/O library. Supports Windows, macOS, Linux and WebMIDI.
Other
463 stars 52 forks source link

[cmake] Fix warning leakage once and for all. #106

Closed lilggamegenius closed 8 months ago

lilggamegenius commented 8 months ago

Changes almost all includes to be system includes. This tells the compiler to ignore warnings from them. Without the system flag, they get included as both system and normal includes. Cmake will pass these down as-is which is what caused the warning leakage. The only include that is not marked as system are the headers from this library, and its only enabled when not building as header-only. Since normal includes have priority over system includes, both can be set.

With these changes, you no longer have to limit how many warnings you want to enable, and works with CI automatically with no extra flags needed, so LIBREMIDI_CI is no longer needed, at least for warnings.