[Qbs] isystem with clang

Christian Gagneraud chgans at gmail.com
Wed May 20 12:39:50 CEST 2020

On Wed, 20 May 2020 at 22:24, Christian Kandeler
<christian.kandeler at qt.io> wrote:
> On Wed, 20 May 2020 22:11:20 +1200
> Christian Gagneraud <chgans at gmail.com> wrote:
> > Couldn't find any definite answer about using '-isystem' to avoid the
> > compiler to report warning as error in 3rd party headers (qt, gtest,
> > ...).
> > Looking at the cpp module, i can see some logic, but I can't seem to
> > find a way to force the use of isystem.
> > The only suggestion I found was to hack Qt's modules to change
> > cpp.includePath to  cpp.systemIncludePath.
> >
> > Is this still the case, or am i missing something?
> Not sure what you mean. Use cpp.systemIncludePaths for things under
> your control. For Qt, the respective patch was rejected for some strange
> reason; see https://codereview.qt-project.org/c/qbs/qbs/+/90492.

I understand the cons arguments, and i agree with that, this should be
under user's control.

A variation could be:

property bool useSystemInclude = name === "Qt.core" ? false :
Properties {
   condition: useSystemInclude
   cpp.systemIncludePath: ...
Properties {
   condition: !useSystemInclude
   cpp.includePath: ...

Could it be as simple as that?

This doesn't scale tho, you would need to tweak each 3rd party modules.
Would be nice to take the decision in the Depends item for example:
Somethings that takes the dependency cpp.includePath and transform it
so that it acts as a cpp.systemIncludePath.

BTW, with this "new" (to me) Qt module provider, are the files
generated and store on disk, i can't seem to find them anywhere.


More information about the Qbs mailing list