[Scons-users] Setting environment variables for scons to use globally on my system
Gary Oberbrunner
garyo at oberbrunner.com
Thu May 15 11:13:16 EDT 2014
On Thu, May 15, 2014 at 8:23 AM, Benjamin Lindley <benjameslindley at gmail.com
> wrote:
> ...
> No, that does not solve my problem, unless I can count on everybody
> creating their SConstruct files like that. The point is to have a build
> system where the person writing the build file does not need to have any
> concern about what tool-chain is being used. I will describe a hypothetical
> situation, perhaps that will help.
>
> You create a program, written in portable C++. You use SCons as your build
> system. You successfully compile and run it on your system, let's say you
> use Linux with GCC. But you don't use any specific configurations, just the
> default Environment(). That works fine for you, because GCC is what SCons
> assumes on Linux. You upload the source code, along with the build files
> onto GitHub. I fork the project on my Windows machine. I try to build it,
> and it fails because it assumes, because I'm on Windows, that I want to use
> VC++. But I don't have VC++ installed. I use MinGW. I can fix this problem,
> but I have to modify the SConstruct file, telling it to use MinGW, and also
> telling it the path where my MinGW installation can be found. The project
> is now tailored very specifically to my system setup, oddly containing
> references to paths which are only applicable to my filesystem.
>
> This is all wrong, in my opinion. What I would like to be able to do is
> create SCons projects which contain no references to tool-chains or their
> locations. In my own environment, separate from my projects, I should be
> able to determine things such as which compiler to use for C++, rather than
> having SCons make an assumption for me. The assumptions are fine to be used
> by default, but I should have some way to override them globally, without
> specifying it in every project I make. And then when I download someone
> else's project, as long as it is written in portable C++, I should be able
> to build it right away without making any modifications. Isn't that how a
> cross platform build system is supposed to work?
>
> Although I think your local problem can probably be solved by
monkey-patching the default tool list in a site-scons file, you've hit on a
larger problem which is how to define, use and select by default "tool
chains" in a sitewide way. This is a project we're working on as part of
redefining how tools are created and used.
--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140515/6c687512/attachment.htm
More information about the Scons-users
mailing list