[Scons-users] scons not respecting variant_dir with object files

Jason Kenny dragon512 at live.com
Mon Jun 6 13:57:49 EDT 2016


Welcome!

If you have a more project based setup, I think you will find Parts will be useful addition to the build as it tries to make a plugin play like model for components. I have dealt with the need to pull files "outside of tree" in a nice way that should be helpful, as well as rich set of presets to deal with a "build" directories that can be overridden.

Jason

-----Original Message-----
From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Dirk Bächle
Sent: Monday, June 6, 2016 11:23 AM
To: 'SCons users mailing list' <scons-users at scons.org>
Subject: Re: [Scons-users] scons not respecting variant_dir with object files

Hi there!

On 06.06.2016 16:08, Jason Kenny wrote:
> I think there are a few tips I can share for this one.
>
> VariantDir works fine, but has a few quirks.
>
> If you call it yourself, you have to make sure the node that you 
> create are correctly formed with the variant/build path. If you fail to do this the node will not build correctly. For example:
>
> VariantDir(“mybuild/dir”,”src/foo”)
>
> F0= File(“src/foo/a.cpp”)
>
> F1= File(“mybuild/dir /a.cpp”)
>
> Object(F0) # will build in src/foo, not in mybuild/dir
>
> Object(F1) # will build src/foo/a.cpp in mybuild/dir
>
> For this reason it is much easier to define
>
> SConscript(…, variant_dir)
>
> As this will allow you to define the nodes in a more natural way.
>

Yes, exactly this. +1 and thanks Jason. ;)

Dirk


_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users


More information about the Scons-users mailing list