# How to prevent clang-tidy to check sources added with FetchContents?

**URL:** https://discourse.cmake.org/t/how-to-prevent-clang-tidy-to-check-sources-added-with-fetchcontents/2871
**Category:** Code
**Created:** [March 2, 2021, 6:26pm UTC](https://discourse.cmake.org/t/how-to-prevent-clang-tidy-to-check-sources-added-with-fetchcontents/2871 "2021-03-02T18:26:09Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [October 7, 2022, 9:57am UTC](https://discourse.cmake.org/t/how-to-prevent-clang-tidy-to-check-sources-added-with-fetchcontents/2871/9 "2022-10-07T09:57:44Z")

</div>

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 on a target marked `SYSTEM`. We could fall back to the `SYSTEM` property if that dedicated property isn’t set.

I haven’t thought this through, nor have an appreciation for how easy or hard it would be to implement, but it seemed worth mentioning for further discussion.

---

_[View the full topic](https://discourse.cmake.org/t/how-to-prevent-clang-tidy-to-check-sources-added-with-fetchcontents/2871)._
