-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (29 loc) · 1.04 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
cmake_minimum_required(VERSION 3.10)
project(yedis)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_LINKER lld)
add_compile_definitions(DEBUG YEDIS_DEBUG_ALLOCATION)
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
include_directories(./include deps/spdlog/include deps/gtest/googletest/include deps/abseil-cpp)
add_compile_definitions(USE_LOCK_STYLE_THREAD_SAFETY_ATTRIBUTES)
ELSE()
include_directories(./include deps/spdlog/include deps/gtest/googletest/include deps/abseil-cpp)
ENDIF()
option(BUILD_WITH_TESTS "Build Yedis's unit tests" ON)
include_directories(include)
aux_source_directory(src SOURCE_FILES)
aux_source_directory(src/ydb SOURCE_FILES)
#add_executable(yedis ${SOURCE_FILES})
#target_link_libraries(yedis rocksdb spdlog::spdlog gtest)
add_library(yedis "")
target_sources(yedis
PRIVATE
${SOURCE_FILES}
)
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
target_compile_options(yedis PRIVATE -Wthread-safety)
ENDIF()
add_subdirectory(deps/spdlog)
add_subdirectory(deps/gtest)
add_subdirectory(deps/abseil-cpp)
add_subdirectory(tests)