From 65afc44dccb4b0c7d691aebc6fcb39412235a56b Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Thu, 17 Dec 2020 10:26:29 +0100 Subject: [PATCH] Handle USE_NATIVE_ARCH=ON correctly on Apple M1 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cb66344..7d7c284a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)