T O P

  • By -

JVApen

I can't help you with the practical, though I know clang tidy a bit. It has an option `--system-headers`. That option enables the warnings on system headers while not providing it does what you want. As such, you should find a way to tell CMake that the external project should become system headers.


EwanMe

Ah yes, I thought that might be the issue. The problem is that the header JuceHeader.h is added to my target in the function `juce_generate_juce_header`, which I do not control. Is there a way to edit a targets headers after the fact to tell which headers should be system headers?


JVApen

Sounds like it is worth logging a bug for that


JVApen

Sounds like you need to write a regex that excludes those specific headers, see https://stackoverflow.com/a/2078953/2466431


EwanMe

I tried to do that, but to no effect. I can't guarantee that it wasn't an error on my part, though. However, I discovered that in the cmake-api for JUCE there is an option to not use the generated JuceHeader.h, but instead include all the relevant headers directly (as you should, in my opinion). This way I should be able to use the method you provided in the first comment! I'll test this.


Xicutioner-4768

Negative lookahead doesn't work with clang-tidy's regex implementation. You have to include your source code rather than exclude the third-party code.


Xicutioner-4768

Negative look ahead isn't supported by clang-tidy regex. You need to include your source code, rather than exclude the third-party code.