Skip to content

Commit

Permalink
Config for Mac Sonoma 14.6.1 with Command Line Tools 15.3 (#471)
Browse files Browse the repository at this point in the history
This PR adds in the necessary configuration to get the latest MacOS and Command Line Tools versions working (14.6.1 and 15.3 respectively).

This PR includes a patch for FMS 2024.02 and a variant spec that builds shared (dylib) libraries. This makes it unnecessary to do the manual FMS build workaround that was recently published. The FMS patch is only needed for version 2024.02 in that the next version (2024.03) contains the update to the CMakeLists.txt file that adds in the shared library option.

---------

Co-authored-by: Dom Heinzeller <[email protected]>
  • Loading branch information
srherbener and climbfuji authored Sep 10, 2024
1 parent 78e0c1d commit 1b3e3e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions var/spack/repos/builtin/packages/fms/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ class Fms(CMakePackage):
when="@2023.03",
)

variant("shared", description="Build shared libraries", when="@2024.02:", default=False)
# What the following patch is providing is available in version 2024.03
# and newer so it is only needed to 2024.02
patch(
"https://github.com/NOAA-GFDL/fms/pull/1559.patch?full_index=1",
sha256="2b12a6c35f357c3dddcfa5282576e56ab0e8e6c1ad1dab92a2c85ce3dfb815d4",
when="@2024.02",
)

variant(
"precision",
values=("32", "64"),
Expand Down Expand Up @@ -119,6 +128,7 @@ def cmake_args(self):
self.define_from_variant("GFS_PHYS"),
self.define_from_variant("OPENMP"),
self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"),
self.define_from_variant("SHARED_LIBS", "shared"),
self.define_from_variant("WITH_YAML", "yaml"),
self.define_from_variant("CONSTANTS"),
self.define_from_variant("LARGEFILE", "large_file"),
Expand Down
2 changes: 1 addition & 1 deletion var/spack/repos/builtin/packages/py-netcdf4/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PyNetcdf4(PythonPackage):

def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi"):
if self.spec.satisfies("%oneapi") or self.spec.satisfies("%apple-clang@15:"):
flags.append("-Wno-error=int-conversion")

return flags, None, None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ class PyRuamelYamlClib(PythonPackage):

def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi"):
if self.spec.satisfies("%oneapi") or self.spec.satisfies(" %apple-clang@15:"):
flags.append("-Wno-error=incompatible-function-pointer-types")
return (flags, None, None)

0 comments on commit 1b3e3e5

Please sign in to comment.