cmake_minimum_required(VERSION 3.20..3.30) project(sharedMemoryKeyDB) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -fPIC" CACHE STRING "Debug flags" FORCE) set(CMAKE_C_FLAGS_DEBUG "-g -O0 -fPIC" CACHE STRING "Debug flags" FORCE) include_directories(${sharedMemoryKeyDB_SOURCE_DIR}) option(BUILD_TESTS "Build unit tests" ON) if (BUILD_TESTS) # enable_testing() # # include(FetchContent) # FetchContent_Declare( # googletest # URL https://github.com/google/googletest/archive/refs/heads/main.zip # ) # FetchContent_MakeAvailable(googletest) # # add_executable(tests # tests/test_1.cpp # ) # # target_link_libraries(my_tests # gtest_main # ) # # include(GoogleTest) # gtest_discover_tests(my_tests) endif() add_executable(sharedMemoryKeyDB main.cpp utils/toml/toml.hpp utils/hash/xxhash/xxh3.h utils/hash/xxhash/xxhash.h utils/hash/xxhash/xxhash.c utils/datastructures/LFSkipList.cpp utils/datastructures/LFSkipList.h utils/io/SSTableIO.cpp utils/io/SSTableIO.h utils/io/Wal.cpp utils/io/Wal.h core/Memtable.cpp core/Memtable.h utils/io/Compactor.cpp utils/io/Compactor.h utils/io/VersionManager.cpp utils/io/VersionManager.h utils/io/RecoveryLog.cpp utils/io/RecoveryLog.h utils/hash/Hash128.h core/SharedMemoryManager.cpp core/SharedMemoryManager.h utils/datastructures/LFCircullarBuffer.cpp utils/datastructures/LFCircullarBuffer.h utils/intrinsincs/optimizations.h core/SharedCommandQueue.cpp core/SharedCommandQueue.h core/Command.cpp core/Command.h utils/string/basic_utils.h core/UDB.cpp core/UDB.h core/DatabaseManager.cpp core/DatabaseManager.h utils/config/GlobalConfig.h utils/config/GlobalConfig.cpp ) add_executable(sharedMemoryKeyDB_client client.cpp utils/toml/toml.hpp utils/hash/xxhash/xxh3.h utils/hash/xxhash/xxhash.h utils/hash/xxhash/xxhash.c utils/datastructures/LFSkipList.cpp utils/datastructures/LFSkipList.h utils/io/SSTableIO.cpp utils/io/SSTableIO.h utils/io/Wal.cpp utils/io/Wal.h core/Memtable.cpp core/Memtable.h utils/io/Compactor.cpp utils/io/Compactor.h utils/io/VersionManager.cpp utils/io/VersionManager.h utils/io/RecoveryLog.cpp utils/io/RecoveryLog.h utils/hash/Hash128.h core/SharedMemoryManager.cpp core/SharedMemoryManager.h utils/datastructures/LFCircullarBuffer.cpp utils/datastructures/LFCircullarBuffer.h utils/intrinsincs/optimizations.h core/SharedCommandQueue.cpp core/SharedCommandQueue.h core/Command.cpp core/Command.h utils/string/basic_utils.h )