Boost logo

Boost-Build :

From: Jaroslav Gresula (jgresula_at_[hidden])
Date: 2006-02-14 07:04:18

Vladimir Prus <ghost <at>> writes:

> Hi Jaroslav,
> > Is there a way how I can set an environment variable from a Jamfile?
> No, there is none. You can set environment variable in a specific action,
> using the appropriate command, but not globally. Maybe, you can describe the
> use case where it's necessary?

Hi Vladimir,

Actually, I don't need to set it globally. It is enough for me to set it just
for a unit test process invoked by bjam. I thought of something like this:

rule set-env-var ( properties * )
  local variant = [ feature.get-values <variant> : $(properties) ]
  #something like: set MY_ENV_VAR =/some_dir/$(variant)

unit-test my-test
  : test.cpp
  : <conditional>@set-env-var

Is something like this achievable?


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