[Scons-users] Setting environment variables for scons to use globally on my system

Benjamin Lindley benjameslindley at gmail.com
Thu May 15 04:06:30 EDT 2014


Is there any way to set environment variables for my system which scons
will use, without me having to change the SConstruct file? For example,
I would like to use MinGW instead of VC++ for my C++ builds on Windows.
I can, of course, do this in my SConstruct file:


|env = Environment(tools = ['mingw'])

|


But if I do that, then I'm editing things into my build files that make
it specific to my particular system configuration. That defeats the
whole purpose of a portable build system, in my opinion. If I upload
that as part of my repository for others to build, they may not be using
MinGW. They may want to use VC++, or Clang, and I don't think they
should have to modify the build file (or anything else in the repository
for that matter) in order to build the program or library. Ideally,
anyone with in an environment with a functional C++ toolchain and scons
installed /should/ be able to just type |scons| on the command line, and
things should go smoothly for them. Isn't that the (or a) goal of scons?
Or am I misunderstanding its purpose?

Another thing is paths. The above line is not even enough, I have to
still import the path to the MinGW binaries. I've read the justification
for this. But it's just more system specific information which I have to
put in my build files, which may be used by others where the chosen
paths are not applicable.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140515/d25a7560/attachment.html


More information about the Scons-users mailing list