|
Boost-Build : |
Subject: Re: [Boost-build] Run target dependency on exe without getting transitive usage requirements
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2019-03-11 17:41:15
AMDG
On 3/11/19 11:24 AM, Chambers, Matthew via Boost-build wrote:
> Did this message actually get through? This would be a nice feature to
> have.
>
> On 11/30/2018 5:56 PM, Chambers, Matthew wrote:
>> I have a run target that needs to wait until an exe is built before it
>> runs. When I pass it as <dependency> it adds all the exe's usage
>> requirements (almost all of which are propagated from the exe's own
>> lib dependencies) to the run target. How do I avoid that? Is this by
>> design? Shouldn't depending on an exe only propagate the exe's own
>> usage-requirements, not any transitive usage-requirements?
>>
The only way to prevent usage-requirements from propagating
upwards is to create a custom target class that filters them
out. In this particular case, you can probably work around it
by building the run target's executable separately.
run a.cpp ; -> exe a : a.cpp ; run a ;
As Stefan pointed out, we have no good way to determine
what should propagate and what should not, so we always
propagate everything (with a few hard-coded exceptions. Grrrr.)
In Christ,
Steven Watanabe
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