140 |
# MPI |
# MPI |
141 |
BoolOption('useMPI', 'Compile parallel version using MPI', 'no'), |
BoolOption('useMPI', 'Compile parallel version using MPI', 'no'), |
142 |
) |
) |
|
|
|
|
# Initialise Scons Build Environment |
|
|
# check for user environment variables we are interested in |
|
|
try: |
|
|
python_path = os.environ['PYTHONPATH'] |
|
|
except KeyError: |
|
|
python_path = '' |
|
|
try: |
|
|
path = os.environ['PATH'] |
|
|
except KeyError: |
|
|
path = '' |
|
|
try: |
|
|
ld_library_path = os.environ['LD_LIBRARY_PATH'] |
|
|
except KeyError: |
|
|
ld_library_path = '' |
|
|
|
|
143 |
# Note: On the Altix the intel compilers are not automatically |
# Note: On the Altix the intel compilers are not automatically |
144 |
# detected by scons intelc.py script. The Altix has a different directory |
# detected by scons intelc.py script. The Altix has a different directory |
145 |
# path and in some locations the "modules" facility is used to support |
# path and in some locations the "modules" facility is used to support |
150 |
|
|
151 |
if os.name != "nt" and os.uname()[4]=='ia64': |
if os.name != "nt" and os.uname()[4]=='ia64': |
152 |
env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts) |
env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts) |
|
env['ENV']['PATH'] = path |
|
|
env['ENV']['LD_LIBRARY_PATH'] = ld_library_path |
|
|
env['ENV']['PYTHONPATH'] = python_path |
|
153 |
if env['CXX'] == 'icpc': |
if env['CXX'] == 'icpc': |
154 |
env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py |
env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py |
155 |
elif os.name == "nt": |
elif os.name == "nt": |
156 |
env = Environment(tools = ['default', 'intelc'], options = opts) |
env = Environment(tools = ['default', 'intelc'], options = opts) |
|
env['ENV']['PYTHONPATH'] = python_path |
|
157 |
else: |
else: |
158 |
env = Environment(tools = ['default'], options = opts) |
env = Environment(tools = ['default'], options = opts) |
159 |
|
# Initialise Scons Build Environment |
160 |
|
# check for user environment variables we are interested in |
161 |
|
try: |
162 |
|
python_path = os.environ['PYTHONPATH'] |
163 |
|
env['ENV']['PYTHONPATH'] = python_path |
164 |
|
except KeyError: |
165 |
|
python_path = '' |
166 |
|
|
167 |
|
try: |
168 |
|
path = os.environ['PATH'] |
169 |
env['ENV']['PATH'] = path |
env['ENV']['PATH'] = path |
170 |
|
except KeyError: |
171 |
|
path = '' |
172 |
|
try: |
173 |
|
ld_library_path = os.environ['LD_LIBRARY_PATH'] |
174 |
env['ENV']['LD_LIBRARY_PATH'] = ld_library_path |
env['ENV']['LD_LIBRARY_PATH'] = ld_library_path |
175 |
env['ENV']['PYTHONPATH'] = python_path |
except KeyError: |
176 |
|
ld_library_path = '' |
177 |
|
|
178 |
|
|
179 |
# Setup help for options |
# Setup help for options |
180 |
Help(opts.GenerateHelpText(env)) |
Help(opts.GenerateHelpText(env)) |