From e419facdca761516eb19ed083ddab73539197c14 Mon Sep 17 00:00:00 2001 From: Pedro Montes Alcalde Date: Sun, 12 Nov 2023 11:54:31 -0300 Subject: [PATCH] cmake: Enable XXH_X86DISPATCH_ALLOW_AVX by default --- external/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 0b77d6a005..36717a5339 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -325,8 +325,12 @@ target_include_directories(libatrac9 PUBLIC LibAtrac9/C/src) option(BUILD_SHARED_LIBS "Build shared library" OFF) option(XXHASH_BUILD_XXHSUM "Build the xxhsum binary" OFF) +option(XXH_X86DISPATCH_ALLOW_AVX "Allow building XXH3 with AVX even if it crashes on SSE2-Only CPUs" OFF) set(DISPATCH 1) add_subdirectory(xxHash/cmake_unofficial EXCLUDE_FROM_ALL) +if(XXH_X86DISPATCH_ALLOW_AVX) + target_compile_definitions(xxhash PRIVATE XXH_X86DISPATCH_ALLOW_AVX) +endif() # Tracy option(TRACY_ENABLE_ON_CORE_COMPONENTS