summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/pfunit/package.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/pfunit/package.py b/var/spack/repos/builtin/packages/pfunit/package.py
index 30704ac62e..ab6bc53d2c 100644
--- a/var/spack/repos/builtin/packages/pfunit/package.py
+++ b/var/spack/repos/builtin/packages/pfunit/package.py
@@ -30,10 +30,14 @@ class Pfunit(CMakePackage):
variant('shared', default=True,
description='Build shared library in addition to static')
variant('mpi', default=False, description='Enable MPI')
- variant('use_comm_world', default=False, description='Enable MPI_COMM_WORLD for testing')
+ variant('use_comm_world', default=False,
+ description='Enable MPI_COMM_WORLD for testing')
variant('openmp', default=False, description='Enable OpenMP')
variant('docs', default=False, description='Build docs')
+ variant('max_array_rank', values=int, default=5,
+ description='Max number of Fortran dimensions of array asserts')
+
depends_on('python@2.7:', type=('build', 'run')) # python3 too!
depends_on('mpi', when='+mpi')
@@ -53,7 +57,8 @@ class Pfunit(CMakePackage):
'-DBUILD_SHARED=%s' % ('YES' if '+shared' in spec else 'NO'),
'-DCMAKE_Fortran_MODULE_DIRECTORY=%s' % spec.prefix.include,
'-DBUILD_DOCS=%s' % ('YES' if '+docs' in spec else 'NO'),
- '-DOPENMP=%s' % ('YES' if '+openmp' in spec else 'NO')]
+ '-DOPENMP=%s' % ('YES' if '+openmp' in spec else 'NO'),
+ '-DMAX_RANK=%s' % spec.variants['max_array_rank'].value]
if spec.satisfies('+mpi'):
args.extend(['-DMPI=YES', '-DMPI_USE_MPIEXEC=YES',