From 55bd933dba7fc7fdc2d893f07f43ac54b49fbbd2 Mon Sep 17 00:00:00 2001 From: fundawang Date: Sun, 23 Apr 2023 22:26:37 +0000 Subject: [PATCH] Do not add -mfpu=neon flag under aarch64 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6718fb..ee68b4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,9 @@ endif() option(NEON "Use ARM Neon SIMD instructions if in ARM CPU" ON) if(${NEON} AND ${NEON_CPU}) target_compile_definitions(SoundTouch PRIVATE SOUNDTOUCH_USE_NEON) - target_compile_options(SoundTouch PRIVATE -mfpu=neon) + if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64.*$") + target_compile_options(SoundTouch PRIVATE -mfpu=neon) + endif() endif() find_package(OpenMP)