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:
parent
c0a2e8651b
commit
1d760e79a6
@ -24,8 +24,9 @@ def url_for_version(self, ver):
|
|||||||
base = 'https://github.com/beast-dev/beast-mcmc/releases/download'
|
base = 'https://github.com/beast-dev/beast-mcmc/releases/download'
|
||||||
return '{0}/v{1}/BEASTv{1}.tgz'.format(base, ver.dotted)
|
return '{0}/v{1}/BEASTv{1}.tgz'.format(base, ver.dotted)
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_run_environment(self, env):
|
||||||
run_env.set('BEAST1', self.prefix)
|
env.set('BEAST1', self.prefix)
|
||||||
|
env.set('BEAST_LIB', self.prefix.lib)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
install_tree('bin', prefix.bin)
|
install_tree('bin', prefix.bin)
|
||||||
|
@ -44,15 +44,15 @@ def patch(self):
|
|||||||
'configure.ac', string=True)
|
'configure.ac', string=True)
|
||||||
|
|
||||||
def configure_args(self):
|
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:
|
if '+cuda' in self.spec:
|
||||||
args.append('--with-cuda=%s' % spec['cuda'].prefix)
|
args.append('--with-cuda=%s' % self.spec['cuda'].prefix)
|
||||||
else:
|
else:
|
||||||
args.append('--without-cuda')
|
args.append('--without-cuda')
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
|
||||||
prefix = self.prefix
|
|
||||||
run_env.prepend_path('BEAST_LIB', prefix.lib)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user