summaryrefslogtreecommitdiffstats
path: root/host/lib/convert
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-16 17:18:30 -0800
committerJosh Blum <josh@joshknows.com>2011-02-16 17:18:30 -0800
commitee0f8cf34cddae91559fa18ac9c96b3590a8c746 (patch)
tree2e4f2dd4bf728135d67992ac990520457d27b208 /host/lib/convert
parente43b47d65891d30ac5888635a1e3cec3f5046464 (diff)
downloaduhd-ee0f8cf34cddae91559fa18ac9c96b3590a8c746.tar.gz
uhd-ee0f8cf34cddae91559fa18ac9c96b3590a8c746.tar.bz2
uhd-ee0f8cf34cddae91559fa18ac9c96b3590a8c746.zip
uhd: added arch flags for sse2 (was not implicit on x32)
Diffstat (limited to 'host/lib/convert')
-rw-r--r--host/lib/convert/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt
index a9f977cdc..de9c660e1 100644
--- a/host/lib/convert/CMakeLists.txt
+++ b/host/lib/convert/CMakeLists.txt
@@ -22,15 +22,28 @@ INCLUDE(CheckIncludeFileCXX)
MESSAGE(STATUS "")
########################################################################
-# Check for SIMD headers
+# Check for SSE2 SIMD headers
########################################################################
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(EMMINTRIN_FLAGS -msse2)
+ELSEIF(MSVC)
+ SET(EMMINTRIN_FLAGS /arch:SSE2)
+ENDIF()
+
+SET(CMAKE_REQUIRED_FLAGS ${EMMINTRIN_FLAGS})
CHECK_INCLUDE_FILE_CXX(emmintrin.h HAVE_EMMINTRIN_H)
+UNSET(CMAKE_REQUIRED_FLAGS)
+
IF(HAVE_EMMINTRIN_H)
+ ADD_DEFINITIONS(${EMMINTRIN_FLAGS})
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/convert_with_sse2.cpp
)
ENDIF(HAVE_EMMINTRIN_H)
+########################################################################
+# Check for NEON SIMD headers
+########################################################################
CHECK_INCLUDE_FILE_CXX(arm_neon.h HAVE_ARM_NEON_H)
IF(HAVE_ARM_NEON_H)
LIBUHD_APPEND_SOURCES(