summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Willmore <frankwillmore@gmail.com>2021-01-06 12:45:42 -0600
committerTamara Dahlgren <dahlgren1@llnl.gov>2021-02-17 17:07:40 -0800
commit7e5f72817c7c6b3aa7f0b435bc695ccde352f06b (patch)
tree132f2a9144dd05abfe9c6f166ab3c300fc98bf9b
parent41e7293884ee250ffd00c5b9fbe3a4e17ad05faf (diff)
downloadspack-7e5f72817c7c6b3aa7f0b435bc695ccde352f06b.tar.gz
spack-7e5f72817c7c6b3aa7f0b435bc695ccde352f06b.tar.bz2
spack-7e5f72817c7c6b3aa7f0b435bc695ccde352f06b.tar.xz
spack-7e5f72817c7c6b3aa7f0b435bc695ccde352f06b.zip
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).
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
index 469b24941c..3a120b36df 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
@@ -60,3 +60,13 @@ class IntelOneapiCompilers(IntelOneApiPackage):
# 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'))