fms: add two variants (#43734)

* fms: add two variants supporting existing build options.
* Style fixes.
This commit is contained in:
Micael Oliveira 2024-04-20 03:51:58 +10:00 committed by GitHub
parent 74640987c7
commit 26515b8871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,6 +85,12 @@ class Fms(CMakePackage):
description="Compiles with support for deprecated io modules fms_io and mpp_io", description="Compiles with support for deprecated io modules fms_io and mpp_io",
when="@2023.02:", when="@2023.02:",
) )
variant("large_file", default=False, description="Enable compiler definition -Duse_LARGEFILE.")
variant(
"internal_file_nml",
default=True,
description="Enable compiler definition -DINTERNAL_FILE_NML.",
)
depends_on("netcdf-c") depends_on("netcdf-c")
depends_on("netcdf-fortran") depends_on("netcdf-fortran")
@ -98,6 +104,8 @@ def cmake_args(self):
self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"), self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"),
self.define_from_variant("WITH_YAML", "yaml"), self.define_from_variant("WITH_YAML", "yaml"),
self.define_from_variant("CONSTANTS"), self.define_from_variant("CONSTANTS"),
self.define_from_variant("LARGEFILE", "large_file"),
self.define_from_variant("INTERNAL_FILE_NML"),
self.define("32BIT", "precision=32" in self.spec), self.define("32BIT", "precision=32" in self.spec),
self.define("64BIT", "precision=64" in self.spec), self.define("64BIT", "precision=64" in self.spec),
self.define_from_variant("FPIC", "pic"), self.define_from_variant("FPIC", "pic"),