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

M1Macの場合、x86_64でビルドされてしまわないか不安... #55

Open
tmori opened this issue Jul 31, 2024 · 1 comment
Open
Assignees

Comments

@tmori
Copy link
Contributor

tmori commented Jul 31, 2024

以下のように明示した方が良いかもしれない。

if(APPLE AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")
    set(CMAKE_OSX_ARCHITECTURES "arm64")
endif()
if(APPLE)
    message(STATUS "CMAKE_OSX_ARCHITECTURES: ${CMAKE_OSX_ARCHITECTURES}")
endif()
@mitsut
Copy link
Member

mitsut commented Aug 23, 2024

私の環境では上記の修正をせずにarm64バイナリが作成されています。

@tmori 問題が起こる可能性としては以下が考えられます

  • Rosetta2経由(x86_64ターミナルでビルドコマンドを実行する)でビルドをしている
  • 依存ライブラリがx86_64しかインストールされていない
  • 古いバージョンのCMakeを使用している

上記の提案はMacの場合はArm64固定とするということだと思います。ビルドでエラーになるか、ランタイムでエラーになるかの違いだと思いますがビルドで弾く方針にしますか?

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

No branches or pull requests

2 participants