[Scons-users] generating cpp defines with a function

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Tue Jun 2 10:21:09 EDT 2015


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?


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


More information about the Scons-users mailing list