summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Salmond <js947@users.noreply.github.com>2020-04-28 16:52:39 +0100
committerGitHub <noreply@github.com>2020-04-28 10:52:39 -0500
commit4aed5daeba171ebc84ade61522808cc45e45a8b8 (patch)
tree2bcf50ef2593dab29c3fe1c96e70685a08da7a8a
parent27b7d4bd210e9c97f85cb81e4167a365129177af (diff)
downloadspack-4aed5daeba171ebc84ade61522808cc45e45a8b8.tar.gz
spack-4aed5daeba171ebc84ade61522808cc45e45a8b8.tar.bz2
spack-4aed5daeba171ebc84ade61522808cc45e45a8b8.tar.xz
spack-4aed5daeba171ebc84ade61522808cc45e45a8b8.zip
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
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index cccced63a0..df1b6e1780 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -300,13 +300,15 @@ class Petsc(Package):
'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: