How to blacklist Qt AUTO* files

I use CMAKE_AUTO* for several of my Qt projects. However, the files generated
by this cause some unneeded noise that I would like to avoid.

-the files show up in coverage reports, where I don’t want them

-if I set CLANG_TIDY then these files are also processed, which not only is
unnecessarily slow, it also adds noise because I can’t fix that

-this is especially true also for the moc_*.cpp files

I would like to avoid adding these files by hand, especially not to the CTest
exclude list. I fear I have not overlooked something, so this is some new
property that needs to be implemented. Any opinions what this would look like?

Eike

I’ve not had issues with them when using an out-of-source build (not a build-under-source) since the .clang-tidy configuration file is not present. You might be able to configure a “turn everything off” .clang-tidy file into your build tree too.

I don’t think you can turn clang-tidy off on a per-source basis since it is only a target property right now. Adding support would mean splitting Ninja’s rules again for different wrapper tools in use.

SMTK does do CTest exclusions for coverage at least: https://gitlab.kitware.com/cmb/smtk/-/blob/master/CMake/CTestCustom.cmake.in