Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-07-02 07:31:30


On Wednesday 02 July 2008 12:40:06 Rabbit Red wrote:
> Hi,
>
> I'm trying to find a way to use build options in a rule.
> This is my Jamfile for the Boost library:
> # Boost 1.35
> # /3rd-party/boost/Jamfile
>
> rule boostlib ( name : property-set ) {
> # path
> local libpath = "lib" ;
>
> # library
> local prefix = "boost_" ;
> local libname = $(name) ;
>
> if [ $(property-set).get <toolset> ] = gcc {
> libname = $(libname)"-gcc" ;
>
> # TODO: check for GCC version
> # <toolset-gcc:version>
> }
>
> # threading tag
> if [ $(property-set).get <threading> ] = multi {
> libname = $(libname)"-mt" ;
> }
>
> # variant tag
> if [ $(property-set).get <variant> ] = debug {
> libname = $(libname)"-d" ;
> }
>
> # add lib to project
> lib $(name) : : $(prefix)$(libname) <search>$(libpath) ;
> }

Please check the contrib/boost.jam file in SVN trunk, it's supposed to
do all of this already.

>
> project boost
> : requirements
> <include>"include"
> : usage-requirements
> <include>"include"
> ;
>
> # only include headers
> alias headers : : : : ;
>
> # link libraries
> boostlib regex ;
>
>
> bjam's output:
> ../../3rd-party/boost/Jamfile:44: in modules.load
> *** argument error
> * rule boostlib ( name : property-set )
> * called with: ( regex )
> * missing argument property-set
> ../../3rd-party/boost/Jamfile:6:see definition of rule 'boostlib' being
> called

And what's your question? You pass one argument to a function with two parameters,
so naturally you get an error.

- Volodya


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