|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-11-04 11:49:48
On Tuesday 24 October 2006 10:56, Bojan Resnik wrote:
> Another issue when using the same pch for multiple targets, are the
> usage requirements of dependencies:
>
> lib some-lib : : : <runtime-link>static ;
> lib some-other-lib : : : <runtime-link>shared ;
> exe hello : hello.cpp pch some-lib : <define>FOO ;
> exe hello2 : hello.cpp pch some-other-lib : <define>BAR ;
>
> The usage requirements of some-lib should be propagated to the pch
> if compiling hello, and those of some-other-lib if compiling hello2.
Hmm, this seems to indicate that one cannot use a single PCH for all targets
in entire project. That's bad, but I'm not sure what could be done about it.
> I think it would be best to use one pch target for one project:
>
> cpp-pch pch : pch.hpp ;
> exe hello : hello.cpp pch : <define>FOO ;
>
> cpp-pch pch2 : pch.hpp ;
> exe hello2 : hello.cpp pch2 : <define>BAR ;
Isn't this a little bit too much work? Again, I'm not sure how improve on
this.
- Volodya
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