When used as subproject, treat Catch2 cmake target include paths as SYSTEM
… to avoid compiler warnings in Catch2 headers.
Description
When embedding Catch2 into a cmake project using add_subdirectory(), Catch2 target include paths are simply PUBLIC.
If a user project has many compiler warnings enabled, they may get triggered simply by including Catch2 headers.
This PR marks the Catch2 include paths as SYSTEM when it's used as a subproject, so that these include paths are treated as system header locations. This makes the compilers avoid user-enabled warnings from Catch2 headers.
Codecov Report
Merging #2190 (92d827c) into devel (037ddbc) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## devel #2190 +/- ##
=======================================
Coverage 90.07% 90.07%
=======================================
Files 146 146
Lines 7110 7110
=======================================
Hits 6404 6404
Misses 706 706
https://github.com/ChrisThrasher/argon/blob/master/tests/FindCatch2.cmake#L10
This can be fixed from your project as well if you'd like. Take the Catch2 target's interface include directories and re-apply them with SYSTEM.