[mpas-model] Only add options for double precision when requested (#43547)

As in the original makefile "FFLAGS_PROMOTION = -fdefault-real-8
-fdefault-double-8" is only used when `precision=double`. This is the default
for the Spack package, so no change if `precision` is left unset.
This commit is contained in:
Stephen Sachs 2024-04-09 18:56:48 +02:00 committed by GitHub
parent fb6741cf85
commit 4c9816f10c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,15 +104,9 @@ def target(self, model, action):
fflags = [self.compiler.openmp_flag]
cppflags = ["-D_MPI"]
if satisfies("%gcc"):
fflags.extend(
[
"-ffree-line-length-none",
"-fconvert=big-endian",
"-ffree-form",
"-fdefault-real-8",
"-fdefault-double-8",
]
)
fflags.extend(["-ffree-line-length-none", "-fconvert=big-endian", "-ffree-form"])
if satisfies("precision=double"):
fflags.extend(["-fdefault-real-8", "-fdefault-double-8"])
cppflags.append("-DUNDERSCORE")
elif satisfies("%fj"):
fflags.extend(["-Free", "-Fwide", "-CcdRR8"])