summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriarspider <iarspider@gmail.com>2021-09-20 21:53:54 +0200
committerGitHub <noreply@github.com>2021-09-20 13:53:54 -0600
commitf3d2f62468fdf96c4917e7fa1f608e966ffad001 (patch)
tree41fd85b7f99b48f5f7a14603cb3c570e0c8059e0
parent65f285831ececa93da798ee5353b7d84ec728eed (diff)
downloadspack-f3d2f62468fdf96c4917e7fa1f608e966ffad001.tar.gz
spack-f3d2f62468fdf96c4917e7fa1f608e966ffad001.tar.bz2
spack-f3d2f62468fdf96c4917e7fa1f608e966ffad001.tar.xz
spack-f3d2f62468fdf96c4917e7fa1f608e966ffad001.zip
Add variants to FORM recipe (#25963)
-rw-r--r--var/spack/repos/builtin/packages/form/package.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/form/package.py b/var/spack/repos/builtin/packages/form/package.py
index 26feb6d636..ae698f222d 100644
--- a/var/spack/repos/builtin/packages/form/package.py
+++ b/var/spack/repos/builtin/packages/form/package.py
@@ -19,10 +19,22 @@ class Form(AutotoolsPackage):
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
- depends_on('gmp', type='link')
- depends_on('zlib', type='link')
+ depends_on('gmp', type='link', when='+zlib')
+ depends_on('zlib', type='link', when='+gmp')
+ depends_on('mpi', type='link', when='+parform')
+
+ variant('gmp', default=False, description='Use GMP for long integer arithmetic')
+ variant('zlib', default=False, description='Use zlib for compression')
+ variant('scalar', default=True, description='Build scalar version (form)')
+ variant('threaded', default=True, description='Build threaded version (tform)')
+ variant('parform', default=False, description='Build parallel version using MPI (parform)')
def configure_args(self):
- args = ['--with-gmp=' + self.spec['gmp'].prefix,
- '--with-zlib=' + self.spec['zlib'].prefix]
+ args = []
+ args += self.with_or_without('gmp', self.spec['gmp'].prefix)
+ args += self.with_or_without('zlib', self.spec['zlib'].prefix)
+ args += self.enable_or_disable('scalar')
+ args += self.enable_or_disable('threaded')
+ args += self.enable_or_disable('parform')
+
return args