[Qbs] cpp.cppFlags and ccache
Christian Kandeler
christian.kandeler at qt.io
Thu May 24 10:22:46 CEST 2018
On Thu, 24 May 2018 11:25:56 +1200
Christian Gagneraud <chgans at gmail.com> wrote:
> I was building my qbs project with QtCreator, my products use
> 'cpp.cppFlags: [ "-Wno-unknown-pragmas" ]', when i use a kit that use
> /usr/bin/g++, everything work as expected (no gcc warning about
> '#pragma warning', when i switch to /usr/lib/ccache/g++ (a symlink to
> /.usr/bin/ccache), i get tons of gcc about '#pragma warning'.
> The command line generated by qbs is:
> /usr/lib/ccache/g++ ... -Wp,-Wno-unknown-pragmas ...
>
> I don't know why this is prefixed with -Wp, but it seems to annoy ccache.
By using cpp.cppFlags, you specifically request that your option is passed to the preprocessor. If there is no specific reason to do so, you could just use e.g. cpp.commonCompilerFlags.
Christian
More information about the Qbs
mailing list