GH-1496: Fix build on armv7 architecture

This commit is contained in:
Jon Siwek 2021-04-09 10:54:53 -07:00
parent 25dcf210b1
commit 28a150246a

View file

@ -362,6 +362,18 @@ set(HH_SRCS
) )
if (${COMPILER_ARCHITECTURE} STREQUAL "arm") if (${COMPILER_ARCHITECTURE} STREQUAL "arm")
check_c_source_compiles("
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
int main() { return 0; }
#else
#error
#endif
" test_arm_neon)
if (test_arm_neon)
list(APPEND HH_SRCS ../auxil/highwayhash/highwayhash/hh_neon.cc)
endif ()
set_source_files_properties(${HH_SRCS} PROPERTIES COMPILE_FLAGS set_source_files_properties(${HH_SRCS} PROPERTIES COMPILE_FLAGS
-mfloat-abi=hard -march=armv7-a -mfpu=neon) -mfloat-abi=hard -march=armv7-a -mfpu=neon)
elseif (${COMPILER_ARCHITECTURE} STREQUAL "aarch64") elseif (${COMPILER_ARCHITECTURE} STREQUAL "aarch64")