From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-05-25 05:08:17
On Sunday 25 May 2008 09:07:55 Jurko GospodnetiÄ wrote:
> Hi Frank.
> >> However at the moment, I must admit I do not see why Boost Build has
> >> not been implemented so that it builds all of its projects in the same
> >> build folder, without splitting them over separate project specific
> >> build folders. That would make the initial example work 'the good way'
> >> even with multiple projects.
> > I don't understand this. How would you distinguish between debug and
> > release builds, between Parser.obj and Parser.obj of two different
> > projects if all of those were in the same folder??
> I did not mean placing build results for different build
> into a single folder. They would still each get their own folder. I just
> considered using the same build folder for the same configuration of
> different projects.
> I.e. If you build projects A & B in debug & release variants, you now
> get folders:
> but this suggestion would make them be built in:
> On the other hand, I have managed to get some sleep since I wrote
> that and now I see that then multiple projects would then be restricted
> to not being able to have source file with different content but using
> the same name.
> Hope I have not managed to mess up the explanation again... :-)
> Best regards,
> Jurko GospodnetiÄ
> There is a different topic of whether to maintain that folder as we
> do now or perhaps use just use a SHA-1 hash of the used property set and
> not organize the build folders hierarchically. This would help avoid the
> problem with build folder paths becoming too long for some projects and
> hitting the OS path size limit.
I always wanted to use signature of build properties to determine if a target
has to be rebuilt, but never got around to implement that.
Technically, there are two approaches
1. Leave current directory naming intact, but compute and store SHA-1
signatures of properties or maybe build command. Rebuild the target
is the signature has changes. This will make sure a target is rebuild
when you add a define, or cxxflags, or change compiler command. OTOH,
it's not always desirable to rebuild everything in such case, so we
might want some "just update signatures" option.
2. Use SHA-1 for directory names. This is almost the same, with the
added benefit of making directory names shorter. But to make
"just update signatures" possible, we'd need to compute the SHA-1 of
only the properties that now show up in path, and separately compute SHA-1
of all properties for each generated file.
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