Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly fail if macOS universal build is attempted #86

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## main

* fix build with uthash \< 2.3.0 [bgilbert]
* explicitly fail if macOS universal build is attempted [bgilbert]

## 1.1.0, 28/3/24

Expand Down
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ version_data.set10('DCM_STATIC', get_option('default_library') == 'static')

# dependencies
cc = meson.get_compiler('c')
if host_machine.system() == 'darwin' and not cc.has_header('stdio.h')
# Certain compiler checks fail with -arch x86_64 -arch arm64. Detect this
# in advance.
# https://github.com/mesonbuild/meson/issues/5290
# https://github.com/mesonbuild/meson/issues/8206
error('Basic environment check failed. Check compiler flags; building for multiple CPU architectures is not supported.')
endif
found_uthash = cc.check_header(
'utarray.h',
required : false
Expand Down