diff options
author | Patrick Gartung <gartung@fnal.gov> | 2019-04-04 13:09:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-04 13:09:13 -0500 |
commit | f1f582714c313d21b1f358773bd64261b7c0f77a (patch) | |
tree | d8e1742a71179c9e5f5c718382b2b3e3147c4ce6 /var | |
parent | 553acbbe3dfc797f5c9fc3fabd701d016c63ba33 (diff) | |
download | spack-f1f582714c313d21b1f358773bd64261b7c0f77a.tar.gz spack-f1f582714c313d21b1f358773bd64261b7c0f77a.tar.bz2 spack-f1f582714c313d21b1f358773bd64261b7c0f77a.tar.xz spack-f1f582714c313d21b1f358773bd64261b7c0f77a.zip |
Set Geant4 cmake module path environment variable in dependents. (#11112)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/geant4/package.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index 8846d4555d..a9bcc51469 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -143,3 +143,16 @@ class Geant4(CMakePackage): for d in dirs: target = os.readlink(d) os.symlink(target, os.path.basename(target)) + + def setup_dependent_environment(self, spack_env, run_env, dep_spec): + version = self.version + major = version[0] + minor = version[1] + if len(version) > 2: + patch = version[-1] + else: + patch = 0 + datadir = 'Geant4-%s.%s.%s' % (major, minor, patch) + spack_env.append_path('CMAKE_MODULE_PATH', + '{0}/{1}/Modules'.format( + self.prefix.lib64, datadir)) |