Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to peek into the global module? / Name of the global module?
From: Deniz Bahadir (D.Bahadir_at_[hidden])
Date: 2010-02-19 04:13:16

2010/2/18 Vladimir Prus <ghost_at_[hidden]>:
>> Or is there a more elegant way?
> It probably depends on what your anotherModule actually is. Could you give
> some more details?

My "anotherModule" is actually the "feature" module.
I am changing into the feature module, to adjust the settings of the
three default build variants (debug, release, profile).
(See your answer to my question in November 2009:


# A helper-module, which stores important variables.
module Helper-Module
        local Jamroot-Module-Name = "" ;
# Store the Jamroot module name $( __name__) in Helper-Module.
local dummy = [ modules.poke Helper-Module : Jamroot-Module-Name :
$(__name__) ] ;

# Change settings of default build-variant "release".
module feature
        # Get name of Jamroot module.
        local Jamroot-Module-Name = [ modules.peek Helper-Module :
Jamroot-Module-Name ] ;
        # Get optimization flags variables from Jamroot module.
        local Optimization-Flags = [ modules.peek $(Jamroot-Module-Name) :
Optimization-Flags ] ;
        <variant>release.components =

Maybe it is possible to change the build-variant by using
"modules.poke" without the need for the Helper-Module? But I did not
try it out.


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