[Scons-users] Pass multiple build flags on the command line
Dirk Bächle
tshortik at gmx.de
Fri Aug 15 12:23:55 EDT 2014
Hey Andrew,
On 15.08.2014 03:17, Andrew C. Morrow wrote:
>
> Hi Dirk -
>
> Thanks for posting this, I had often wondered about this. I do have
> some follow up questions:
>
> - Is the same effect achievable somehow with Options, rather than
> Variables? The project I work on currently uses Options for
> everything, and I'm somewhat hesitant to introduce Variables too.
>
since around March 2010, the Options class is merely a wrapper for the
deprecated Variables. So chances are high that you are already working
with Variables(), without noticing it. ;)
> - What to do about paths with spaces? I worry about windows, sometimes.
>
Yeah, actually the spaces should get passed through unchanged to the
command line...but especially under Windows there is some quoting magic
in place if I remember correctly. I'll leave this question open for the
Windows experts...
> - How should this work with things that are naturally lists? If I
> wanted to pass in multiple CPPPATH and LIBPATH, for instance (assuming
> variables approach):
>
> scons CPPPATH="/opt/local/include;/usr/local/include"
> LIBPATH="/opt/local/lib;/usr/local/lib"
>
Checked the sources again, but the easiest I can come up with would be
to write a small wrapper function, like
def SplitListVar(value):
return CLVar(value.split(os.sepchar))
. Then you can pass this as converter function for your Variable.
Regards,
Dirk
More information about the Scons-users
mailing list