We disabled header set verification for things brought into the build via FetchContent
. I’d be open to a change that did a similar thing by default for clang-tidy
and other co-compile checkers.
Potentially interesting way forward:
CMake 3.25 is adding a new SYSTEM target property. It is initialised from a corresponding SYSTEM directory property, and both add_subdirectory() and FetchContent_Declare() are gaining an associated SYSTEM keyword as well. I’m starting to wonder if we may want to disable all linters, checkers and verification tasks on targets that have their SYSTEM property set to true.
Maybe we could have a dedicated target property for whether checkers should be enabled in case someone wants to enable checking…
Older thread with more manual workaround:
Hi,
I wonder how I could disable warnings on header files, which are not part of my project (e.g. those in libaries I use and included via fetchContent).
For instance I get:
»bool std::uncaught_exception()« is depcreated [-Wdeprecated-declarations]
This is kinda annoying as I can’t really fix it, it’s not my code.
1 Like