From: Jürgen Hunold (hunold_at_[hidden])
Date: 2005-07-07 01:29:03
Hi Volodya !
On Wednesday, 6. July 2005 17:04, Vladimir Prus wrote:
> This PCH thing becomes a common request. Recall that msvc has both
> "automatic" pch mode, that requires, IIRC, a single switch, and
> "manual" mode, that requires creating PCH once, and then using it
> from other targets. I recall I've suggested the following syntax for
> the manual mode:
> pch stl : stl.h :
> exe my : my.cpp : <pch>stl ;
> I think this should not be too hard to add.
That would be great. I've experimented with qmake's pch support and got
a speed improment of 30 to 60 % on msvc and gcc.
> > Also I wonder how other compilers besides msvc implement
> > precompiler headers?
> borland, como, gcc
When implementing pch support, please add a mechanism which allows
disabling pch support from the command line or toolset configuration.
Something like "<use-pch>no" feature.
pch are great when compiling on a single machine. But the go havoc when
using distrubuted compile system like distcc and icecc. Those tools
usually run the preprocessor on the local machine and transmit the
preprocessed output to a slave to do the "hard work" ;-)
None of those tools transmit the precompiled header and it is not
guaranteed that it will be available over the network (not sure if this
is a such a great idea anyway, due to the size of the pch output ;-))
So I like to configure my pch the way you proposed but be able to
disabled it quick.
I don't want do have to write
pch stl : stl.h :
exe my : my.cpp : <pch>stl ;
exe my : my.cpp : <use-pch>no ;
in all of my 100+ Jamfiles because this adds quite an overhead to
-- * Dipl.-Math. Jürgen Hunold ! Institut für Verkehrswesen, Eisenbahnbau * voice: ++49 511 762-2529 ! und -betrieb, Universität Hannover * fax : ++49 511 762-3001 ! Appelstrasse 9a, D-30167 Hannover * hunold_at_[hidden] ! www.ive.uni-hannover.de
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk