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

Is this the same as Disable warning on fetched projects?

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