wrf: Fix patching of config file when using GCC for v3.9.1.1 (#35140)
The regex doesn't actually work because dollar signs and parentheses have to be escaped. Also, compiling with OpenMPI requires defining the macro `MPI2SUPPORT`.
This commit is contained in:
parent
84917cfa79
commit
eeba92e788
@ -287,10 +287,16 @@ def do_configure_fixup(self):
|
||||
config = FileFilter(join_path("arch", "configure.defaults"))
|
||||
|
||||
if self.spec.satisfies("@3.9.1.1 %gcc"):
|
||||
# Compiling with OpenMPI requires using `-DMPI2SUPPORT`.
|
||||
other_flags = " -DMPI2SUPPORT" if self.spec.satisfies("^openmpi") else ""
|
||||
config.filter(
|
||||
"^DM_FC.*mpif90 -f90=$(SFC)", "DM_FC = {0}".format(self.spec["mpi"].mpifc)
|
||||
r"^DM_FC.*mpif90 -f90=\$\(SFC\)",
|
||||
"DM_FC = {0}".format(self.spec["mpi"].mpifc) + other_flags,
|
||||
)
|
||||
config.filter(
|
||||
r"^DM_CC.*mpicc -cc=\$\(SCC\)",
|
||||
"DM_CC = {0}".format(self.spec["mpi"].mpicc) + other_flags,
|
||||
)
|
||||
config.filter("^DM_CC.*mpicc -cc=$(SCC)", "DM_CC = {0}".format(self.spec["mpi"].mpicc))
|
||||
|
||||
if self.spec.satisfies("%aocc"):
|
||||
config.filter(
|
||||
|
Loading…
Reference in New Issue
Block a user