Make PETSc build on Darwin (#1835)
Don't set cpp when building on Darwin.
This commit is contained in:
parent
3282eaea8d
commit
88af9f783d
@ -22,7 +22,9 @@
|
|||||||
# License along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
@ -90,8 +92,6 @@ class Petsc(Package):
|
|||||||
def mpi_dependent_options(self):
|
def mpi_dependent_options(self):
|
||||||
if '~mpi' in self.spec:
|
if '~mpi' in self.spec:
|
||||||
compiler_opts = [
|
compiler_opts = [
|
||||||
'--with-cpp=cpp',
|
|
||||||
'--with-cxxcpp=cpp',
|
|
||||||
'--with-cc=%s' % os.environ['CC'],
|
'--with-cc=%s' % os.environ['CC'],
|
||||||
'--with-cxx=%s' % (os.environ['CXX']
|
'--with-cxx=%s' % (os.environ['CXX']
|
||||||
if self.compiler.cxx is not None else '0'),
|
if self.compiler.cxx is not None else '0'),
|
||||||
@ -113,11 +113,14 @@ def mpi_dependent_options(self):
|
|||||||
raise RuntimeError('\n'.join(errors))
|
raise RuntimeError('\n'.join(errors))
|
||||||
else:
|
else:
|
||||||
compiler_opts = [
|
compiler_opts = [
|
||||||
'--with-cpp=cpp',
|
|
||||||
'--with-cxxcpp=cpp',
|
|
||||||
'--with-mpi=1',
|
'--with-mpi=1',
|
||||||
'--with-mpi-dir=%s' % self.spec['mpi'].prefix,
|
'--with-mpi-dir=%s' % self.spec['mpi'].prefix,
|
||||||
]
|
]
|
||||||
|
if sys.platform != "darwin":
|
||||||
|
compiler_opts.extend([
|
||||||
|
'--with-cpp=cpp',
|
||||||
|
'--with-cxxcpp=cpp',
|
||||||
|
])
|
||||||
return compiler_opts
|
return compiler_opts
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
Loading…
Reference in New Issue
Block a user