Add +x variant to petsc. (#9830)

* 	modified:   var/spack/repos/builtin/packages/petsc/package.py

* Update package.py

* Update package.py

* Update package.py

* Update package.py
This commit is contained in:
Sajid Ali 2018-11-17 21:35:37 -06:00 committed by Adam J. Stewart
parent 93879e575d
commit c45080398c

View File

@ -80,6 +80,9 @@ class Petsc(Package):
variant('suite-sparse', default=False, variant('suite-sparse', default=False,
description='Activates support for SuiteSparse') description='Activates support for SuiteSparse')
variant('X', default=False,
description='Activate X support')
# 3.8.0 has a build issue with MKL - so list this conflict explicitly # 3.8.0 has a build issue with MKL - so list this conflict explicitly
conflicts('^intel-mkl', when='@3.8.0') conflicts('^intel-mkl', when='@3.8.0')
@ -146,6 +149,7 @@ class Petsc(Package):
depends_on('trilinos@xsdk-0.2.0', when='@xsdk-0.2.0+trilinos+mpi') depends_on('trilinos@xsdk-0.2.0', when='@xsdk-0.2.0+trilinos+mpi')
depends_on('trilinos@develop', when='@xdevelop+trilinos+mpi') depends_on('trilinos@develop', when='@xdevelop+trilinos+mpi')
depends_on('suite-sparse', when='+suite-sparse') depends_on('suite-sparse', when='+suite-sparse')
depends_on('libx11', when='+X')
def mpi_dependent_options(self): def mpi_dependent_options(self):
if '~mpi' in self.spec: if '~mpi' in self.spec:
@ -183,7 +187,6 @@ def mpi_dependent_options(self):
def install(self, spec, prefix): def install(self, spec, prefix):
options = ['--with-ssl=0', options = ['--with-ssl=0',
'--with-x=0',
'--download-c2html=0', '--download-c2html=0',
'--download-sowing=0', '--download-sowing=0',
'--download-hwloc=0', '--download-hwloc=0',
@ -210,6 +213,11 @@ def install(self, spec, prefix):
'--with-blas-lapack-lib=%s' % lapack_blas.joined() '--with-blas-lapack-lib=%s' % lapack_blas.joined()
]) ])
if '+X' in spec:
options.append('--with-x=1')
else:
options.append('--with-x=0')
if 'trilinos' in spec: if 'trilinos' in spec:
options.append('--with-cxx-dialect=C++11') options.append('--with-cxx-dialect=C++11')
if spec.satisfies('^trilinos+boost'): if spec.satisfies('^trilinos+boost'):