diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2018-08-30 18:28:01 -0700 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-09-12 20:40:18 -0700 |
commit | f558a9dc14e243a800795bd040d944cbaf451472 (patch) | |
tree | 6c1ccf78231450cfbb2758d4fff297475e1392af /host | |
parent | fbd51d33e92143bfe521de2b6c3c82828e37ca0e (diff) | |
download | uhd-f558a9dc14e243a800795bd040d944cbaf451472.tar.gz uhd-f558a9dc14e243a800795bd040d944cbaf451472.tar.bz2 uhd-f558a9dc14e243a800795bd040d944cbaf451472.zip |
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.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/convert/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
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( |