Fix the compilation error that occurs when opening avx series instructions (#55049)

* fix the compilation error that occurs when opening avx series instructions

cmake command example:
```shell
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_AVX=ON -DENABLE_AVX2=ON -DENABLE_AVX2_FOR_SPEC_OP=ON
```

* Update snappy CMakeLists.txt add SNAPPY_HAVE_X86_CRC32 parameter
This commit is contained in:
monchickey 2023-10-18 21:04:27 +08:00 committed by GitHub
parent c7f78ac73a
commit 3ef092f83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,12 @@ else ()
set (SNAPPY_HAVE_SSSE3 0)
endif ()
if (ARCH_AMD64 AND ENABLE_SSE42)
set (SNAPPY_HAVE_X86_CRC32 1)
else ()
set (SNAPPY_HAVE_X86_CRC32 0)
endif ()
configure_file(
"${SOURCE_DIR}/cmake/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h")