diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2021-11-15 04:10:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 11:10:02 +0100 |
commit | 5aaee953c58130b04abb4291a5df71f28a122ea2 (patch) | |
tree | 1295d9828b3d0f066794ac792d2ca3c73496d981 | |
parent | 9d9fc522c84e1c2d32c97ea52311bdce21ee27a7 (diff) | |
download | spack-5aaee953c58130b04abb4291a5df71f28a122ea2.tar.gz spack-5aaee953c58130b04abb4291a5df71f28a122ea2.tar.bz2 spack-5aaee953c58130b04abb4291a5df71f28a122ea2.tar.xz spack-5aaee953c58130b04abb4291a5df71f28a122ea2.zip |
libbeagle: add opencl variant (#27424)
-rw-r--r-- | var/spack/repos/builtin/packages/libbeagle/package.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libbeagle/package.py b/var/spack/repos/builtin/packages/libbeagle/package.py index 50b0fd4f34..0e6dc470d2 100644 --- a/var/spack/repos/builtin/packages/libbeagle/package.py +++ b/var/spack/repos/builtin/packages/libbeagle/package.py @@ -25,8 +25,10 @@ class Libbeagle(AutotoolsPackage, CudaPackage): depends_on('subversion', type='build') depends_on('pkgconfig', type='build') depends_on('java', type='build') + depends_on('opencl', when='+opencl') cuda_arch_values = CudaPackage.cuda_arch_values + variant('opencl', default=False, description='Include OpenCL (GPU) support') variant( 'cuda_arch', description='CUDA architecture', @@ -54,6 +56,9 @@ class Libbeagle(AutotoolsPackage, CudaPackage): filter_file('-L$with_cuda/lib', '-L$with_cuda/lib64/stubs', 'configure.ac', string=True) + def autoreconf(self, spec, prefix): + which('bash')('autogen.sh') + def configure_args(self): args = [ # Since spack will inject architecture flags turn off -march=native @@ -62,8 +67,13 @@ class Libbeagle(AutotoolsPackage, CudaPackage): ] 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: 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 |