[Scons-users] CPPDEFINES Unexpected Behavior

Managan, Rob managan1 at llnl.gov
Thu Apr 11 19:19:08 EDT 2013


Dirk,

My concern is that in a complicated configuration it would be very easy to end up with something like
env.AppendUnique(CPPDEFINES={'def1':23, 'def2':None})

env.AppendUnique(CPPDEFINES='def3=4')
if for one package you ended up adding a dict of defines and for another package a simple list or string.
It is the combination that kills you.

I agree in that I never realized you could specify a dictionary for the defines so I suspect this will only happen rarely.

The append logic is where dicts are converted to lists. The first time CPPDEFINES is set (either as an override at construction or adding it to an existing environment) and the value is a dict it is not converted.

It is not hard to update the append logic to convert the dict to a list first and leave out the None value.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan email managan at llnl.gov
LLNL phone: 925-423-0903
P.O. Box 808, L-095 FAX: 925-422-3389
Livermore, CA 94551-0808

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130411/18b42b15/attachment.htm>


More information about the Scons-users mailing list