Boost logo

Boost-Build :

Subject: Re: [Boost-build] Setting environment variables
From: Matthew Chambers (matt.chambers42_at_[hidden])
Date: 2010-11-04 16:28:57


On 11/4/2010 11:49 AM, Josh Stern wrote:
> On 11/4/2010 11:30 AM, Matthew Chambers wrote:
>> On 11/2/2010 10:08 AM, Josh Stern wrote:
>>> So far as I can gather from the documentation, there is no way to set OS environment variables from within boost build. Is that correct?
>> Have you tried module.poke and/or the builtin SHELL rule?
> I have not. Nothing in the manual would lead me to expect that the builtin SHELL rule would help me set environment variables for the current bjam process.
> Can it? Of course one can write their own shell scripts that then call other tools and call those as the underlying tool - this is what Microsoft already
> provides for its compilers, but I'm asking about the ability to set variables from within a jam script as a function of other build options. I'm not
> familiar with module.poke. Where can I learn more about that? (search for poke in the user manual comes up empty).
Honestly I don't know for sure whether either approach will take effect in the toolset's execution environment, but it's easy to try.

SHELL "set FOO=bar" ;
or
module.poke FOO : bar ; # see module.jam

-Matt


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