diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-22 00:33:34 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-22 00:33:34 -0700 |
commit | 3f32dd767edf43a933948a14dfc0e5cc81f92226 (patch) | |
tree | 230950e605b9e5b66b75bb6c0f40106fd15d7c16 /var | |
parent | b1516f64eb75c108eded1e9ee7e0480a4552236a (diff) | |
parent | 7b283bfaffa5509915d91392878203bba8a8d2cb (diff) | |
download | spack-3f32dd767edf43a933948a14dfc0e5cc81f92226.tar.gz spack-3f32dd767edf43a933948a14dfc0e5cc81f92226.tar.bz2 spack-3f32dd767edf43a933948a14dfc0e5cc81f92226.tar.xz spack-3f32dd767edf43a933948a14dfc0e5cc81f92226.zip |
Merge pull request #589 from davydden/petsc_osx
fix petsc on osx
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/petsc/package.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index efe172fc08..7239baaf7f 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -61,14 +61,24 @@ class Petsc(Package): errors = ['incompatible variants given'] + errors raise RuntimeError('\n'.join(errors)) else: - compiler_opts = [ - '--with-mpi=1', - '--with-mpi-dir=%s' % self.spec['mpi'].prefix, - ] + if self.compiler.name == "clang": + compiler_opts = [ + '--with-mpi=1', + '--with-cc=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # Avoid confusing PETSc config by clang: warning: argument unused during compilation + '--with-cxx=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + '--with-fc=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + '--with-f77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), + ] + else: + compiler_opts = [ + '--with-mpi=1', + '--with-mpi-dir=%s' % self.spec['mpi'].prefix, + ] return compiler_opts def install(self, spec, prefix): - options = [] + options = ['--with-debugging=0', + '--with-ssl=0'] options.extend(self.mpi_dependent_options()) options.extend([ '--with-precision=%s' % ('double' if '+double' in spec else 'single'), |