aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorNick Foster <nick@ettus.com>2011-06-07 10:53:54 -0700
committerJosh Blum <josh@joshknows.com>2011-06-14 17:27:46 -0700
commit85ebb705fa567e8093aa68c0ad88996d434ed2bf (patch)
tree32767cf0fc751dc697a9d31fa1726893088fb1ca /host
parenta1b675a4d8e902a45ff0f58e5e018536814e16bb (diff)
downloaduhd-85ebb705fa567e8093aa68c0ad88996d434ed2bf.tar.gz
uhd-85ebb705fa567e8093aa68c0ad88996d434ed2bf.tar.bz2
uhd-85ebb705fa567e8093aa68c0ad88996d434ed2bf.zip
NEON detection for E100 in convert/
Diffstat (limited to 'host')
-rw-r--r--host/lib/convert/CMakeLists.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt
index e8d933f34..5f05b0cb8 100644
--- a/host/lib/convert/CMakeLists.txt
+++ b/host/lib/convert/CMakeLists.txt
@@ -26,6 +26,7 @@ MESSAGE(STATUS "")
########################################################################
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(EMMINTRIN_FLAGS -msse2)
+ SET(NEON_FLAGS "-mfloat-abi=softfp -mfpu=neon")
ELSEIF(MSVC)
SET(EMMINTRIN_FLAGS /arch:SSE2)
ENDIF()
@@ -47,13 +48,21 @@ ENDIF(HAVE_EMMINTRIN_H)
########################################################################
# Check for NEON SIMD headers
########################################################################
+SET(CMAKE_REQUIRED_FLAGS ${NEON_FLAGS})
CHECK_INCLUDE_FILE_CXX(arm_neon.h HAVE_ARM_NEON_H)
-IF(HAVE_ARM_NEON_H)
+UNSET(CMAKE_REQUIRED_FLAGS)
+if(HAVE_ARM_NEON_H)
+ MESSAGE(STATUS "Enabling NEON support")
+ SET_SOURCE_FILES_PROPERTIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
+ PROPERTIES COMPILE_FLAGS "${NEON_FLAGS}"
+ )
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp
)
-ENDIF(HAVE_ARM_NEON_H)
-
+else(HAVE_ARM_NEON_H)
+ MESSAGE(STATUS "Disabling NEON support")
+endif(HAVE_ARM_NEON_H)
########################################################################
# Look for Orc support
########################################################################
@@ -73,7 +82,7 @@ IF(ORC_FOUND AND ORCC_EXECUTABLE)
GET_FILENAME_COMPONENT(orc_file_name_we ${orcc_src} NAME_WE)
SET(orcc_gen ${CMAKE_CURRENT_BINARY_DIR}/${orc_file_name_we}.c)
- MESSAGE(STATUS "orcc_gen is ${orcc_gen}, orcc_src is ${orcc_src}")
+ MESSAGE(STATUS "Orc found, enabling Orc support")
ADD_CUSTOM_COMMAND(
COMMAND ${ORCC_EXECUTABLE} --implementation -o ${orcc_gen} ${orcc_src}
DEPENDS ${orcc_src} OUTPUT ${orcc_gen}