Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions mesonbuild/dependencies/blas_lapack.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,12 +742,15 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
self.detect(kwargs)

def check_macOS_recent_enough(self) -> bool:
# We need the SDK to be >=13.3 (meaning at least XCode 14.3)
cmd = ['xcrun', '-sdk', 'macosx', '--show-sdk-version']
sdk_version = subprocess.run(cmd, capture_output=True, check=True, text=True).stdout.strip()
macos_version = platform.mac_ver()[0]
deploy_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', macos_version)
return sdk_version >= '13.3' and deploy_target >= '13.3'
if not mesonlib.version_compare(deploy_target, '>=13.3'):
return False

# We also need the SDK to be >=13.3 (meaning at least XCode 14.3)
cmd = ['xcrun', '-sdk', 'macosx', '--show-sdk-version']
sdk_version = subprocess.run(cmd, capture_output=True, check=True, text=True).stdout.strip()
return mesonlib.version_compare(sdk_version, '>=13.3')

def detect(self, kwargs: T.Dict[str, T.Any]) -> None:
from .framework import ExtraFrameworkDependency
Expand Down