CMakeLists.txt 3.4 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
add_executable(syncEnqTest "")
M
Minghao Li 已提交
12 13 14 15 16 17 18 19 20 21 22 23 24 25


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


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 已提交
75 76 77 78 79
target_include_directories(syncEncodeTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
80
target_include_directories(syncIOTickQTest
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
target_include_directories(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
86 87 88 89
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
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 已提交
105 106 107 108 109
target_include_directories(syncRaftStoreTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
110 111 112 113 114
target_include_directories(syncEnqTest
    PUBLIC
    "${CMAKE_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
115 116 117 118 119 120 121 122 123 124 125 126 127 128


target_link_libraries(syncTest
    sync
    gtest_main
)
target_link_libraries(syncEnvTest
    sync
    gtest_main
)
target_link_libraries(syncPingTest
    sync
    gtest_main
)
M
Minghao Li 已提交
129 130 131 132
target_link_libraries(syncEncodeTest
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
133
target_link_libraries(syncIOTickQTest
M
sync io  
Minghao Li 已提交
134 135 136
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
137
target_link_libraries(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
138 139 140
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
141 142 143 144 145 146 147 148 149 150 151 152
target_link_libraries(syncIOSendMsgTest
    sync
    gtest_main
)
target_link_libraries(syncIOSendMsgClientTest
    sync
    gtest_main
)
target_link_libraries(syncIOSendMsgServerTest
    sync
    gtest_main
)
M
Minghao Li 已提交
153 154 155 156
target_link_libraries(syncRaftStoreTest
    sync
    gtest_main
)
M
Minghao Li 已提交
157 158 159 160
target_link_libraries(syncEnqTest
    sync
    gtest_main
)
M
Minghao Li 已提交
161 162 163 164 165 166 167


enable_testing()
add_test(
    NAME sync_test
    COMMAND syncTest
)