Boost logo

Boost-Build :

Subject: Re: [Boost-build] Manipulating requirements based on a program's return value
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-05-24 18:18:10

On 5/24/2016 5:14 PM, Steven Watanabe wrote:
> On 05/24/2016 02:59 PM, Edward Diener wrote:
>> I am looking for a way in Boost Build that I can create a conditional
>> requirement based on whether a particular program I run returns a
>> particular value. In other words, instead of a conditional requirement
>> like:
>> <toolset>gcc:<link>static
>> I could have a conditional requirement like:
>> run_some_program(pass_some_parameter)==1:<link>static
>> Of course I am making up syntax that has nothing to do with Boost build
>> but the gist of my desire is to be able to set a conditional requirement
>> based on a program's return value when passed some specific input
>> parameter(s).
>> It seems as if this sort of thing should be possible in Boost Build but
>> I have not figured out how to achieve it given my knowledge of Boost
>> Build. Are there any facilities for doing such a thing in Boost Build ?
>> If there are, any pointers would be helpful.
> Try configure.check-target-builds. It's mostly
> used to check compiles, but it can also be used
> for an arbitrary target.

Yes, that is what I have been looking at. It seems as if I must either
create some target or not create some target for check-target-builds to
work. So it seems as if my run_some_program must be in an action which
either creates some target or not. Is that the idea ? If so, how do I
pass pass_some_parameter to my action ? Or is it that I have to build
run_some_program each time with my pass_some_parameter being some
#define which tells my run_some_program what to do ?

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at