[Scons-users] CPPDEFINES Unexpected Behavior

Strand, Kyle J kyle.strand at beckman.com
Wed Apr 10 14:10:32 EDT 2013


I've discovered some really surprising and probably incorrect behavior with the environment's CPPDEFINES variable. According to the manpage,

"If $CPPDEFINES is a dictionary, the values of the $CPPDEFPREFIXand$CPPDEFSUFFIX construction variables will be appended to the beginning and end of each item from the dictionary. The key of each dictionary item is a name being defined to the dictionary item's corresponding value; if the value is None, then the name is defined without an explicit value."

This leads me to expect that if I use env.AppendUnique() with a dictionary argument, if any of the values in that dictionary are None, then the corresponding keys will be defined without an explicit value. However, this is not what happens. The following code:

env = Environment()
newdefs = {'def1':None}
env.AppendUnique(CPPDEFINES=newdefs)

causes 'def1' to be defined as the literal string 'None.'

Is this the desired behavior? If so, why? If not, I'll submit a bug report.

________________________________
Kyle Strand, Software Intern
Beckman Coulter, Inc., Life Sciences Division
4862 Innovation Drive, Fort Collins, Colorado, 80525
(970) 204-7036


Please be advised that this email may contain confidential
information. If you are not the intended recipient, please notify us
by email by replying to the sender and delete this message. The
sender disclaims that the content of this email constitutes an offer
to enter into, or the acceptance of, any agreement; provided that the
foregoing does not invalidate the binding effect of any digital or
other electronic reproduction of a manual signature that is included
in any attachment.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130410/a95ecc5f/attachment-0001.html>


More information about the Scons-users mailing list