how to create a new variant in bjam

Posted by steve jaffe on Stack Overflow See other posts from Stack Overflow or by steve jaffe
Published on 2010-04-26T16:30:47Z Indexed on 2010/04/26 16:33 UTC
Read the original article Hit count: 277

Filed under:

I've tried reading the documentation but it is rather impenetrable so I'm hoping someone may have a simple answer. I want to define a new 'variant', based on 'debug', which just adds some macro definitions to the compiler command line, eg "-DSOMEMACRO". I think I may be able to do this as a "sub-variant" of debug, or else just define a new variant copying 'debug', but I'm not even sure where to do this. It looks like feature.jam in $BOOST_BUILD_DIR/build may be the place. Perhaps what I really want is simply a new 'feature' but it's still not clear to me exactly what I need to do and where, and I don't know if a 'feature' allows me to direct the build products to a different directory to the 'debug' build.

Any suggestions will be appreciated. (In case you're wondering, I have to use bjam since it has been adopted as our corporate standard.)

© Stack Overflow or respective owner

Related posts about bjam