How to generate a specific CPPDEFINE such as -DOEM="FOO BAR" using Scons -


my intention end compiler command line including -doem="foo bar"

i have following in sconstruct file:

opts = options( 'overrides.py', arguments ) opts.add( 'oem_name', 'any string can used here', 'undefined' ) . . . if (env.dictionary('oem_name') != 'undefined'):       oem_define = 'oem=' + str(env.dictionary('oem_name'))     env.append( cppdefines=[ oem_define ] ) 

then put following in "overrides.py" file:

oem_name = "foo bar" 

i seem end "-doem=foo bar" in command line gets generated. can point me in right direction? thanks.

cppdefines can dictionary (the scons user guide has an example). couldn't figure out way rid of surrounding quotes, had double escape quotes around string:

env = environment(cppdefines = {'oem': '\\"foo bar\\"'}) 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -