1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 19:22:37 +00:00
ton/tddb/CMakeLists.txt
birydrad 72020c04c4
celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164)
* getactorstats query for validator-engine-console

* celldb in-memory mode (--celldb-in-memory option)

* rldp2: bugfix - do not estimate speed while nothing is sent

* add simple ed25519 benchmark

* fix compilation errors of different platforms and move to c++20

* fix some warnings

* turn on TON_USE_ABSEIL for glibc 2.27 nix build

---------

Co-authored-by: birydrad <>
2024-09-23 17:34:37 +03:00

78 lines
2 KiB
CMake

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
#SOURCE SETS
set(TDDB_UTILS_SOURCE
td/db/utils/BlobView.cpp
td/db/utils/ChainBuffer.cpp
td/db/utils/CyclicBuffer.cpp
td/db/utils/FileSyncState.cpp
td/db/utils/StreamInterface.cpp
td/db/utils/StreamToFileActor.cpp
td/db/utils/FileToStreamActor.cpp
td/db/utils/BlobView.h
td/db/utils/ChainBuffer.h
td/db/utils/CyclicBuffer.h
td/db/utils/FileSyncState.h
td/db/utils/StreamInterface.h
td/db/utils/StreamToFileActor.h
td/db/utils/FileToStreamActor.h
)
set(TDDB_SOURCE
td/db/MemoryKeyValue.cpp
td/db/KeyValue.h
td/db/KeyValueAsync.h
td/db/MemoryKeyValue.h
td/db/binlog/Binlog.cpp
td/db/binlog/BinlogReaderHelper.cpp
td/db/binlog/Binlog.h
td/db/binlog/BinlogReaderHelper.h
td/db/binlog/BinlogReaderInterface.h
)
set(TDDB_ROCKSDB_SOURCE
td/db/RocksDb.cpp
td/db/RocksDb.h
)
set(TDDB_TEST_SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/test/key_value.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test/binlog.cpp
PARENT_SCOPE
)
#RULES
#LIBRARIES
add_library(tddb_utils STATIC ${TDDB_UTILS_SOURCE})
target_include_directories(tddb_utils PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(tddb_utils PUBLIC tdutils tdactor)
add_library(tddb STATIC ${TDDB_SOURCE})
target_include_directories(tddb PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(tddb PUBLIC tdutils tdactor tddb_utils)
if (TDDB_USE_ROCKSDB)
target_sources(tddb PRIVATE ${TDDB_ROCKSDB_SOURCE})
target_compile_definitions(tddb PUBLIC -DTDDB_USE_ROCKSDB)
target_link_libraries(tddb PUBLIC rocksdb)
target_include_directories(tddb PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../third-party/rocksdb/include>)
endif()
add_executable(io-bench test/io-bench.cpp)
target_link_libraries(io-bench tdutils tdactor tddb)
# BEGIN-INTERNAL
#add_subdirectory(benchmark)
# END-INTERNAL
install(TARGETS tddb tddb_utils EXPORT TdTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)