Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-01-06 03:18:20


Mateusz Loskot wrote:
> I'd like to ask what is the recommended way, in the Boost.Build
> world, to handle / configure external dependencies
> required by my - BBv2-enabled - project.

Hm, that assumes there is a recommended way ;-)

> One of solution I see is to use project.extension rule to configure
> external project with PostgreSQL library and then import it with 'using'
> call:
>
> using pgsql : "/usr/local/postgresql-8.2" ;
>
> This solution is directly based on the concept I found in
> bbv2-ext-tinyxml.zip, in Boost Vault (tools/build/grafik).
>
> This seems to work, but it requires user to manually edit my Jamfile and
> customize the path to PgSQL.

Not really. The project.extension functionality, like the toolset config
functionality, is designed to allow you to put those "using" option in
any config file. If you are willing to ask users to set up a
user-config.jam (or site-config.jam) they can place those there. You can
also do it "dynamically" in your Jamfile in response to command options.
Something like:

local with-pgsql
   = [ MATCH --with-pgsql=(.*) : [ modules.peek : ARGV ] ] ;
if $(with-pgsql)
{
   using pgsql : $(with-pgsql[1]) ;
}

> The main problem here is how to maintain configurable options and
> how to expose these options to users so they can assign appropriate values?

Does my example help? Are there more issues?

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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