CMakeLists.txt 1.6 KB
Newer Older
dengyihao's avatar
dengyihao 已提交
1 2 3 4 5
add_executable(idxTest "")
add_executable(idxFstTest "")
add_executable(idxFstUT "")
add_executable(idxUtilUT "")
add_executable(idxJsonUT "")
dengyihao's avatar
dengyihao 已提交
6

dengyihao's avatar
dengyihao 已提交
7
target_sources(idxTest
dengyihao's avatar
dengyihao 已提交
8
  PRIVATE 
dengyihao's avatar
dengyihao 已提交
9
  "indexTests.cc" 
dengyihao's avatar
dengyihao 已提交
10
)
dengyihao's avatar
dengyihao 已提交
11
target_sources(idxFstTest
dengyihao's avatar
dengyihao 已提交
12 13 14
  PRIVATE 
  "fstTest.cc" 
)
dengyihao's avatar
dengyihao 已提交
15

dengyihao's avatar
dengyihao 已提交
16
target_sources(idxFstUT
dengyihao's avatar
dengyihao 已提交
17 18 19
  PRIVATE 
  "fstUT.cc" 
)
dengyihao's avatar
dengyihao 已提交
20
target_sources(idxUtilUT
dengyihao's avatar
dengyihao 已提交
21 22 23 24
  PRIVATE 
  "utilUT.cc" 
)

dengyihao's avatar
dengyihao 已提交
25
target_sources(idxJsonUT
dengyihao's avatar
dengyihao 已提交
26 27 28
  PRIVATE 
  "jsonUT.cc" 
)
dengyihao's avatar
dengyihao 已提交
29
target_include_directories (idxTest
dengyihao's avatar
dengyihao 已提交
30
  PUBLIC
wafwerar's avatar
wafwerar 已提交
31
  "${TD_SOURCE_DIR}/include/libs/index" 
dengyihao's avatar
dengyihao 已提交
32 33
  "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
) 
dengyihao's avatar
dengyihao 已提交
34
target_include_directories (idxFstTest 
dengyihao's avatar
dengyihao 已提交
35
  PUBLIC
wafwerar's avatar
wafwerar 已提交
36
  "${TD_SOURCE_DIR}/include/libs/index" 
dengyihao's avatar
dengyihao 已提交
37 38
  "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
) 
dengyihao's avatar
dengyihao 已提交
39

dengyihao's avatar
dengyihao 已提交
40
target_include_directories (idxFstUT 
dengyihao's avatar
dengyihao 已提交
41
  PUBLIC
wafwerar's avatar
wafwerar 已提交
42
  "${TD_SOURCE_DIR}/include/libs/index" 
dengyihao's avatar
dengyihao 已提交
43 44
  "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
) 
dengyihao's avatar
dengyihao 已提交
45

dengyihao's avatar
dengyihao 已提交
46
target_include_directories (idxUtilUT 
dengyihao's avatar
dengyihao 已提交
47
  PUBLIC
wafwerar's avatar
wafwerar 已提交
48
  "${TD_SOURCE_DIR}/include/libs/index" 
dengyihao's avatar
dengyihao 已提交
49 50
  "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
) 
dengyihao's avatar
dengyihao 已提交
51

dengyihao's avatar
dengyihao 已提交
52
target_include_directories (idxJsonUT
dengyihao's avatar
dengyihao 已提交
53
  PUBLIC
wafwerar's avatar
wafwerar 已提交
54
  "${TD_SOURCE_DIR}/include/libs/index" 
dengyihao's avatar
dengyihao 已提交
55 56
  "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
) 
dengyihao's avatar
dengyihao 已提交
57
target_link_libraries (idxTest
dengyihao's avatar
dengyihao 已提交
58 59 60 61 62 63
  os  
  util
  common
  gtest_main
  index
)
dengyihao's avatar
dengyihao 已提交
64
target_link_libraries (idxFstTest
dengyihao's avatar
dengyihao 已提交
65 66 67 68 69
  os  
  util
  common
  gtest_main
  index
dengyihao's avatar
dengyihao 已提交
70
)
dengyihao's avatar
dengyihao 已提交
71
target_link_libraries (idxFstUT
dengyihao's avatar
dengyihao 已提交
72 73 74 75 76 77
  os  
  util
  common
  gtest_main
  index
)
dengyihao's avatar
dengyihao 已提交
78

dengyihao's avatar
dengyihao 已提交
79
target_link_libraries (idxUtilUT
dengyihao's avatar
dengyihao 已提交
80 81 82 83 84 85 86
  os  
  util
  common
  gtest_main
  index
)

dengyihao's avatar
dengyihao 已提交
87
target_link_libraries (idxJsonUT
dengyihao's avatar
dengyihao 已提交
88 89 90 91 92 93
  os  
  util
  common
  gtest_main
  index
)
dengyihao's avatar
dengyihao 已提交
94

wafwerar's avatar
wafwerar 已提交
95 96 97 98 99 100 101 102
add_test(
  NAME idxtest
  COMMAND idxTest
)
add_test(
  NAME idxJsonUT
  COMMAND idxJsonUT 
)
dengyihao's avatar
dengyihao 已提交
103 104
add_test(
  NAME idxUtilUT 
dengyihao's avatar
dengyihao 已提交
105
  COMMAND idxUtilUT 
dengyihao's avatar
dengyihao 已提交
106 107 108
)
add_test(
  NAME idxFstUT 
dengyihao's avatar
dengyihao 已提交
109
  COMMAND idxFstUT 
dengyihao's avatar
dengyihao 已提交
110
)