forked from toncenter/ton-index-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (38 loc) · 1.59 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
41
42
43
44
45
cmake_minimum_required(VERSION 3.16)
project(ton-index-cpp)
option(PGTON "Enable adding the pgton subdirectory" OFF)
option(TON_USE_JEMALLOC "Use \"ON\" to enable JeMalloc." OFF)
# Find jemalloc
if (TON_USE_JEMALLOC)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/ton/CMake")
find_package(jemalloc REQUIRED)
if (JEMALLOC_FOUND)
include_directories(${JEMALLOC_INCLUDE_DIR})
link_libraries(${JEMALLOC_LIBRARIES})
add_compile_definitions(TON_USE_JEMALLOC)
endif()
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
add_subdirectory(external/ton EXCLUDE_FROM_ALL)
add_subdirectory(external/libpqxx EXCLUDE_FROM_ALL)
add_subdirectory(external/clickhouse-cpp EXCLUDE_FROM_ALL)
add_subdirectory(external/hiredis EXCLUDE_FROM_ALL)
set(HIREDIS_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/external CACHE PATH "hiredis header" FORCE)
set(HIREDIS_LIB hiredis CACHE STRING "hiredis lib" FORCE)
set(REDIS_PLUS_PLUS_BUILD_TEST OFF CACHE BOOL "disable test" FORCE)
add_subdirectory(external/redis-plus-plus EXCLUDE_FROM_ALL)
set(MSGPACK_USE_BOOST OFF CACHE BOOL "disable boost" FORCE)
set(MSGPACK_USE_STD_VARIANT_ADAPTOR ON CACHE BOOL "enable std::variant" FORCE)
add_subdirectory(external/msgpack-c EXCLUDE_FROM_ALL)
add_subdirectory(tondb-scanner)
add_subdirectory(ton-index-postgres)
add_subdirectory(ton-index-postgres-v2)
add_subdirectory(ton-index-clickhouse)
add_subdirectory(ton-integrity-checker)
add_subdirectory(ton-smc-scanner)
add_subdirectory(ton-trace-emulator)
add_subdirectory(sandbox-cpp)
if (PGTON)
message("Building pgton")
add_subdirectory(pgton)
endif()