diff --git a/CMakeLists.txt b/CMakeLists.txt index 672561e..6eef485 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,6 +178,15 @@ int main() { return _bzhi_u32(0, 1); }" SNAPPY_HAVE_BMI2) +check_cxx_source_compiles(" +#include +int main() { + uint8_t val = 3, dup[8]; + uint8x16_t v = vld1q_dup_u8(&val); + vst1q_u8(dup, v); + return 0; +}" SNAPPY_HAVE_NEON) + include(CheckSymbolExists) check_symbol_exists("mmap" "sys/mman.h" HAVE_FUNC_MMAP) check_symbol_exists("sysconf" "unistd.h" HAVE_FUNC_SYSCONF) diff --git a/cmake/config.h.in b/cmake/config.h.in index 872bd3c..568f69c 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -49,6 +49,9 @@ /* Define to 1 if you target processors with BMI2+ and have . */ #cmakedefine01 SNAPPY_HAVE_BMI2 +/* Define to 1 if you target processors with NEON and have . */ +#cmakedefine01 SNAPPY_HAVE_NEON + /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #cmakedefine SNAPPY_IS_BIG_ENDIAN 1