Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
0.2
-
None
-
QBS 926d05d4f4e3cd5939b8d2a48f7cd52f203b0625 (Sept 27th)
Ubuntu 12.10 Beta 1 x64
Qt 4.8.3 x64 (from ubuntu repo)
GCC 4.7.2
-
6254235df9e2895281a2dea38752db4a9547abc4
Description
Enabling precompiled header in a project where some header files need to be moc'ed causes a build failure because the new build rules dynamically added for app -> moc_x.o -> moc_x.cpp -> x.h lack a moc_x.o -> pch_output dependency.
This usually results in moc_x.cpp files being compiled before/during pch compilation (depending whether doing -j1 or a parallel build), thus resulting in either:
1) moc_x.cpp compilation failing due to missing PCH
2) moc_x.cpp compilation failing due to invalid PCH
In addition, the graph output by "qbs graph" for the same project is very different in the 3 following cases:
1) $ qbs clean && qbs graph # Graph OK, moc rules not yet present.
2) $ qbs clean && qbs -j1; qbs graph # New moc rules miss dependency on PCH
3) $ qbs clean && qbs -j8; qbs graph # ALL .o -> .cpp rules miss dependency on PCH
I have attached a small project that show all those issues.