[Scons-users] Has anyone seen anything like this

Mats Wichmann mats at wichmann.us
Wed May 25 14:38:38 EDT 2022


On 5/25/22 12:24, Olivier, Jeffrey V wrote:
> I've worked around the problem for now.  On your comment about the
> VariantDir, can you have more than one?  For example, something like
> 
> VariantDir("{}/src".format(build_prefix), 'src', duplicate=0)
> # Execute SConscripts in this path
> 
> VariantDir("{}/utils".format(build_prefix), 'utils', duplicate=0)
> # Execute SConscripts in this path

You can have many VariantDir mappings. You can have many VariantDir
mappings to the same source, if you like, though each variant dir must
be unique.

We'd usually suggest you explore writing the above using this style
instead, but of course you have to do what's fit for purpose (have not
examined your repo):

SConcript('src/SConscript', variant_dir="build/src", duplicate=0)
SConcript('utils/SConscript', variant_dir="build/utils", duplicate=0)





More information about the Scons-users mailing list