|
Boost-Build : |
Subject: Re: [Boost-build] [python] Python build description
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2010-07-15 02:18:19
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) ?
>
> 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.
Using a string does not feel like the optimal solution. I don't know Python,
but isn't it possible to accept an arbitrary number of parameters to the
project method (and thus multiple defines or whatever), like:
project('/myApp',
define('BOOST_ALL_NO_LIB'),
define('PROJECT_NAME', 'myApp')
);
/ Johan
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