openblas : fix install_name on macos (#45606)

This commit is contained in:
Chris Marsh 2024-08-08 07:50:30 -06:00 committed by GitHub
parent 9464898449
commit 6f8d8ba47e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -590,7 +590,12 @@ def check_install(self):
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
cmake_defs = [self.define("TARGET", "GENERIC")]
cmake_defs = [
self.define("TARGET", "GENERIC"),
# ensure MACOSX_RPATH is set
self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"),
]
if self.spec.satisfies("+dynamic_dispatch"):
cmake_defs += [self.define("DYNAMIC_ARCH", "ON")]
if self.spec.satisfies("platform=windows"):