Libbeagle fixes (#13463)

* Fixes for libbeagle

This PR fixes a couple of issues with the libbeagle package.

- Use args.append('--with-cuda=%s' % self.spec['cuda'].prefix)
- Disable the default of compiling with -march=native as Spack now
  inserts architecture specific flags
- Set BEAST_LIB in the beast1 package not in libbeagle.

* Use new setup_run_environment method
This commit is contained in:
Glenn Johnson 2019-10-27 22:24:06 -05:00 committed by Adam J. Stewart
parent c0a2e8651b
commit 1d760e79a6
2 changed files with 9 additions and 8 deletions

View File

@ -24,8 +24,9 @@ def url_for_version(self, ver):
base = 'https://github.com/beast-dev/beast-mcmc/releases/download'
return '{0}/v{1}/BEASTv{1}.tgz'.format(base, ver.dotted)
def setup_environment(self, spack_env, run_env):
run_env.set('BEAST1', self.prefix)
def setup_run_environment(self, env):
env.set('BEAST1', self.prefix)
env.set('BEAST_LIB', self.prefix.lib)
def install(self, spec, prefix):
install_tree('bin', prefix.bin)

View File

@ -44,15 +44,15 @@ def patch(self):
'configure.ac', string=True)
def configure_args(self):
args = []
args = [
# Since spack will inject architecture flags turn off -march=native
# when building libbeagle.
'--disable-march-native',
]
if '+cuda' in self.spec:
args.append('--with-cuda=%s' % spec['cuda'].prefix)
args.append('--with-cuda=%s' % self.spec['cuda'].prefix)
else:
args.append('--without-cuda')
return args
def setup_environment(self, spack_env, run_env):
prefix = self.prefix
run_env.prepend_path('BEAST_LIB', prefix.lib)