diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index 34b53eea..155f938b 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -80,7 +80,11 @@ if (UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-compare") endif() else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + set(CRYPTOPP_ARCH "native") + if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^arm.*") + set(CRYPTOPP_ARCH "armv6zk") + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${CRYPTOPP_ARCH}") endif() endif()