require fortran for MPI providers to avoid delayed compiler errors (#1937)

* openmpi: require fortran for now

* mpich: requre fortran for now

* mvapich2: require fortran for now

* openmpi: flake8 fixes
This commit is contained in:
Denis Davydov
2016-10-26 18:12:26 +02:00
committed by Todd Gamblin
parent 92f17eeba7
commit 46433b9eb3
3 changed files with 21 additions and 18 deletions

View File

@@ -82,6 +82,13 @@ def setup_dependent_package(self, module, dep_spec):
]
def install(self, spec, prefix):
# Until we can pass variants such as +fortran through virtual
# dependencies depends_on('mpi'), require Fortran compiler to
# avoid delayed build errors in dependents.
if (self.compiler.f77 is None) or (self.compiler.fc is None):
raise InstallError('Mpich requires both C and Fortran ',
'compilers!')
config_args = [
'--prefix={0}'.format(prefix),
'--enable-shared',