[Qbs] Set cpp properties for generated cpp files (moc) does not seem to work

Christian Kandeler christian.kandeler at qt.io
Thu May 14 16:41:52 CEST 2020


On Thu, 14 May 2020 12:22:53 +0000
Maximilian Hrabowski <hrabowski at clausmark.com> wrote:

> we have quite a strict warning policy so all warnings are treated as errors in our code. This creates problems when including third-party code that produces warnings, so usually those files are put in a special group and warningsAreErrors is turned off:
> 
> Group {
>> cpp.treatWarningsAsErrors: false
> }
> 
> This usually works quite well. But now i’ve got the problem that i need to disable this for cpp files generated by moc. I tried the following approach but it does not seem to work:
> 
> Group {
> fileTagsFilter: [“moc_cpp"]

"moc_cpp" is for files to be included. As those won't get compiled, this property has no effect.
You might be able to approximate what you want by using "unmocable" here.

> cpp.treatWarningsAsErrors: false
> }

Christian


More information about the Qbs mailing list