From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-10 02:59:44
On Wednesday 10 November 2004 02:09, Van Nguyen wrote:
> Is it correct that by using
> exe foo : foo.cpp /boost/threads//boost_threads ;
> everytime "bjam foo --clean", then "bjam foo" is invoked, the whole
> boost_threads library source files will be compiled again?
Yes, it's a known problem:
> If so, isn't it a better idea to use the dll files instead?
> lib boost_thread : <name>boost_thread-mt-1_31 <search>C:/Boost/lib ;
> exe foo : foo.cpp boost_thread ;
This might be good, or not. For example, the legacy build system at my work is
based around concept of "modules" and "working installation". Module is a
just a piece of software. It can be build in some flavours (debug/release)
and each flavour is installed system-wide in separate "working installation".
Another module can specify dependency on a this module and the system would
search the system-wide location for a suitable working installation.
The problem is that module A uses module B which uses module C, you can change
C, run build and have everything working. You need to build C, then build B,
then build A, which is tedious, not to mention the fact that you can forget
to build 'B' and get into undebuggable trouble.
Boost.Build approach would be to run "bjam" in A and have everything
> Especially building with vc7.1 where the dll files are automatically
> linked in (ie without having to declare lib threadlib : <name>...
> <search>...), using /boost/threads//boost_thread library would waste a
> lot of time compiling thread/src/*.cpp files again for no good.
If you're on vc7.1 using autolinking might be a good idea. For portable
projects, it's less attractive.
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