|
Boost-Build : |
Subject: Re: [Boost-build] [python] Python build description
From: Spencer E. Olson (olsonse_at_[hidden])
Date: 2010-07-14 15:28:22
On Wednesday 14 July 2010 13:21, Steven Watanabe wrote:
> AMDG
>
> Stefan Seefeld wrote:
> > On 07/14/2010 02:50 PM, Spencer E. Olson wrote:
> >> --------------------------------- pyJam Example
> >> -------------------------
> >> in python (as per the example stuff in my earlier email), you have:
> >> <<<<<<<< Jamroot.py>>>>>>>>
> >> from build import *
> >> project('/myApp',
> >> define('PROJECT_NAME=myApp'),
> >> );
> >
> > why not
> >
> > define(PROJECT_NAME="myApp")
> >
> > (i.e., use actual assignment or keyword arguments, rather than an
> > assignment embedded in a string) ?
Seems reasonable enough--and cleaner too. The define command could accept
both normal arguments and keyword args as well such as
def define(*args, **kwargs):
Perhaps you could have:
define('SIMPLEDEF', 'DEF2', FOO='bar', OTHER=0x8, YETANOTHER='help')
to get
-DSIMPLEDEF -DDEF2 -DFOO=bar -DOTHER=0x8 -DYETANOTHER=help
>
> I think a string is probably better since that allows
> things like define("BOOST_ALL_NO_LIB") as well.
> Also, I don't really like relying on the fact that all
> preprocessor macros are also valid python identifiers.
>
> In Christ,
> Steven Watanabe
The above interface allows for either approach.
Spencer
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