Boost logo

Boost-Build :

Subject: Re: [Boost-build] Automatic version number or build-id
From: Niklas Angare (li51ckf02_at_[hidden])
Date: 2015-09-23 19:21:03

"Paulo Márcio Figueiredo Alves" <pauloalves1986_at_[hidden]> wrote:
> On Sat, Sep 19, 2015 at 10:17 AM Niklas Angare <li51ckf02_at_[hidden]>
> wrote:
>> I'm trying to get Boost.Build to generate a source file at build time
>> containing an automatically generated version number or build-id.

> make BuildTime2.cpp : : @buildtimecpp : <dependency>$(myfiles) ;
> exe MyExe : $(myfiles) BuildTime2.cpp ;

Thanks for the tip. However, it seems a little brittle. If at any point in
the future someone adds dependencies to MyExe without adding them to
$(myfiles), the build-id won't always be updated when the exe is. I could
put a comment by the exe rule in the jam file, but this may not stop someone
adding <library>somelib to the requirements of the project at the other end
of the long Jamfile.

Any further suggestions?


Niklas Angare

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