[Scons-users] target-specific variables
Bill Deegan
bill at baddogconsulting.com
Thu Feb 16 13:47:17 EST 2017
env.SharedLibrary(target,sources,
CPPDEFINES=env['CPPDEFINES"]+['my','new','defines'])
On Thu, Feb 16, 2017 at 10:33 AM, Stefan Seefeld <stefan at seefeld.name>
wrote:
> On 16.02.2017 13:18, Bill Deegan wrote:
> > Stefan,
> >
> > Yes.
> >
> > env.SharedLibrary(target,sources, CPPDEFINES=...)
> > You can add any Envinronment() variable to any builder and it's scope
> > is limited to that builder.
> >
> > You can see this in the manpage (and likely in the users guide as well)
> >
> > It is possible to override or add construction variables when calling
> > a builder method by passing additional keyword arguments. These
> > overridden or added variables will only be in effect when building the
> > target, so they will not affect other parts of the build. For example,
> > if you want to add additional libraries for just one program:
> >
>
> Right, I understand all that. My problem is that specifying CPPDEFINES
> that way will replace the existing set of flags, while I merely want to
> append to them. Thus, I was looking for a way to do the equivalent of
> env.AppendUnique(CPPDEFINES=...), but per target (and without the
> overhead of cloning an environment).
>
> It seems I'll have to follow William's advice and use Clone().
>
> Thanks,
> Stefan
>
> --
>
> ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170216/2b8aa29d/attachment.html>
More information about the Scons-users
mailing list