[Qbs] Reducing clazy noise
joerg.bornemann at qt.io
Mon Apr 24 09:23:15 CEST 2017
On 23/04/2017 17:52, Elyzabeth von Reuenthal wrote:
> This however produces warning for both my code, and Qt headers. To fix this,
> the readme says:
>> If you want to suppress warnings from headers of Qt or 3rd party code,
>> include them with -isystem instead of -I.
> How can I achieve this with qbs?
Unfortunately there's no single switch for that. You can however modify
your Qt profile like this:
Note the profile you're currently using, or use "qbs config
defaultProfile" to find out what the default profile is.
Find the profile's search path:
$ qbs config --list profiles.qt562.preferences
Replace cpp.includePaths with cpp.systemIncludePaths in the Qt modules
of that profile:
-name '*.qbs' | xargs -n1 sed -i s/cpp\.includePaths/cpp.systemIncludePaths/
Afterwards, all Qt include paths for this profile are passed via
-isystem to the compiler.
More information about the Qbs