cmake: add options for enabling TBB and NUMA support

Summary:
see also https://github.com/facebook/rocksdb/issues/3036

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Closes https://github.com/facebook/rocksdb/pull/3750

Differential Revision: D7765170

Pulled By: ajkr

fbshipit-source-id: 455788b3131bf62a4987a65684b757e68473eed9
This commit is contained in:
Kefu Chai 2018-04-25 14:26:11 -07:00 committed by Facebook Github Bot
parent dfc61e7c24
commit 13a0bd90ce

View File

@ -284,15 +284,17 @@ if(WITH_UBSAN)
endif()
endif()
find_package(NUMA)
if(NUMA_FOUND)
option(WITH_NUMA "build with NUMA policy support" OFF)
if(WITH_NUMA)
find_package(NUMA REQUIRED)
add_definitions(-DNUMA)
include_directories(${NUMA_INCLUDE_DIR})
list(APPEND THIRDPARTY_LIBS ${NUMA_LIBRARIES})
endif()
find_package(TBB)
if(TBB_FOUND)
option(WITH_TBB "build with Threading Building Blocks (TBB)" OFF)
if(WITH_TBB)
find_package(TBB REQUIRED)
add_definitions(-DTBB)
include_directories(${TBB_INCLUDE_DIR})
list(APPEND THIRDPARTY_LIBS ${TBB_LIBRARIES})