Set Geant4 cmake module path environment variable in dependents. (#11112)

This commit is contained in:
Patrick Gartung 2019-04-04 13:09:13 -05:00 committed by GitHub
parent 553acbbe3d
commit f1f582714c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,3 +143,16 @@ def make_data_links(self):
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))