CMakeLists.txt 1.8 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

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

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

wafwerar's avatar
wafwerar 已提交
26 27 28 29 30 31 32 33 34 35 36 37 38 39
  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 已提交
40

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

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

wafwerar's avatar
wafwerar 已提交
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
  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 已提交
79

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

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

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