pumi and zoltan: allow building when no fortran compiler is available (#35333)
This commit is contained in:
parent
75a72766ff
commit
e08da4e2b6
2 changed files with 4 additions and 2 deletions
|
@ -84,7 +84,6 @@ def cmake_args(self):
|
|||
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
|
||||
"-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
"-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc,
|
||||
self.define_from_variant("PUMI_FORTRAN_INTERFACE", "fortran"),
|
||||
"-DMDS_ID_TYPE=%s" % ("long" if "+int64" in spec else "int"),
|
||||
"-DSKIP_SIMMETRIX_VERSION_CHECK=%s"
|
||||
|
@ -92,6 +91,8 @@ def cmake_args(self):
|
|||
self.define_from_variant("IS_TESTING", "testing"),
|
||||
"-DMESHES=%s" % join_path(self.stage.source_path, "pumi-meshes"),
|
||||
]
|
||||
if spec.satisfies("fortran"):
|
||||
args += ["-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc]
|
||||
if spec.satisfies("@2.2.3"):
|
||||
args += ["-DCMAKE_CXX_STANDARD=11"]
|
||||
if self.spec.satisfies("simmodsuite=base"):
|
||||
|
|
|
@ -132,7 +132,6 @@ def configure_args(self):
|
|||
[
|
||||
"CC={0}".format(spec["mpi"].mpicc),
|
||||
"CXX={0}".format(spec["mpi"].mpicxx),
|
||||
"FC={0}".format(spec["mpi"].mpifc),
|
||||
"--with-mpi={0}".format(spec["mpi"].prefix),
|
||||
# NOTE: Zoltan assumes that it's linking against an MPI library
|
||||
# that can be found with '-lmpi' which isn't the case for many
|
||||
|
@ -142,6 +141,8 @@ def configure_args(self):
|
|||
"--with-mpi-libs= ",
|
||||
]
|
||||
)
|
||||
if "+fortran" in spec:
|
||||
config_args.extend(["FC={0}".format(spec["mpi"].mpifc)])
|
||||
|
||||
config_fcflags = config_cflags[:]
|
||||
if spec.satisfies("%gcc@10:+fortran"):
|
||||
|
|
Loading…
Reference in a new issue