|
Boost-Build : |
Subject: Re: [Boost-build] Pointing to a Boost tree for bjam
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-11-16 04:15:43
> Is there a better way ?
Yes for sure - take a look at the readme.txt file in the root of the
sandbox, which reads:
"This directory contains the file "boost-build.jam" which search for a
Boost install as follows:
* In a directory specified by the --boost=path command line option.
* In a directory specified by the BOOST environment variable.
* In the directories ../boost and ../Trunk.
In addition the variables BOOST and BOOST_ROOT are set to point to the
root of the Boost install, so to refer to other
Boost libraries and the main Boost headers, your Jamfile should contain
something like:
import modules ;
local boost-path = [ modules.peek : BOOST ] ;
And then you can refer to a Boost library "foo" as:
$(boost)/libs/foo/build//boost_foo
Note that if your project does not specify a Jamroot file, then a default
one is provided for you,
and that this file will automatically add $(BOOST)/ to your include
path."
In other words the machinery in the root directory of the sandbox will take
care of almost everything for you - all you need to do is set the BOOST
environment variable - and then add the local include path (to your sandbox
headers) to your projects requirements.
Couldn't be easier... honest... John ;-)
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