From f558a9dc14e243a800795bd040d944cbaf451472 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Thu, 30 Aug 2018 18:28:01 -0700 Subject: host: lib: convert: Add CMake flag for NEON SIMD Adding CMake flag to enable/disable NEON SIMD instructions. This is an addition to the previous checks (check for NEON headers and checking the size of pointers), so behavior is unchanged unless users specify that they do not want to use NEON instructions. --- host/lib/convert/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index 219d3b74d..82d1e51f2 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -65,11 +65,15 @@ ENDIF(HAVE_TMMINTRIN_H) ######################################################################## # Check for NEON SIMD headers ######################################################################## +SET(NEON_SIMD_ENABLE ON CACHE BOOL + "Use NEON SIMD instructions, if applicable") +MARK_AS_ADVANCED(NEON_SIMD_ENABLE) IF(CMAKE_COMPILER_IS_GNUCXX) CHECK_INCLUDE_FILE_CXX(arm_neon.h HAVE_ARM_NEON_H) ENDIF(CMAKE_COMPILER_IS_GNUCXX) -IF(HAVE_ARM_NEON_H AND (${CMAKE_SIZEOF_VOID_P} EQUAL 4)) +IF(NEON_SIMD_ENABLE AND HAVE_ARM_NEON_H AND + (${CMAKE_SIZEOF_VOID_P} EQUAL 4)) ENABLE_LANGUAGE(ASM) LIBUHD_APPEND_SOURCES( -- cgit v1.2.3