libbeagle: add opencl variant (#27424)
This commit is contained in:
parent
9d9fc522c8
commit
5aaee953c5
@ -25,8 +25,10 @@ class Libbeagle(AutotoolsPackage, CudaPackage):
|
|||||||
depends_on('subversion', type='build')
|
depends_on('subversion', type='build')
|
||||||
depends_on('pkgconfig', type='build')
|
depends_on('pkgconfig', type='build')
|
||||||
depends_on('java', type='build')
|
depends_on('java', type='build')
|
||||||
|
depends_on('opencl', when='+opencl')
|
||||||
|
|
||||||
cuda_arch_values = CudaPackage.cuda_arch_values
|
cuda_arch_values = CudaPackage.cuda_arch_values
|
||||||
|
variant('opencl', default=False, description='Include OpenCL (GPU) support')
|
||||||
variant(
|
variant(
|
||||||
'cuda_arch',
|
'cuda_arch',
|
||||||
description='CUDA architecture',
|
description='CUDA architecture',
|
||||||
@ -54,6 +56,9 @@ def patch(self):
|
|||||||
filter_file('-L$with_cuda/lib', '-L$with_cuda/lib64/stubs',
|
filter_file('-L$with_cuda/lib', '-L$with_cuda/lib64/stubs',
|
||||||
'configure.ac', string=True)
|
'configure.ac', string=True)
|
||||||
|
|
||||||
|
def autoreconf(self, spec, prefix):
|
||||||
|
which('bash')('autogen.sh')
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = [
|
args = [
|
||||||
# Since spack will inject architecture flags turn off -march=native
|
# Since spack will inject architecture flags turn off -march=native
|
||||||
@ -62,8 +67,13 @@ def configure_args(self):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if '+cuda' in self.spec:
|
if '+cuda' in self.spec:
|
||||||
args.append('--with-cuda=%s' % self.spec['cuda'].prefix)
|
args.append('--with-cuda={0}'.format(self.spec['cuda'].prefix))
|
||||||
else:
|
else:
|
||||||
args.append('--without-cuda')
|
args.append('--without-cuda')
|
||||||
|
|
||||||
|
if '+opencl' in self.spec:
|
||||||
|
args.append('--with-opencl={0}'.format(self.spec['opencl'].prefix))
|
||||||
|
else:
|
||||||
|
args.append('--without-opencl')
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user