From: Bojan Resnik (resnikb_at_[hidden])
Date: 2006-04-26 06:02:20
> The biggest issue that I have with PCHs is that the requirements of
> the main target are not propagated to the PCH. For example:
> import cast ;
> pch mypch : [ cast _ pcheader : pch.hpp ] pch.cpp ;
> exe hello : mypch main.cpp
> : <define>ABC
> main.cpp will be compiled with ABC defined, while pch.cpp will not.
> This gets more problematic if the exe uses other libraries which have
> usage requirements, since these are not propagated either.
I forgot to mention one more thing - static libraries compiled with
precompiled headers don't work correctly under MSVC. compile.pch
action needs /Yl flag added in order for this to work correctly. The
identifier following /Yl can be anything, and I am using
in my modified compile.pch action. I believe I sent a patch for this a
while ago, but it seems that SourceForge CVS is not working at the
moment, so I can't diff against it at the moment.
-- Bojan Resnik
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