CMakeLists.txt 3.0 KB
Newer Older
wafwerar's avatar
wafwerar 已提交
1 2 3 4 5 6
IF(NOT TD_DARWIN)
  add_executable(idxTest "")
  add_executable(idxFstTest "")
  add_executable(idxFstUT "")
  add_executable(idxUtilUT "")
  add_executable(idxJsonUT "")
dengyihao's avatar
dengyihao 已提交
7
  add_executable(idxFstUtilUT "")
dengyihao's avatar
dengyihao 已提交
8

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

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

dengyihao's avatar
dengyihao 已提交
27 28 29 30 31 32 33 34
  target_sources(idxJsonUT
    PRIVATE 
    "jsonUT.cc" 
  )
  target_sources(idxFstUtilUT
   PRIVATE 
   "fstUtilUT.cc" 
  )
dengyihao's avatar
dengyihao 已提交
35
 
dengyihao's avatar
dengyihao 已提交
36 37 38 39 40 41 42
  target_include_directories (idxTest
   PUBLIC
   "${TD_SOURCE_DIR}/include/libs/index" 
   "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
  target_include_directories (idxFstTest 
   PUBLIC
wafwerar's avatar
wafwerar 已提交
43
  "${TD_SOURCE_DIR}/include/libs/index" 
dengyihao's avatar
dengyihao 已提交
44
  "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
dengyihao's avatar
dengyihao 已提交
45
  ) 
wafwerar's avatar
wafwerar 已提交
46 47 48 49 50 51 52 53 54 55 56 57 58 59
  target_sources(idxJsonUT
    PRIVATE 
    "jsonUT.cc" 
  )
  target_include_directories (idxTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/index" 
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
  target_include_directories (idxFstTest 
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/index" 
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
dengyihao's avatar
dengyihao 已提交
60

wafwerar's avatar
wafwerar 已提交
61 62 63 64 65
  target_include_directories (idxFstUT 
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/index" 
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
dengyihao's avatar
dengyihao 已提交
66

wafwerar's avatar
wafwerar 已提交
67 68 69 70 71
  target_include_directories (idxUtilUT 
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/index" 
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
dengyihao's avatar
dengyihao 已提交
72

dengyihao's avatar
dengyihao 已提交
73 74 75 76 77 78 79 80 81 82
  target_include_directories (idxJsonUT
   PUBLIC
   "${TD_SOURCE_DIR}/include/libs/index" 
   "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
  target_include_directories (idxFstUtilUT
   PUBLIC
   "${TD_SOURCE_DIR}/include/libs/index" 
   "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
dengyihao's avatar
dengyihao 已提交
83

dengyihao's avatar
dengyihao 已提交
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
  target_link_libraries (idxTest
    os  
    util
    common
    gtest_main
    index
  )
  target_link_libraries (idxFstTest
    os  
    util
    common
    gtest_main
    index
  )
  target_link_libraries (idxFstUT
    os  
    util
    common
    gtest_main
    index
  )
wafwerar's avatar
wafwerar 已提交
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
  target_include_directories (idxJsonUT
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/index" 
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
  ) 
  target_link_libraries (idxTest
    os  
    util
    common
    gtest_main
    index
  )
  target_link_libraries (idxFstTest
    os  
    util
    common
    gtest_main
    index
  )
  target_link_libraries (idxFstUT
    os  
    util
    common
    gtest_main
    index
  )
dengyihao's avatar
dengyihao 已提交
131

wafwerar's avatar
wafwerar 已提交
132 133 134 135 136 137 138
  target_link_libraries (idxUtilUT
    os  
    util
    common
    gtest_main
    index
  )
dengyihao's avatar
dengyihao 已提交
139

wafwerar's avatar
wafwerar 已提交
140 141 142 143 144 145 146
  target_link_libraries (idxJsonUT
    os  
    util
    common
    gtest_main
    index
  )
dengyihao's avatar
dengyihao 已提交
147 148 149 150 151 152
  target_link_libraries (idxFstUtilUT
    os  
    util
    common
    gtest_main
    index
wafwerar's avatar
wafwerar 已提交
153
  )
dengyihao's avatar
dengyihao 已提交
154
  
wafwerar's avatar
wafwerar 已提交
155 156 157 158
  add_test(
    NAME idxJsonUT
    COMMAND idxJsonUT 
  )
dengyihao's avatar
dengyihao 已提交
159 160 161 162 163
  add_test(
    NAME idxFstUtilUT 
    COMMAND idxFstUtilUT  
  
  )
dengyihao's avatar
dengyihao 已提交
164

dengyihao's avatar
dengyihao 已提交
165 166 167 168
  add_test(
    NAME idxtest
    COMMAND idxTest
  )
wafwerar's avatar
wafwerar 已提交
169 170 171 172 173 174 175 176
  add_test(
    NAME idxUtilUT 
    COMMAND idxUtilUT 
  )
  add_test(
    NAME idxFstUT 
    COMMAND idxFstUT 
  )
dengyihao's avatar
dengyihao 已提交
177
ENDIF ()