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

Fix cmake build on macOS with Xcode generator #43

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

asakovets
Copy link
Contributor

  1. Do not pass -mmacosx-version-min, use CMAKE_OSX_DEPLOYMENT_TARGET property instead. This fixes clang: error: overriding '-mmacosx-version-min=10.7' option with '-target arm64-apple-macos15.1' [-Werror,-Woverriding-t-option]

  2. Do not throw error on -Wshorten-64-to-32 warning. At first I thought about fixing all occurrences of this warning, but it shortly became clear that there are just too many of them. I decided that it easier to leave it as a warning.

@zeux
Copy link
Owner

zeux commented Nov 9, 2024

Wshorten-64-to-32

It's interesting that you had to disable it, as Makefile build doesn't need to.

@zeux
Copy link
Owner

zeux commented Nov 9, 2024

Nor do I get either warning locally when building on macOS, using CMake 3.30 and Apple clang 16.0. But I'd definitely be happy to merge the deployment target change, just not sure about the other warning.

@zeux
Copy link
Owner

zeux commented Nov 9, 2024

Ah, sorry, I missed the "Xcode generator" part. I do indeed have both issues in that generator; I guess it has a different set of warning defaults, so the truncation warning is explicitly enabled. Thanks!

@zeux zeux merged commit 818dba3 into zeux:master Nov 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants