CMakeLists.txt 3.2 KB
Newer Older
M
Minghao Li 已提交
1 2 3
add_executable(syncTest "")
add_executable(syncEnvTest "")
add_executable(syncPingTest "")
M
Minghao Li 已提交
4
add_executable(syncEncodeTest "")
M
sync io  
Minghao Li 已提交
5 6
add_executable(syncIOTickQTest "")
add_executable(syncIOTickPingTest "")
M
sync io  
Minghao Li 已提交
7 8 9
add_executable(syncIOSendMsgTest "")
add_executable(syncIOSendMsgClientTest "")
add_executable(syncIOSendMsgServerTest "")
M
Minghao Li 已提交
10
add_executable(syncRaftStoreTest "")
M
Minghao Li 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24


target_sources(syncTest
    PRIVATE
    "syncTest.cpp"
)
target_sources(syncEnvTest
    PRIVATE
    "syncEnvTest.cpp"
)
target_sources(syncPingTest
    PRIVATE
    "syncPingTest.cpp"
)
M
Minghao Li 已提交
25 26 27 28
target_sources(syncEncodeTest
    PRIVATE
    "syncEncodeTest.cpp"
)
M
sync io  
Minghao Li 已提交
29
target_sources(syncIOTickQTest
M
sync io  
Minghao Li 已提交
30
    PRIVATE
M
sync io  
Minghao Li 已提交
31
    "syncIOTickQTest.cpp"
M
sync io  
Minghao Li 已提交
32
)
M
sync io  
Minghao Li 已提交
33
target_sources(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
34
    PRIVATE
M
sync io  
Minghao Li 已提交
35
    "syncIOTickPingTest.cpp"
M
sync io  
Minghao Li 已提交
36
)
M
sync io  
Minghao Li 已提交
37 38 39 40 41 42 43 44 45 46 47 48
target_sources(syncIOSendMsgTest
    PRIVATE
    "syncIOSendMsgTest.cpp"
)
target_sources(syncIOSendMsgClientTest
    PRIVATE
    "syncIOSendMsgClientTest.cpp"
)
target_sources(syncIOSendMsgServerTest
    PRIVATE
    "syncIOSendMsgServerTest.cpp"
)
M
Minghao Li 已提交
49 50 51 52
target_sources(syncRaftStoreTest
    PRIVATE
    "syncRaftStoreTest.cpp"
)
M
Minghao Li 已提交
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69


target_include_directories(syncTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncEnvTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncPingTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
70 71 72 73 74
target_include_directories(syncEncodeTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
75
target_include_directories(syncIOTickQTest
M
sync io  
Minghao Li 已提交
76 77 78 79
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
80
target_include_directories(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
81 82 83 84
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
target_include_directories(syncIOSendMsgTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncIOSendMsgClientTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncIOSendMsgServerTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
100 101 102 103 104
target_include_directories(syncRaftStoreTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
105 106 107 108 109 110 111 112 113 114 115 116 117 118


target_link_libraries(syncTest
    sync
    gtest_main
)
target_link_libraries(syncEnvTest
    sync
    gtest_main
)
target_link_libraries(syncPingTest
    sync
    gtest_main
)
M
Minghao Li 已提交
119 120 121 122
target_link_libraries(syncEncodeTest
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
123
target_link_libraries(syncIOTickQTest
M
sync io  
Minghao Li 已提交
124 125 126
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
127
target_link_libraries(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
128 129 130
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
131 132 133 134 135 136 137 138 139 140 141 142
target_link_libraries(syncIOSendMsgTest
    sync
    gtest_main
)
target_link_libraries(syncIOSendMsgClientTest
    sync
    gtest_main
)
target_link_libraries(syncIOSendMsgServerTest
    sync
    gtest_main
)
M
Minghao Li 已提交
143 144 145 146
target_link_libraries(syncRaftStoreTest
    sync
    gtest_main
)
M
Minghao Li 已提交
147 148 149 150 151 152 153


enable_testing()
add_test(
    NAME sync_test
    COMMAND syncTest
)