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
profiles.qt562.preferences.qbsSearchPaths: "/home/someone/.config/QtProject/qbs/1.9.0/profiles/qt562"

Replace cpp.includePaths with cpp.systemIncludePaths in the Qt modules of that profile:

$ find /home/someone/.config/QtProject/qbs/1.9.0/profiles/qt562/modules/Qt/ -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.


BR,

Joerg
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to