From ee0f8cf34cddae91559fa18ac9c96b3590a8c746 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 16 Feb 2011 17:18:30 -0800 Subject: uhd: added arch flags for sse2 (was not implicit on x32) --- host/lib/convert/CMakeLists.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'host/lib') 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( -- cgit v1.2.3