summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 838369f4e4..bdc3d30c92 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -83,6 +83,9 @@ class Petsc(Package):
description='Activates support for Trilinos (only parallel)')
variant('int64', default=False,
description='Compile with 64bit indices')
+ variant('clanguage', default='C', values=('C', 'C++'),
+ description='Specify C (recommended) or C++ to compile PETSc',
+ multi=False)
# 3.8.0 has a build issue with MKL - so list this conflict explicitly
conflicts('^intel-mkl', when='@3.8.0')
@@ -199,6 +202,11 @@ class Petsc(Package):
if 'trilinos' in spec:
options.append('--with-cxx-dialect=C++11')
+ if self.spec.satisfies('clanguage=C++'):
+ options.append('--with-clanguage=C++')
+ else:
+ options.append('--with-clanguage=C')
+
# Help PETSc pick up Scalapack from MKL:
if 'scalapack' in spec:
scalapack = spec['scalapack'].libs