[Scons-users] TDM Gcc detection

Evan Driscoll driscoll at cs.wisc.edu
Tue Apr 2 12:23:45 EDT 2013


On 04/02/2013 06:06 AM, Mark Holloway wrote:

> Hi Bill,

>

> A valid point about not wanting to import the path - this is actually

> one of the reasons I was so taken by scons, so I should have mentioned

> that my workaround was a hack. As it happens, I'm only building with gcc

> on windows to get the extra value of gcc warning levels - so for me it

> isn't for production purposes.

>

> If I were doing that, is there anyway of providing the path to the tool

> finder (that's probably not the correct terminology) for, say mingw in

> this context, other than by adding it to the path? It'd be nice to avoid

> to polluting the path in situations where the tools are not in the

> standard locations.


You could probably explicitly add the path to env['ENV']['PATH'], no?
Something like env['ENV']['PATH'] += 'c:/something/bin/'? (Maybe you
have to use '\\'? Untested)

Alternatively, you may be able to specify the full path to the compiler
in env['CC'] and env['CXX'], something like
env['CC']='c:/something/bin/gcc'.

Basically all of the SConscripts I write that aren't for just a quick
throwaway thing accept CC=... and CXX=... parameters on the command line
(using Variables) so that the user can specify what compiler to use, as
SCons's default behavior Just Doesn't Work in my environment.

Evan



More information about the Scons-users mailing list