Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-02-14 03:54:14


Hi Daniel,

> type.register CUSTOMERINFO : : CPP ; and use a cast to make my generator be
invoked:
>
> cpp customerinfo.cpp
>
> : # sources
>
> [ cast _ CUSTOMERINFO : defaultcustomerinfo.cpp ]
> #defaultcustomerinfo.cpp_to_sed
> ;
>
> But I get a missing argument error when I try this:
>
> C:/bin/buildtools/boost-build/kernel\class.jam:92: in new
> *** argument error
> * rule object(cast-target-class)@77.__init__ ( name : project : type :
.......
> * missing argument type

You've run into a dirty part of V2. For some reason, the 'cast' rule expects
you to provide *main target rule* name, not the exact type. And for all
defined types, you automatically get main target rule with the same name, but
lowercased. So,

   [ cast _ customerinfo : defaultcustomerinfo.cpp ]

should work. Originally I though that using rule names will be more friendly
to users -- end users might not know about types at all, only about main
target rule names. But not I'm not sure, maybe we should use the type name
for cast -- like CPP, EXE or LIB. Comments welcome.

- 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