macOS build in arm64 machine

This commit is contained in:
Charlie Siebers 2023-07-13 10:40:21 +08:00 committed by GitHub
parent c293f9eeab
commit c97015f038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,10 @@ IF( MNN_ENABLE_COVERAGE)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
ENDIF()
if ((CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND CMAKE_OSX_ARCHITECTURES)
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_OSX_ARCHITECTURES})
endif()
# do this before protobuf, make sure wincrt config of protobuf and MNN is same
if(MSVC)
# same as protobuf, otherwise config is inconsistent