-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
57 lines (43 loc) · 1021 Bytes
/
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
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.14)
project(udb)
include_directories("./src")
# Set C++ standard
set(CMAKE_CXX_STANDARD 11)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
# Test Directory
set(TEST_DIR ./test/)
set(TEST_STORAGE_DIR ${TEST_DIR}udb_storage/)
set(CLI_DIR ./udb_cli/)
# Include subdirectories
add_subdirectory(src)
enable_testing()
# Testing executable.
add_executable(
udb_test
${TEST_STORAGE_DIR}test_disk_manager.cpp
${TEST_STORAGE_DIR}test_buffer_pool.cpp
${TEST_STORAGE_DIR}test_bplus_tree.cpp
${TEST_STORAGE_DIR}test_hash_index.cpp
)
add_executable(
udb_util_test
${TEST_DIR}util/test_rwlatch.cpp
)
target_link_libraries(
udb_test
gtest_main
UDB_SRC
)
target_link_libraries(
udb_util_test
gtest_main
UDB_SRC
)
include(GoogleTest)
gtest_discover_tests(udb_test)