CMake: add support for SSE4.2
Summary: Closes https://github.com/facebook/rocksdb/pull/2159 Differential Revision: D4894483 Pulled By: yiwu-arbug fbshipit-source-id: 607e17e8ef5d30dce02c27be9d1de7d9f823b4ae
This commit is contained in:
parent
7d5f5aa977
commit
bc3973259c
@ -55,7 +55,7 @@ else()
|
|||||||
add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE)
|
add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE)
|
||||||
include_directories(${JEMALLOC_INCLUDE_DIR})
|
include_directories(${JEMALLOC_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
option(WITH_SNAPPY "build with SNAPPY" OFF)
|
option(WITH_SNAPPY "build with SNAPPY" OFF)
|
||||||
if(WITH_SNAPPY)
|
if(WITH_SNAPPY)
|
||||||
find_package(snappy REQUIRED)
|
find_package(snappy REQUIRED)
|
||||||
@ -115,6 +115,11 @@ if(WIN32)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
option(WITH_SSE42 "build with SSE4.2" ON)
|
||||||
|
if(WITH_SSE42)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/build_version.cc)
|
set(BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/build_version.cc)
|
||||||
|
Loading…
Reference in New Issue
Block a user