summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-04-11 20:20:25 +0200
committerGitHub <noreply@github.com>2022-04-11 20:20:25 +0200
commit271f0c024a0d613e1d902477ffbb38bf99557e21 (patch)
tree22eae2f7bbce41ca4dee75a51da74cbb474257f1
parent8deb50fea548ab7b88f03a5516f9cbb88c992340 (diff)
downloadspack-271f0c024a0d613e1d902477ffbb38bf99557e21.tar.gz
spack-271f0c024a0d613e1d902477ffbb38bf99557e21.tar.bz2
spack-271f0c024a0d613e1d902477ffbb38bf99557e21.tar.xz
spack-271f0c024a0d613e1d902477ffbb38bf99557e21.zip
libceed: remove custom phases, slight refactor of variants (#29970)
-rw-r--r--var/spack/repos/builtin/packages/libceed/package.py54
1 files changed, 26 insertions, 28 deletions
diff --git a/var/spack/repos/builtin/packages/libceed/package.py b/var/spack/repos/builtin/packages/libceed/package.py
index 58eec86276..e2d91b8139 100644
--- a/var/spack/repos/builtin/packages/libceed/package.py
+++ b/var/spack/repos/builtin/packages/libceed/package.py
@@ -6,11 +6,11 @@
from spack import *
-class Libceed(Package, CudaPackage, ROCmPackage):
+class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
"""The CEED API Library: Code for Efficient Extensible Discretizations."""
homepage = "https://github.com/CEED/libCEED"
- git = "https://github.com/CEED/libCEED.git"
+ git = "https://github.com/CEED/libCEED.git"
maintainers = ['jedbrown', 'v-dobrev', 'tzanio']
@@ -25,24 +25,23 @@ class Libceed(Package, CudaPackage, ROCmPackage):
variant('occa', default=False, description='Enable OCCA backends')
variant('debug', default=False, description='Enable debug build')
- variant('libxsmm', default=False, description='Enable LIBXSMM backend')
- variant('magma', default=False, description='Enable MAGMA backend')
+ variant('libxsmm', default=False, description='Enable LIBXSMM backend', when='@0.3:')
+ variant('magma', default=False, description='Enable MAGMA backend', when='@0.6:')
- conflicts('+libxsmm', when='@:0.2')
- conflicts('+magma', when='@:0.5')
conflicts('+rocm', when='@:0.6')
- depends_on('cuda', when='+cuda')
- depends_on('hip@3.8.0', when='@0.7:0.7.99+rocm')
- depends_on('hip@3.8.0:', when='@0.8:+rocm')
- depends_on('hipblas@3.8.0:', when='@0.8:+rocm')
+ with when('+rocm'):
+ depends_on('hip@3.8.0', when='@0.7:0.7.99')
+ depends_on('hip@3.8.0:', when='@0.8:')
+ depends_on('hipblas@3.8.0:', when='@0.8:')
- depends_on('occa@develop', when='@develop+occa')
- depends_on('occa@1.1.0', when='@0.7:+occa')
- depends_on('occa@1.0.8:', when='@0.4+occa')
- depends_on('occa@1.0.0-alpha.5,develop', when='@:0.2+occa')
- depends_on('occa+cuda', when='+occa+cuda')
- depends_on('occa~cuda', when='+occa~cuda')
+ with when('+occa'):
+ depends_on('occa@develop', when='@develop')
+ depends_on('occa@1.1.0', when='@0.7:')
+ depends_on('occa@1.0.8:', when='@0.4')
+ depends_on('occa@1.0.0-alpha.5,develop', when='@:0.2')
+ depends_on('occa+cuda', when='+cuda')
+ depends_on('occa~cuda', when='~cuda')
depends_on('libxsmm', when='+libxsmm')
@@ -56,8 +55,6 @@ class Libceed(Package, CudaPackage, ROCmPackage):
# bug in Occa.
patch('occaFree-0.2.diff', when='@0.2')
- phases = ['build', 'install']
-
@property
def common_make_opts(self):
spec = self.spec
@@ -129,18 +126,19 @@ class Libceed(Package, CudaPackage, ROCmPackage):
return makeopts
- def build(self, spec, prefix):
- makeopts = self.common_make_opts
- make('info', *makeopts)
- make(*makeopts)
+ def edit(self, spec, prefix):
+ make('info', *self.common_make_opts)
- if self.run_tests:
- make('prove', *makeopts, parallel=False)
+ @property
+ def build_targets(self):
+ return self.common_make_opts
- def install(self, spec, prefix):
- installopts = ['prefix=%s' % prefix]
- installopts += self.common_make_opts
- make('install', *installopts, parallel=False)
+ @property
+ def install_targets(self):
+ return ['prefix={0}'.format(self.prefix)] + self.common_make_opts
+
+ def check(self):
+ make('prove', *self.common_make_opts, parallel=False)
@when('@0.1')
def install(self, spec, prefix):