intel-oneapi-compilers package: correct module file (#20686)

This properly sets PATH/CPATH/LIBRARY_PATH etc. to make the
Spack-generated module file for intel-oneapi-compilers useful
(without this, 'icx' would not be found after loading the module
file for intel-oneapi-compilers).
This commit is contained in:
Frank Willmore 2021-01-06 12:45:42 -06:00 committed by Tamara Dahlgren
parent 41e7293884
commit 7e5f72817c

View File

@ -60,3 +60,13 @@ def install(self, spec, prefix):
# Try to patch all files, patchelf will do nothing if
# file should not be patched
subprocess.call(['patchelf', '--set-rpath', rpath, file])
def setup_run_environment(self, env):
env.prepend_path('PATH', join_path(self.prefix,
'compiler', 'latest', 'linux', 'bin'))
env.prepend_path('CPATH', join_path(self.prefix,
'compiler', 'latest', 'linux', 'include'))
env.prepend_path('LIBRARY_PATH', join_path(self.prefix,
'compiler', 'latest', 'linux', 'lib'))
env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix,
'compiler', 'latest', 'linux', 'lib'))