diff options
Diffstat (limited to 'opus_functions.cmake')
-rw-r--r-- | opus_functions.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/opus_functions.cmake b/opus_functions.cmake index 04249ace..a3ac1c09 100644 --- a/opus_functions.cmake +++ b/opus_functions.cmake @@ -192,7 +192,7 @@ function(opus_detect_sse COMPILER_SUPPORT_SIMD) endfunction() function(opus_detect_neon COMPILER_SUPPORT_NEON) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "(armv7-a|aarch64)") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm|aarch64)") message(STATUS "Check NEON support by compiler") check_include_file(arm_neon.h HAVE_ARM_NEON_H) if(HAVE_ARM_NEON_H) @@ -209,6 +209,12 @@ function(opus_supports_cpu_detection RUNTIME_CPU_CAPABILITY_DETECTION) endif() if(HAVE_INTRIN_H OR HAVE_CPUID_H) set(RUNTIME_CPU_CAPABILITY_DETECTION 1 PARENT_SCOPE) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm|aarch64)") + # ARM cpu detection is implemented for Windows and anything + # using a Linux kernel (such as Android). + if (CMAKE_SYSTEM_NAME MATCHES "(Windows|Linux|Android)") + set(RUNTIME_CPU_CAPABILITY_DETECTION 1 PARENT_SCOPE) + endif () else() set(RUNTIME_CPU_CAPABILITY_DETECTION 0 PARENT_SCOPE) endif() |