# 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:** 8

<div class="post-metadata">

### Author: ![Leon0402](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/ccd318/32.png) [@Leon0402](https://discourse.cmake.org/u/Leon0402)
#### Post date: [September 1, 2021, 7:52am UTC](https://discourse.cmake.org/t/how-to-prevent-clang-tidy-to-check-sources-added-with-fetchcontents/2871/8 "2021-09-01T07:52:45Z")

</div>

Is this the same as [Disable warning on fetched projects](https://discourse.cmake.org/t/disable-warning-on-fetched-projects/1978)?

See the solution from the first post. This is what I do for every library. It works great. So if you compile your project ABC it will use isystem for your lib XYZ (gcc / clang).  
I’m not quite sure about compiler warnings though. In the first run it will also compile XYZ and therefore might show some compiler warnings. I haven’t yet investigated this.  
But it’s only the first time anyway, so no harm really. And it seems to be compiler warnings and not clang tidy

---

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