aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-09-12 11:31:59 -0700
committerChris Robinson <[email protected]>2016-09-12 11:31:59 -0700
commit46b3e1d08ca10e809eb2e20b6371812958b97e1f (patch)
treee38076fa1b19d96253e42c6a84f9a9d0f2db1045 /CMakeLists.txt
parentefaa09dc23066ec288f48b2a0479eb9c988404ee (diff)
Check if -mfpu=neon is available for compiling the NEON mixer
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d92bbb7d..0d3bb5cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -364,6 +364,7 @@ SET(SSE_SWITCH "")
SET(SSE2_SWITCH "")
SET(SSE3_SWITCH "")
SET(SSE4_1_SWITCH "")
+SET(FPU_NEON_SWITCH "")
IF(NOT MSVC)
CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
IF(HAVE_MSSE_SWITCH)
@@ -381,6 +382,10 @@ IF(NOT MSVC)
IF(HAVE_MSSE4_1_SWITCH)
SET(SSE4_1_SWITCH "-msse4.1")
ENDIF()
+ CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
+ IF(HAVE_MFPU_NEON_SWITCH)
+ SET(FPU_NEON_SWITCH "-mfpu=neon")
+ ENDIF()
ENDIF()
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
@@ -766,8 +771,11 @@ IF(HAVE_ARM_NEON_H)
IF(ALSOFT_CPUEXT_NEON)
SET(HAVE_NEON 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer_neon.c)
+ IF(FPU_NEON_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer_neon.c PROPERTIES
+ COMPILE_FLAGS "${FPU_NEON_SWITCH}")
+ ENDIF()
SET(CPU_EXTS "${CPU_EXTS}, Neon")
- SET_SOURCE_FILES_PROPERTIES(Alc/mixer_neon.c PROPERTIES COMPILE_FLAGS -mfpu=neon)
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_NEON AND NOT HAVE_NEON)