[Scons-users] Pass multiple build flags on the command line
William Blevins
wblevins001 at gmail.com
Fri Aug 15 01:22:17 EDT 2014
>
> - 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"
I'm not sure if SCons.Util has a converter for that specific case, but even
if it doesn't you can pass in your own converter function.
Also, there are several pages on passing arguments to SCons here:
http://www.scons.org/doc/production/HTML/scons-user.html#sect-command-line-options
V/R,
William
On Thu, Aug 14, 2014 at 9:17 PM, Andrew C. Morrow <andrew.c.morrow at gmail.com
> 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.
>
> - 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
>>
>>
>
> _______________________________________________
> 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/20140815/dc3db45c/attachment.html>
More information about the Scons-users
mailing list