summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorFrank Willmore <frankwillmore@gmail.com>2021-01-06 12:45:42 -0600
committerGitHub <noreply@github.com>2021-01-06 10:45:42 -0800
commitc3fad974873b19edc3f5dec256c7f32872e7c3ef (patch)
treed199c58afcd6c6f6604738a1a578dba262589514 /var
parent74a54077f555aed589ecd939fbc9da26395f9247 (diff)
downloadspack-c3fad974873b19edc3f5dec256c7f32872e7c3ef.tar.gz
spack-c3fad974873b19edc3f5dec256c7f32872e7c3ef.tar.bz2
spack-c3fad974873b19edc3f5dec256c7f32872e7c3ef.tar.xz
spack-c3fad974873b19edc3f5dec256c7f32872e7c3ef.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).
Diffstat (limited to 'var')
-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 efe7dd7362..c39cad0ebc 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'))