[Scons-users] How to select toolchain

Nikolaus Rath nrath at trialphaenergy.com
Mon Apr 27 10:26:30 EDT 2015


Hello,

What is the proper way to select a compiler toolchain? I thought in
order to e.g. select the Intel Fortran compiler, I'd just have to do:

$ cat SConstruct
# Attention, emacs, this is a -*- python -*- file.
env = Environment(tools=['ifort'])
env.Program('test', 'test.F')

but it fails with:

$ scons
scons: Reading SConscript files ...
AttributeError: 'SConsEnvironment' object has no attribute 'Program':
  File "/home/nikratio/tmp/SConstruct", line 3:
    env.Program('test', 'test.F')


If I use tools = ['default', 'ifort'] instead, it seems to work. But as
I understand
http://www.scons.org/doc/production/HTML/scons-user.html#idp505552, this
means that scons will first try to auto-detect all the tools it knows about.

What's the proper way to avoid auto-detection and explicitly specify a
toolchain?

Thanks,
-Nikolaus

-- 
Nikolaus Rath, Ph.D.
Senior Scientist
Tri Alpha Energy, Inc.
+1 949 830 2117 ext 211


More information about the Scons-users mailing list