hdf5: fix build error on Apple Clang 15 (#42264)

This commit is contained in:
Matthew Thompson 2024-01-26 12:18:57 -05:00 committed by GitHub
parent 42de252c12
commit 02605d577b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -293,9 +293,13 @@ def flag_handler(self, name, flags):
cmake_flags.append(self.compiler.cc_pic_flag) cmake_flags.append(self.compiler.cc_pic_flag)
if spec.satisfies("@1.8.21 %oneapi@2023.0.0"): if spec.satisfies("@1.8.21 %oneapi@2023.0.0"):
cmake_flags.append("-Wno-error=int-conversion") cmake_flags.append("-Wno-error=int-conversion")
if spec.satisfies("%apple-clang@15:"):
cmake_flags.append("-Wl,-ld_classic")
elif name == "cxxflags": elif name == "cxxflags":
if spec.satisfies("@:1.8.12+cxx~shared"): if spec.satisfies("@:1.8.12+cxx~shared"):
cmake_flags.append(self.compiler.cxx_pic_flag) cmake_flags.append(self.compiler.cxx_pic_flag)
if spec.satisfies("%apple-clang@15:"):
cmake_flags.append("-Wl,-ld_classic")
elif name == "fflags": elif name == "fflags":
if spec.satisfies("%cce+fortran"): if spec.satisfies("%cce+fortran"):
# Cray compiler generates module files with uppercase names by # Cray compiler generates module files with uppercase names by