Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2007-07-23 10:24:58


Vladimir Prus wrote:
> Or more specifically, introducing new type 'boost-lib' and creating
> a generator for it. That's ultimately best solution.

I am trying to go along this way... although my slope is steep :-(

1) I am not able to derive from searched-lib-generator.
    I am not sure why. I tried to ...

       type.register BOOST_LIB : : SEARCHED_LIB ;

     because in builtin.jam within the linking-generator I found the code
     that deals with searchable libs. So I believe, in order to work with
     all supported toolsets I need to derive the BOOST_LIB type from
     SEARCHED_LIB, else the code in linking-generator won't work.

     However ...
     after having declared:

       boost-lib boost_thread : : <name>boost_thread ;

     this leads to the following output:

     /home/roland/local/boost-build/kernel/class.jam:93: in new
     *** argument error
     * rule object(searched-lib-generator)@58.__init__ ( )
     * called with: ( searched-lib-generator : : BOOST_LIB : : : : :
     : )
     * extra argument searched-lib-generator

     I also tried to register a custom generator, but I have no idea how
     I could do that, since I have to derive from searched-lib-generator.

2) Is it possible at all to derive from searched-lib-generator ?
    I suspect this will be possible:

    class searched-lib-generator : generator
    {
        rule __init__ ( )
        {
            generator.__init__ searched-lib-generator : : SEARCHED_LIB ;
        }

    I cannot pass the BOOST_LIB type, because this generator isn't
    supposed to accept any constructor parameters.
    The only way I could think of, is by-passing the searched-lib
    __init__ !?
    E.g.:

    class boost-lib-generator : searched-lib-generator
    {
       rule __init__ ( )
       {
            generator.__init__ boost-lib-generator : : BOOST_LIB ;
       }

    But I seriosuly doubt this is allowed.

Any further help / ideas highly appreciated !

Roland


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