From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-07-06 10:04:35
> > 2. In my compiler flags <cflag> I'd like to reference the output
> > directory (the one we changed in 1). This is for this specific instance
> > for precompiled headers, so the actual flag I want to pass is something
> > like this (but of course I don't know the proper variablenames):
> > <cflag>-Fp$(intermediate_path)/$(project_name).pch
> It isn't a good idea to specify cflags manually in jamfile. It's better
> to patch msvc.jam toolset definition file and create features like
> Also you need to track dependencies correctly: all files with <pch>use
> should depend on StdAfx.pch, and stdafx.cpp should create StdAfx.pch
> Can someone more fluent in bbv2 tell me is this a lot of work?
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.
> Also I wonder how other compilers besides msvc implement precompiler
borland, como, gcc
> It looks like bcb can use #pragma hdrstop too.
And, BTW, I forgot that #pragma hdrstop does ;-) Gcc does not have it, IIRC.
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
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