-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
40 lines (29 loc) · 1.12 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required (VERSION 3.0)
project (SICM LANGUAGES C CXX)
if (NOT DEFINED CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Use -DSICM_BUILD_HIGH_LEVEL=True to build the high-level interface.
set(SICM_BUILD_HIGH_LEVEL False CACHE BOOL "Should we build the high-level interface?")
find_package(Threads REQUIRED)
link_libraries(Threads::Threads m dl)
# Install custom CMake modules for jemalloc and libnuma.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# find jemalloc through pkg-config
find_package(PkgConfig REQUIRED)
pkg_search_module(JEMALLOC REQUIRED jemalloc)
message(STATUS "Found jemalloc library: inc=${JEMALLOC_INCLUDE_DIRS}, lib=${JEMALLOC_LDFLAGS}")
add_subdirectory(include)
# Compile and install the low- and high-level interfaces
add_subdirectory(src)
# Install the compiler wrappers if we're doing the high-level interface
if(SICM_BUILD_HIGH_LEVEL)
add_subdirectory(bin)
endif()
# Add helper code found in the contrib directory
add_subdirectory(contrib)
# Compile some tests
enable_testing()
add_subdirectory(test)
# Compile examples
add_subdirectory(examples)