Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-13 10:32:04


"John Maddock" <john_at_[hidden]> writes:

>> I've been striving to understand bjam v1/v2 with respect to Boost.Regex
>> and Boost.Python. bjam is clearly the Way Ahead, so I want to grasp it
>> fully.
>> The goal is to have a Boost.Python module that uses Boost.Regex.
>> Is there an example Jamfile (either version) that builds a Python
>> extension that incorporates Boost.Regex, preferably outside of the Boost
>> tree?
>
> I don't know anything about Boost.Python, but linking to regex in a python
> extension shouldn't be any different to linking to regex anywhere else.
>>From a Jamfile perspective, just add either:
>
> <lib>$(BOOST_ROOT)/libs/regex/build/boost_regex
>
> or
>
> <dll>$(BOOST_ROOT)/libs/regex/build/boost_regex
>
> as a source dependency to the python-extension target.

Actually the preferred form is to use project ids and not depend on
variables such as BOOST_ROOT:

    <lib>@boost/libs/regex/build/boost_regex

  or

    <dll>@boost/libs/regex/build/boost_regex

because it will work in a cross-project context.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk