[Scons-users] target-specific variables
Stefan Seefeld
stefan at seefeld.name
Thu Feb 16 13:33:09 EST 2017
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...
More information about the Scons-users
mailing list