PETSc: Explicitly point to cpp when configuring (#1807)

I encountered an HPC system where PETSc's configure stage does not find a valid `cpp` (C preprocessor). Explicitly pointing to Spack's `cpp` wrapper resolves the problem.
This commit is contained in:
Erik Schnetter 2016-09-20 13:05:57 -04:00 committed by Todd Gamblin
parent f180d748be
commit 00bac8f294

View File

@ -90,6 +90,8 @@ class Petsc(Package):
def mpi_dependent_options(self):
if '~mpi' in self.spec:
compiler_opts = [
'--with-cpp=cpp',
'--with-cxxcpp=cpp',
'--with-cc=%s' % os.environ['CC'],
'--with-cxx=%s' % (os.environ['CXX']
if self.compiler.cxx is not None else '0'),
@ -111,6 +113,8 @@ def mpi_dependent_options(self):
raise RuntimeError('\n'.join(errors))
else:
compiler_opts = [
'--with-cpp=cpp',
'--with-cxxcpp=cpp',
'--with-mpi=1',
'--with-mpi-dir=%s' % self.spec['mpi'].prefix,
]