adjust petsc to build cuda only when requested explicitly (#16275)

* adjust petsc+cuda to build cuda only when requested explicitly

* activate petsc library support only when explicitly requested

* flake8 fixes
This commit is contained in:
Jeffrey Salmond 2020-04-28 16:52:39 +01:00 committed by GitHub
parent 27b7d4bd21
commit 4aed5daeba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,13 +300,15 @@ def install(self, spec, prefix):
'mumps', 'trilinos', 'fftw', 'valgrind'):
options.append(
'--with-{library}={value}'.format(
library=library, value=('1' if library in spec else '0'))
library=library,
value=('1' if '+' + library in spec else '0'))
)
if library in spec:
if '+' + library in spec:
options.append(
'--with-{library}-dir={path}'.format(
library=library, path=spec[library].prefix)
)
# PETSc does not pick up SuperluDist from the dir as they look for
# superlu_dist_4.1.a
if 'superlu-dist' in spec: