Subject: Re: [Boost-build] feature, properties, variants, and all the rest
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2017-09-29 19:07:31
On 29.09.2017 14:58, Steven Watanabe via Boost-build wrote:
> On 09/29/2017 12:33 PM, Stefan Seefeld via Boost-build wrote:
>> On 29.09.2017 14:20, Steven Watanabe via Boost-build wrote:
>>> - It can scan headers that are generated during the build.
>> and so can a compiler-based approach.
> I don't know any perfect way to handle this.
> It's impossible to complete the scan before
> building all the headers that are required.
A generated header is like any other artefacts (targets): before it
exists, dependencies need to be explicitly provided to bjam. Once it
does exist, it can be scanned.
So if I have a source file `source.cpp` that includes a non-existent
header `generated.hpp`, I need to make sure that any artefact that
depends on source.cpp also depends (explicitly) on generated.hpp. That
way, once the header dependency detection logic is run (no matter
whether using bjam's internal scanner or a compiler-based one, all
> It's also impossible to determine which headers
> are required before scanning.
Well, for generated headers I would assume this information to be
explicitly provided to the build tool. Are there situation where that's
not practical ?
> The solutions I know are:
> - Build all headers early (regardless of whether they're needed or not)
> - Iterate scanning/building the required headers until
> it succeeds. (watch out for race conditions)
the approach above would do this incrementally, i.e. headers are
generated like every other artefact in the dependency graph. Would that
not work ?
Â Â Â Â Â Â Stefan
-- ...ich hab' noch einen Koffer in Berlin...
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