Run target dependency on exe without getting transitive usage requirements

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Run target dependency on exe without getting transitive usage requirements

Boost - Build mailing list
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?

Thanks,
-Matt
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

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

Boost - Build mailing list
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?
>
> Thanks,
> -Matt
>

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

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

Boost - Build mailing list


On 2019-03-11 1:24 p.m., 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?

How do you determine whether a usage-requirement needs to propagate or not ? I can think of a couple of parameters that need to be propagated to such "run" targets. For example any settings on LD_LIBRARY_PATH (I believe in fact b2 injects them so you can run boost tests without installing all the (shared) libs first).


Stefan
--

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

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

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
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
Reply | Threaded
Open this post in threaded view
|

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

Boost - Build mailing list


On 3/11/2019 1:41 PM, Steven Watanabe via Boost-build wrote:
> 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 ;
How does this work? What prevents 'a' from running before 'a' is built?

> 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.)
Seems like we this might require the opposite of <use>'s difference from <dependency>: something that makes something depend on something
else being built first, but ignores all its requirements

Thanks,
-Matt

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

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

Boost - Build mailing list
AMDG

On 3/11/19 12:44 PM, Chambers, Matthew via Boost-build wrote:

>
>
> On 3/11/2019 1:41 PM, Steven Watanabe via Boost-build wrote:
>> 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 ;
> How does this work? What prevents 'a' from running before 'a' is built?
>

I messed up the target names above.  It should be:
exe a.exe : a.cpp ;
run a.exe : requirements <dependency>another_executable ;

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build