Re: Run target dependency on exe without getting transitive usage requirements

Steven Watanabe via Boost-build <[email protected]> Mon, 11 Mar 2019 11:41:15 -0600
Newsgroups gmane.comp.lib.boost.build
Organization Providere Consulting, Inc.
Message-ID <[email protected]>
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
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build