pfunit: update (#7994)

This commit is contained in:
Elizabeth Fischer 2018-05-03 18:02:20 -04:00 committed by Adam J. Stewart
parent 28adaa4e55
commit ffcf3ef2c8

View file

@ -32,18 +32,19 @@ class Pfunit(CMakePackage):
serial and MPI-parallel software written in Fortran."""
homepage = "http://pfunit.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/pfunit/Source/pFUnit.tar.gz"
giturl = "https://git.code.sf.net/p/pfunit/code"
url = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit/archive/3.2.9.tar.gz"
version('3.2.9', git=giturl,
commit='3c1d47f594a7e756f21be59074cb730d1a1e9a79')
version('develop', git=giturl, branch='master')
maintainers = ['citibeth']
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('openmp', default=False, description='Enable OpenMP')
variant('docs', default=False, description='Build docs')
depends_on('python', type=('build', 'run'))
depends_on('py-unittest2', type=('run'))
depends_on('python@2.7:', type=('build', 'run')) # python3 too!
depends_on('mpi', when='+mpi')
def patch(self):
@ -54,16 +55,18 @@ def patch(self):
def cmake_args(self):
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'):
args.extend(['-DMPI=YES', '-DMPI_USE_MPIEXEC=YES',
'-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc])
else:
args.append('-DMPI=NO')
if spec.satisfies('+openmp'):
args.append('-DOPENMP=YES')
else:
args.append('-DOPENMP=NO')
return args
def check(self):