pfunit: update (#7994)
This commit is contained in:
parent
28adaa4e55
commit
ffcf3ef2c8
1 changed files with 15 additions and 12 deletions
|
@ -32,18 +32,19 @@ class Pfunit(CMakePackage):
|
||||||
serial and MPI-parallel software written in Fortran."""
|
serial and MPI-parallel software written in Fortran."""
|
||||||
|
|
||||||
homepage = "http://pfunit.sourceforge.net/"
|
homepage = "http://pfunit.sourceforge.net/"
|
||||||
url = "https://downloads.sourceforge.net/project/pfunit/Source/pFUnit.tar.gz"
|
url = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit/archive/3.2.9.tar.gz"
|
||||||
giturl = "https://git.code.sf.net/p/pfunit/code"
|
|
||||||
|
|
||||||
version('3.2.9', git=giturl,
|
maintainers = ['citibeth']
|
||||||
commit='3c1d47f594a7e756f21be59074cb730d1a1e9a79')
|
|
||||||
version('develop', git=giturl, branch='master')
|
|
||||||
|
|
||||||
|
version('3.2.9', 'e13d8362284b13b7c863e2fe769a9d5c')
|
||||||
|
|
||||||
|
variant('shared', default=True,
|
||||||
|
description='Build shared library in addition to static')
|
||||||
variant('mpi', default=False, description='Enable MPI')
|
variant('mpi', default=False, description='Enable MPI')
|
||||||
variant('openmp', default=False, description='Enable OpenMP')
|
variant('openmp', default=False, description='Enable OpenMP')
|
||||||
|
variant('docs', default=False, description='Build docs')
|
||||||
|
|
||||||
depends_on('python', type=('build', 'run'))
|
depends_on('python@2.7:', type=('build', 'run')) # python3 too!
|
||||||
depends_on('py-unittest2', type=('run'))
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
|
@ -54,16 +55,18 @@ def patch(self):
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
args = ['-DCMAKE_Fortran_MODULE_DIRECTORY=%s' % spec.prefix.include]
|
args = [
|
||||||
|
'-DPYTHON_EXECUTABLE=%s' % spec['python'].command,
|
||||||
|
'-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')]
|
||||||
|
|
||||||
if spec.satisfies('+mpi'):
|
if spec.satisfies('+mpi'):
|
||||||
args.extend(['-DMPI=YES', '-DMPI_USE_MPIEXEC=YES',
|
args.extend(['-DMPI=YES', '-DMPI_USE_MPIEXEC=YES',
|
||||||
'-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc])
|
'-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc])
|
||||||
else:
|
else:
|
||||||
args.append('-DMPI=NO')
|
args.append('-DMPI=NO')
|
||||||
if spec.satisfies('+openmp'):
|
|
||||||
args.append('-DOPENMP=YES')
|
|
||||||
else:
|
|
||||||
args.append('-DOPENMP=NO')
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
|
|
Loading…
Reference in a new issue