[vtk-developers] Pending release... (precompiled headers)

Sebastien BARRE sebastien at barre.nom.fr
Sat Dec 9 13:32:04 EST 2000

At 09/12/2000 18:19, John Biddiscombe wrote:

>>>Simple is good, clean is good.
>Resists the temptation to add a third slightly less acceptable catch-phrase.
>of the Windows users are using MSVC++. There is, sadly, no other place to 
>put it other than on top of each *.cxx.
>The solution I use these days (becasue I have my own makefile generator), 
>is to do
>copy &&|
>  ^#include "Precompiled_Header.h"
>  ^#pragma hdrstop
>| finalcxx
>copy &&|
>  type originalcxx >> finalcxx
>| addpch.bat
>  addpch.bat
>inside the makefile generator, that way, the precompiled header gets 
>added. Of course its necessary to adda whole new set of dependencies to 
>the  the link rule but once you know what's what...

OK, you got me John, you are right of course, I was thinking of adding that 
to pcmaker, i.e. the possibility to add a user-specified preprocessor that 
would pipe "whatever specific lines" + the original source file to the 
compiler (I admit, I've been trying to promote laziness :)). I do not know 
if MSVC++ might accept its input from a pipe, but I'll check that soon or 
later. I am not sure if the overhead is going to cancel the precompiled 
header benefit, but I guess not if the output is piped (the original file 
is only read once, whereas a new modified copy of the file will basically 
force the code to be loaded twice, which might not be significant compared 
to compile time anyway).

The other (dirty) solution is to dive into the CVS documentation, which (if 
I remember correctly) has rules or triggers that could be used to add the 6 
lines when a file is updated from the CVS, and remove them when the file is 

More information about the vtk-developers mailing list