Boost logo

Boost-Build :

From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-06-22 04:19:58

> From: "Sohail Somani" <s.somani_at_[hidden]>
> Subject: [Boost-build] [BBv2] Defines => rebuild?
> To: "Boost.Build developer's and user's list"
> <boost-build_at_[hidden]>
> Message-ID:
> <1C1EBEF8DBACDC439D038EA051674EC73169FE_at_[hidden]>
> Content-Type: text/plain; charset="us-ascii"
> Hi,
> Is there a way to get boost build to rebuild if the defines change for a
> given target?

No, because bjam doesn't pair the command-line used to generate the
binary outputs in the same way that, say, ccache does.

This also causes problems with linking because the deletion of a source
file causes the command-line for performing the link command to change,
but does not touch a timestamp on any input .o file. The linked library
is incorrectly reused in this case.

Both could be solved by writing a paired filename.o.parm file at the
same time (and SCONS I think does solve this problem) but there are
potential performance issues that would need to be profiled before an
implementation was rolled out. There's an active ticket here which
describes the problem and some possible implementations:

To work around the problem safely, put your defines in a variant. Then,
when you build using that variant, none of the binaries will be
incorrectly reused. If you are using ccache it should still be
reasonably fast:

variant release_gtk
         : release
         : <define>USE_GTK

then use:

bjam release_gtk

instead of:

bjam <define>gtk release

Best Regards,
Matthew Herrmann

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at