From 2724e4f1b237d392e307284c633f1a6e55688120 Mon Sep 17 00:00:00 2001 From: Junhao Huang <1160141009@qq.com> Date: Sat, 14 Sep 2024 16:09:15 +0800 Subject: [PATCH] Update CMakeLists.txt Update compiler flag for AARCH64/ARM64 device --- python/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 397911ae..25e1a1da 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -11,6 +11,9 @@ if(MSVC) elseif(DARWIN) SET(CMAKE_CXX_FLAGS "-Wno-int-in-bool-context -std=c++11") SET(CMAKE_CXX_FLAGS_DEBUG "-Wall") +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + SET(CMAKE_CXX_FLAGS "-march=native -Wno-int-in-bool-context -std=c++11") + SET(CMAKE_CXX_FLAGS_DEBUG "-Wall") else() SET(CMAKE_CXX_FLAGS "-march=native -Wno-int-in-bool-context -std=c++11 -mavx -mfma") SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")