Details
-
Bug
-
Resolution: Done
-
P2: Important
-
0.3
-
None
-
QBS 3f9470da4c6410c183652ade2d2e85169c558df2 (April 9th)
Kubuntu 13.04 (pre-release) x64
Qt 4.8.4 x64 (from ubuntu repo)
GCC 4.7.2
Description
Preamble:
I am creating a "customcpp" module that depend on the standard "cpp" module and sets up a bunch of cpp.* properties. This is so I can avoid specifying the same redundant cpp properties for all my projects (custom cxx flags, defines, etc.).
One thing common to my projects is that, when they use a precompiled header, it is always named "pch.h". Thus, I will want my "customcpp" module to automatically enable precompiled header whenever that file is present in a product including the module.
Problem:
While setting the cpp.precompiledHeader from within my customcpp module correctly adds the compiler flags to the product for including the precompiled header (e.g. "-include foobar" for gcc), it does not trigger the Transformer that actually compiles the precompiled header. Thus, there is no "precompiling pch.h" step and compilation fails with "cc1plus: fatal error: foobar: No such file or directory" as it fails to find the precompiled header it is told to include.
The qbs log has a trace indicating that the Transformer's condition was not
(snip)
TRACE: [PR] resolving /home/acossette/Downloads/qbs_dependent_module_issue/qbs_dependent_module_issue.qbs
TRACE: [PR] resolveProduct qbs_dependent_module_issue
TRACE: [PR] transformer condition is false
TRACE: [PR] adding file tags (hpp) to someclass.h
TRACE: [PR] adding file tags (cpp) to main.cpp
TRACE: [PR] adding file tags (hpp) to pch.h
(snip)
The transformer in question would be one at line 360 in GenericGCC.qbs.
I have attached a small project that exhibit this issue.