[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-build
Subject:    [Boost-build]  [BBv2] Defines => rebuild?
From:       Matthew Herrmann <matthew.herrmann () zomojo ! com>
Date:       2006-06-22 8:19:58
Message-ID: 449A52AE.3000106 () zomojo ! com
[Download RAW message or body]

> From: "Sohail Somani" <s.somani@fincad.com>
> Subject: [Boost-build] [BBv2] Defines => rebuild?
> To: "Boost.Build developer's and user's list"
> 	<boost-build@lists.boost.org>
> Message-ID:
> 	<1C1EBEF8DBACDC439D038EA051674EC73169FE@xbox.financialcad.com>
> 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:

https://zigzag.cs.msu.su:7813/boost.build/ticket/80


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic