From a90b3862d921ebaeaf3c998cd742e883d2d4af04 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 1 Aug 2018 12:41:50 +0100 Subject: [PATCH] MDEV-16860 MyRocks: support CRC32 instructions on Winx64 Compile on Windows MSVC with -DHAVE_SSE2 and -DHAVE_PCLMUL It is safe, since code will do also runtime checks via cpuid(), before using the instructions, and will fallback to slower versions, if instructions are not available. --- storage/rocksdb/build_rocksdb.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index 8f01024be63..0f1b77e255d 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -376,7 +376,9 @@ SET(SOURCES) FOREACH(s ${ROCKSDB_SOURCES}) list(APPEND SOURCES ${ROCKSDB_SOURCE_DIR}/${s}) ENDFOREACH() - +IF(MSVC) + add_definitions(-DHAVE_SSE42 -DHAVE_PCLMUL) +ENDIF() IF(CMAKE_VERSION VERSION_GREATER "2.8.10") STRING(TIMESTAMP GIT_DATE_TIME "%Y-%m-%d %H:%M:%S") ENDIF()