From 2418ad6a81eab11876d30c45da4129dd2b3acf20 Mon Sep 17 00:00:00 2001 From: sylvarant Date: Tue, 19 Mar 2019 09:14:01 +0800 Subject: [PATCH] Detect arm CPU in CMake Need CMake to build on arm, in the same way that the regular Makefile does --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf54175..aaa0a8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,10 @@ else() add_definitions(-DMCL_USE_LLVM=1) set(SRCS ${SRCS} src/asm/aarch64.s) set(CPU arch64) + elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm") + add_definitions(-DMCL_USE_LLVM=1) + set(SRCS ${SRCS} src/asm/arm.s) + set(CPU arm) elseif(APPLE) add_definitions(-DMCL_USE_LLVM=1) set(SRCS ${SRCS} src/asm/x86-64mac.s src/asm/x86-64mac.bmi2.s)