78 |
) |
) |
79 |
|
|
80 |
# Initialise Scons Build Environment |
# Initialise Scons Build Environment |
81 |
|
# check for user environment variables we are interested in |
82 |
|
try: |
83 |
|
python_path = os.environ['PYTHONPATH'] |
84 |
|
except KeyError: |
85 |
|
python_path = '' |
86 |
|
try: |
87 |
|
path = os.environ['PATH'] |
88 |
|
except KeyError: |
89 |
|
path = '' |
90 |
|
try: |
91 |
|
ld_library_path = os.environ['LD_LIBRARY_PATH'] |
92 |
|
except KeyError: |
93 |
|
ld_library_path = '' |
94 |
|
|
95 |
# Note: On the Altix the intel compilers are not automatically |
# Note: On the Altix the intel compilers are not automatically |
96 |
# detected by scons intelc.py script. The Altix has a different directory |
# detected by scons intelc.py script. The Altix has a different directory |
97 |
# path and in some locations the "modules" facility is used to support |
# path and in some locations the "modules" facility is used to support |
99 |
# environment which isn't the "scons way" |
# environment which isn't the "scons way" |
100 |
# This doesn't impact linux and windows which will use the default compiler (g++ or msvc, or the intel compiler if it is installed on both platforms) |
# This doesn't impact linux and windows which will use the default compiler (g++ or msvc, or the intel compiler if it is installed on both platforms) |
101 |
# FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix |
# FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix |
|
try: |
|
|
python_path = os.environ['PYTHONPATH'] |
|
|
except KeyError: |
|
|
python_path = '' |
|
102 |
|
|
103 |
if os.name != "nt" and os.uname()[4]=='ia64': |
if os.name != "nt" and os.uname()[4]=='ia64': |
104 |
env = Environment(ENV = {'PATH':os.environ['PATH'], 'LD_LIBRARY_PATH':os.environ['LD_LIBRARY_PATH'], 'PYTHONPATH':python_path}, tools = ['default', 'intelc'], options = opts) |
env = Environment(ENV = {'PATH':path, 'LD_LIBRARY_PATH':ld_library_path, 'PYTHONPATH':python_path}, tools = ['default', 'intelc'], options = opts) |
105 |
if env['CXX'] == 'icpc': |
if env['CXX'] == 'icpc': |
106 |
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 |
107 |
elif os.name == "nt": |
elif os.name == "nt": |
108 |
# FIXME: Need to implement equivalent of ld library path for windoze |
# FIXME: Need to implement equivalent of ld library path for windoze |
109 |
env = Environment(ENV = {'PYTHONPATH':python_path}, tools = ['default', 'intelc'], options = opts) |
env = Environment(ENV = {'PYTHONPATH':python_path}, tools = ['default', 'intelc'], options = opts) |
110 |
else: |
else: |
111 |
env = Environment(ENV = {'LD_LIBRARY_PATH':os.environ['LD_LIBRARY_PATH'], 'PYTHONPATH':python_path}, tools = ['default'], options = opts) |
env = Environment(ENV = {'PATH':path, 'LD_LIBRARY_PATH':ld_library_path, 'PYTHONPATH':python_path}, tools = ['default'], options = opts) |
112 |
|
|
113 |
# Setup help for options |
# Setup help for options |
114 |
Help(opts.GenerateHelpText(env)) |
Help(opts.GenerateHelpText(env)) |