scorpio: fix build on macOS with Apple Clang 12 or greater (#29977)

This commit is contained in:
Peter Brady 2022-04-11 02:10:47 -06:00 committed by GitHub
parent 7385ea5f01
commit f229f746db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,3 +27,10 @@ class Scorpio(CMakePackage):
depends_on('cmake@3.16:', type='build') depends_on('cmake@3.16:', type='build')
depends_on('mpi') depends_on('mpi')
depends_on('hdf5@1.10.6: +hl +mpi') depends_on('hdf5@1.10.6: +hl +mpi')
def cmake_args(self):
opts = []
if self.spec.satisfies('%apple-clang@12:'):
opts.append(self.define("CMAKE_C_FLAGS",
"-Wno-error=implicit-function-declaration"))
return opts