summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 99800b5011..81cf908891 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -195,10 +195,7 @@ class Petsc(Package):
'--download-hwloc=0',
'CFLAGS=%s' % ' '.join(spec.compiler_flags['cflags']),
'FFLAGS=%s' % ' '.join(spec.compiler_flags['fflags']),
- 'CXXFLAGS=%s' % ' '.join(spec.compiler_flags['cxxflags']),
- 'COPTFLAGS=',
- 'FOPTFLAGS=',
- 'CXXOPTFLAGS=']
+ 'CXXFLAGS=%s' % ' '.join(spec.compiler_flags['cxxflags'])]
options.extend(self.mpi_dependent_options())
options.extend([
'--with-precision=%s' % (
@@ -209,6 +206,11 @@ class Petsc(Package):
'--with-debugging=%s' % ('1' if '+debug' in spec else '0'),
'--with-64-bit-indices=%s' % ('1' if '+int64' in spec else '0')
])
+ if '+debug' not in spec:
+ options.extend(['COPTFLAGS=',
+ 'FOPTFLAGS=',
+ 'CXXOPTFLAGS='])
+
# Make sure we use exactly the same Blas/Lapack libraries
# across the DAG. To that end list them explicitly
lapack_blas = spec['lapack'].libs + spec['blas'].libs