[QBS] Generate pre compiled headers

Joerg Bornemann joerg.bornemann at digia.com
Thu May 22 18:19:55 CEST 2014

On 21-May-14 00:08, olivier musse wrote:

> 1) The file pch_headers.h is well generated on the build directory if in
> my PchHeaders Group I select files with extension other than .h . When
> I use .h extension, the pch_headers.h is not generated as if there are
> some interferences between the cpp module "hpp" tag and my "pch" tag.
> Does it may be the issue? Can I do something for it to work?

This should work... but it doesn't - as I just noticed.
I've created QBS-593 to track this.

> 2) the line
> cpp.cxxPrecompiledHeader:product.buildDirectory+"/pch_headers.h" seem to
> have no effect when put in the Module. I try to put it directly in the
> product and then it warn me that the artifact is not in the list of
> source files. For the pch_headers.h to be pre compiled, I need to put it
> manually in the source directory and add to project

Right. What you're trying to do is highly dependent on the current 
implementation of the PCH handling in the cpp module. We never designed 
it for this use case.
Not sure whether this is possible without altering the implementation in 
the cpp module.



More information about the Qbs mailing list