From 4aed5daeba171ebc84ade61522808cc45e45a8b8 Mon Sep 17 00:00:00 2001 From: Jeffrey Salmond Date: Tue, 28 Apr 2020 16:52:39 +0100 Subject: 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 --- var/spack/repos/builtin/packages/petsc/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'var') 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: -- cgit v1.2.3-70-g09d2