chaco: fix build on macOS with Apple Clang 12 or greater (#29975)

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

View File

@ -22,6 +22,8 @@ class Chaco(CMakePackage):
depends_on('cmake@3.16:', type='build')
def cmake_args(self):
return [
self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
]
opts = [self.define_from_variant('BUILD_SHARED_LIBS', 'shared')]
if self.spec.satisfies('%apple-clang@12:'):
opts.append(self.define("CMAKE_C_FLAGS",
"-Wno-error=implicit-function-declaration"))
return opts