Skip to content

Commit

Permalink
cmake: add options for enabling TBB and NUMA support
Browse files Browse the repository at this point in the history
Summary:
see also #3036

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Closes #3750

Differential Revision: D7765170

Pulled By: ajkr

fbshipit-source-id: 455788b3131bf62a4987a65684b757e68473eed9
  • Loading branch information
tchaikov authored and facebook-github-bot committed Apr 25, 2018
1 parent dfc61e7 commit 13a0bd9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 13a0bd9

Please sign in to comment.