Boost logo

Boost-Build :

Subject: [Boost-build] How to peek into the global module? / Name of the global module?
From: Deniz Bahadir (D.Bahadir_at_[hidden])
Date: 2010-02-18 07:06:35

Hi guys,

I have a short question: What is the name of the global module?
I need this, because I want to use "modules.peek" to get the value of
a variable, which I defined in Jamroot, from within another module as
in the following short example:

myVariable1 = "myVal1" ;
constant my Variable2 : "myVal2" ;

module anotherModule {
    echo "myVal1 is: " [ modules.peek <NAME_OF_GLOBAL_MODULE> : myVal1 ] ;
    echo "myVal2 is: " [ modules.peek <NAME_OF_GLOBAL_MODULE> : myVal2 ] ;

BTW: Does it make any difference, if the variable was created as
constant or as old-style Bjam-variable?

Thanks in advance,

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