From 097b3a0bec7a96d112a9b2ddb003cd1c816bb6d3 Mon Sep 17 00:00:00 2001 From: zhuna8616 <100275873+zhuna8616@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:52:18 +0800 Subject: [PATCH] fix arm cmake (#93) --- cmake/set_arch_flags.cmake | 2 +- scripts/unittest.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/set_arch_flags.cmake b/cmake/set_arch_flags.cmake index 538ddfe..830cb32 100644 --- a/cmake/set_arch_flags.cmake +++ b/cmake/set_arch_flags.cmake @@ -2,7 +2,7 @@ function(set_arch_flags target arch) message(STATUS "Setting architecture flags for ${arch}") if(arch MATCHES "x86_64") target_compile_options(${target} PRIVATE -mavx2 -mpclmul -mbmi -mlzcnt) - elseif(arch MATCHES "arm") + elseif(arch MATCHES "aarch64") target_compile_options(${target} PRIVATE -march=armv8-a) else() message(FATAL_ERROR "Unsupported architecture: ${arch}") diff --git a/scripts/unittest.sh b/scripts/unittest.sh index fd2adc9..7feee67 100755 --- a/scripts/unittest.sh +++ b/scripts/unittest.sh @@ -9,7 +9,7 @@ Usage: -g, --gcc compiler is gcc -c, --clang compiler is clang -h, --help display this message - --arch={arm|haswell|westmere} target architecture, default is haswell + --arch={aarch64|haswell|westmere} target architecture, default is haswell --dispatch={dynamic|static} sonic dispatch mode, default is static example: bash unittest.sh -g --arch=westmere --dispatch=static @@ -43,7 +43,7 @@ do --arch) case "$2" in "") shift 2 ;; - arm|haswell|westmere) + aarch64|haswell|westmere) UNIT_TEST_ARCH="$2" shift 2 ;; *)