fms: add 32bit variant, add protections (#35010)
The GEOS Earth System Model currently requires the 32-bit variant of FMS. This PR adds that variant.
This commit is contained in:
parent
c3e3c392a6
commit
cc01e33d53
1 changed files with 13 additions and 7 deletions
|
@ -43,15 +43,20 @@ class Fms(CMakePackage):
|
|||
version(
|
||||
"2020.04.01", sha256="2c409242de7dea0cf29f8dbf7495698b6bcac1eeb5c4599a728bdea172ffe37c"
|
||||
)
|
||||
version(
|
||||
"2019.01.03", sha256="60a5181e883e141f2fdd4a30c535a788d609bcbbbca4af7e1ec73f66f4e58dc0"
|
||||
)
|
||||
|
||||
variant(
|
||||
"64bit",
|
||||
default=True,
|
||||
description="Build a version of the library with default 64 bit reals",
|
||||
"precision",
|
||||
values=("32", "64"),
|
||||
description="Build a version of the library with default 32 or 64 bit reals or both",
|
||||
default="32",
|
||||
multi=True,
|
||||
)
|
||||
conflicts(
|
||||
"precision=32,64",
|
||||
when="@:2022.03",
|
||||
msg="FMS versions prior to 2022.04 do not support both 32 and 64 bit precision",
|
||||
)
|
||||
|
||||
variant("gfs_phys", default=True, description="Use GFS Physics")
|
||||
variant("openmp", default=True, description="Use OpenMP")
|
||||
variant("quad_precision", default=True, description="quad precision reals")
|
||||
|
@ -80,13 +85,14 @@ class Fms(CMakePackage):
|
|||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("64BIT"),
|
||||
self.define_from_variant("GFS_PHYS"),
|
||||
self.define_from_variant("OPENMP"),
|
||||
self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"),
|
||||
self.define_from_variant("WITH_YAML", "yaml"),
|
||||
self.define_from_variant("CONSTANTS"),
|
||||
self.define_from_variant("FPIC"),
|
||||
self.define("32BIT", "precision=32" in self.spec),
|
||||
self.define("64BIT", "precision=64" in self.spec),
|
||||
]
|
||||
|
||||
args.append(self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc))
|
||||
|
|
Loading…
Reference in a new issue