Handle USE_NATIVE_ARCH=ON correctly on Apple M1

This commit is contained in:
Matthias Hochsteger 2020-12-17 10:26:29 +01:00
parent d30accdc1a
commit 65afc44dcc

View File

@ -474,6 +474,8 @@ if(USE_NATIVE_ARCH)
else()
message(STATUS "Build for generic CPU")
endif()
elseif(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
# no flag necessary/available on Apple M1
else()
target_compile_options(ngcore PUBLIC "-march=native")
endif(WIN32)