Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarcus Asteborg <maastebo@microsoft.com>2020-04-27 22:19:59 +0300
committerMark Harris <mark.hsj@gmail.com>2020-06-13 10:21:15 +0300
commit97fca1b3392c4144891b92d2a8c1a27389048873 (patch)
tree378e3365c808e1cab2738d0c34d837c6c74ceb12 /cmake
parentc350cec965dd316f8515a8e2b619cb4da12f8825 (diff)
cmake - add option to disable intrinsics
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/OpusConfig.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/OpusConfig.cmake b/cmake/OpusConfig.cmake
index 1b40fbf1..63054617 100644
--- a/cmake/OpusConfig.cmake
+++ b/cmake/OpusConfig.cmake
@@ -49,11 +49,13 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm|aarch64)")
set(OPUS_CPU_ARM 1)
endif()
-opus_supports_cpu_detection(RUNTIME_CPU_CAPABILITY_DETECTION)
+if(NOT OPUS_DISABLE_INTRINSICS)
+ opus_supports_cpu_detection(RUNTIME_CPU_CAPABILITY_DETECTION)
+endif()
-if(OPUS_CPU_X86 OR OPUS_CPU_X64)
+if(OPUS_CPU_X86 OR OPUS_CPU_X64 AND NOT OPUS_DISABLE_INTRINSICS)
opus_detect_sse(COMPILER_SUPPORT_SIMD)
-elseif(OPUS_CPU_ARM)
+elseif(OPUS_CPU_ARM AND NOT OPUS_DISABLE_INTRINSICS)
opus_detect_neon(COMPILER_SUPPORT_NEON)
if(COMPILER_SUPPORT_NEON)
option(OPUS_USE_NEON "Option to enable NEON" ON)