[Scons-users] CPPDEFINES Unexpected Behavior
    Managan, Rob 
    managan1 at llnl.gov
       
    Thu Apr 11 11:27:24 EDT 2013
    
    
  
I have a quick fix for the case
Env.AppendUnique(CPPDEFINES={'test1':3, 'test2':None})
I need to encapsulate it and apply the same fix to setting CPPDEFINES when the environment is created.
It sounds like Kyle may have already defined a good function to use.
Maybe he could attach it to the bug report.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
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
On 4/10/13 11:11 PM, "Gary Oberbrunner" <garyo at oberbrunner.com<mailto:garyo at oberbrunner.com>> wrote:
On Wed, Apr 10, 2013 at 5:13 PM, Evan Driscoll <driscoll at cs.wisc.edu<mailto:driscoll at cs.wisc.edu>> wrote:
On 04/10/2013 02:48 PM, Strand, Kyle J wrote:> No, it doesn't, and it
shouldn't be expected to. That produces the def
> string "def1=", which, I suppose, might be better than "def1=None",
> but still isn't correct; it should simply be "def1".
FWIW, I basically always use CPPDEFINES as a dictionary, and the
behavior that Kyle wants is what I'd expect. In fact, I'm rather
surprised that I haven't exercised that functionality, as I thought I
had. :-)
I'd expect something like:
  env['CPPDEFINES'] = { 'A': None, 'B': 1, 'C': 'Foo' }
to produce the command lines
  ... -DA -DB=1 -DC=Foo
  ... /DA /DB=1 /DC=Foo
as appropriate for the platform. (Alternatively, it could say -DA=1 and
/DA=1.)
I agree with you all here.  The above looks like the proper behavior.  Please submit a bug report or better yet a patch.  There are tests for this which should be extended.
--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130411/572be57e/attachment.htm>
    
    
More information about the Scons-users
mailing list