[Scons-users] generating cpp defines with a function

Gary Oberbrunner garyo at oberbrunner.com
Tue Jun 2 10:47:59 EDT 2015


Does it help if you return a dict (or convert your nested list to a dict)?
It may help if you look at the tests in test/CPPDEFINES (and if you see
missing cases there, feel free to add them.)

On Tue, Jun 2, 2015 at 10:21 AM, Tom Tanner (BLOOMBERG/ LONDON) <
ttanner2 at bloomberg.net> wrote:

> I have a requirement to do something like this:
>
> env.Append(CPPDEFINES = '${some_func(arg1, arg2)}')
>
> My trouble comes when some_func returns something relatively complicated,
> like
>
> [['FGH', 'string'], ['ABC', 'another string'], 'IJK' ]
>
> This appears to get flattened and you get
>
> gcc ... "-DFGH FGH ABC ABC IJK"
>
> Which is very definitely not very helpful.
>
> Is there anything I can do to get the return from some_func not to be
> flattened?
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>


-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150602/c93025bb/attachment.html>


More information about the Scons-users mailing list