[Scons-users] Handling user supplied CPPPATH with Variables?

Marc Joliet marcec at gmx.de
Thu Jan 16 19:58:51 EST 2014


Am Thu, 16 Jan 2014 13:23:52 -0500
schrieb "Andrew C. Morrow" <andrew.c.morrow at gmail.com>:


> Where I have declared a CPPPATH variable with AddVariables:

>

> cmdLineVars = Variables(None, ARGUMENTS)

> cmdLineVars.AddVariables(

> ('CPPPATH', 'Preprocessor search path')

> )

>

> env = Environment(

> variables=cmdLineVars,

> )


I believe you could replace

('CPPPATH', 'Preprocessor search path')

with

('CPPPATH', 'Preprocessor search path', "", None, lambda s: s.split(','))

The lambda is a converter passed to Add(). This is documented in the SCons man
page under Add and AddVariables. I use "str.split" in one build system, for
example, which is where I remembered this from.

HTH
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20140117/860ab647/attachment.pgp


More information about the Scons-users mailing list