diff options
author | Stephen Sachs <stesachs@amazon.com> | 2024-04-09 18:56:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 09:56:48 -0700 |
commit | 4c9816f10c4a266a5924f149c169afcf12599a45 (patch) | |
tree | d9bf0fe0d432a867437c1de847860b51613b1344 /var | |
parent | fb6741cf859424bb6e7c0973ea8e47e390ecad12 (diff) | |
download | spack-4c9816f10c4a266a5924f149c169afcf12599a45.tar.gz spack-4c9816f10c4a266a5924f149c169afcf12599a45.tar.bz2 spack-4c9816f10c4a266a5924f149c169afcf12599a45.tar.xz spack-4c9816f10c4a266a5924f149c169afcf12599a45.zip |
[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.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mpas-model/package.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/mpas-model/package.py b/var/spack/repos/builtin/packages/mpas-model/package.py index 2e4a0e6a26..3acd79366b 100644 --- a/var/spack/repos/builtin/packages/mpas-model/package.py +++ b/var/spack/repos/builtin/packages/mpas-model/package.py @@ -104,15 +104,9 @@ class MpasModel(MakefilePackage): 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"]) |