[Scons-users] Pass multiple build flags on the command line

Andrew C. Morrow andrew.c.morrow at gmail.com
Thu Aug 14 21:17:13 EDT 2014


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.

- What to do about paths with spaces? I worry about windows, sometimes.

- 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"

This doesn't seem like it would do the right thing. Something else? Is
there another trick for handling these? Is it also applicable to Options?

Thanks,
Andrew



On Mon, Aug 11, 2014 at 4:38 AM, Bertrand Marc <beberking at gmail.com> wrote:

> Hi Dirk,
>
> Thank you very much for the suggestion. It works as expected and does the
> trick. I submitted a patch accordingly to pingus developpers.
>
> Best regards,
> Bertrand
>
> 2014-08-10 1:22 GMT+02:00 Dirk Bächle <tshortik at gmx.de>:
>
>  So, if you instead use:
>>
>>           self.opts.Add('CXXFLAGS', 'C++ Compiler flags', ['-O2', '-s'],
>> converter=SCons.Util.CLVar)
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140814/c03fa4c8/attachment.html>


More information about the Scons-users mailing list