|
Boost-Build : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-08-04 12:12:10
Vladimir Prus wrote:
> Robert Ramey wrote:
>
>> I'm trying to update my jamfile - the following is an excerpt
>>
>>
>> lib boost_serialization
>> : $(SOURCES).cpp
>> : <toolset>msvc:<cxxflags>/Gy
>> <toolset>msvc-6.5:<cxxflags>-I$(SPIRIT_ROOT)
>> <toolset>borland:<cxxflags>-I$(SPIRIT_ROOT)
>> <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
>> # <conditional>@include-spirit
>> ;
>
> What is SPIRIT_ROOT here? Is it defined to anything -- this
> can be tested by adding
>
> ECHO "XXXX" $(SPIRIT_ROOT) ;
>
>> I've read though the Bjam documentation it seems to me that the above
>> should work - but it oesn't. The compile command lines don't
>> have -I <spirit directory>.
>
> What compiler are you using? borland?
>
I'm using a command line like:
bjam --toolset=msvc-6.5 -sSPIRIT_ROOT=c:/spirit161
I ran you test above and it shows that the variable $(SPIRIT_ROOT) isn't
being initialized. I had assumed it was be from the command line help
which says in part:
* -sx=y; Sets a Jam variable 'x' to the value 'y', overriding any value
that
variable would have from the environment.
and also I suspect this is a hangover from v1 or whatever.
I've also confirmed that the "conditional" works it described in the manual.
So the question remains how one sets bjam variables in the command line.
***************
they way I came to this question was from trying to change
rule include-spirit ( properties * )
{
local result ;
local SPIRIT_ROOT = [ modules.peek : SPIRIT_ROOT ] ;
for local tset in borland {
if ( <toolset>$(tset) in $(properties) ) {
if ( $(SPIRIT_ROOT) ) {
result = <cxxflags>-I$(SPIRIT_ROOT) ;
}
else {
echo **** spirit 1.6x required to build library with this
compiler **** ;
result = <build>no ;
}
}
}
return $(result) ;
}
to
rule include-spirit ( properties * )
{
local result ;
local SPIRIT_ROOT = [ modules.peek : SPIRIT_ROOT ] ;
for local tset in borland msvc-6.5 { # note addition of msvc-6.5
if ( <toolset>$(tset) in $(properties) ) {
if ( $(SPIRIT_ROOT) ) {
result = <cxxflags>-I$(SPIRIT_ROOT) ;
}
else {
echo **** spirit 1.6x required to build library with this
compiler **** ;
result = <build>no ;
}
}
}
return $(result) ;
}
which didn't result in making adding the include directory for msvc-6.5 as I
had
hoped it would. I did confirm that using just msvc did work as one would
hope, but this wouldn't help as a solution as it would apply to ALL msvc
builds
rather than just the selected versions.
Thanks for your help. I would be lost without it.
Robert Ramey
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