From 7e5f72817c7c6b3aa7f0b435bc695ccde352f06b Mon Sep 17 00:00:00 2001 From: Frank Willmore Date: Wed, 6 Jan 2021 12:45:42 -0600 Subject: 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). --- .../repos/builtin/packages/intel-oneapi-compilers/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') 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')) -- cgit v1.2.3-60-g2f50