CMakeLists.txt 3.4 KB
Newer Older
H
Hongze Cheng 已提交
1 2 3 4 5
# vnode
add_library(vnode STATIC "")
target_sources(
    vnode
    PRIVATE
H
Hongze Cheng 已提交
6

H
Hongze Cheng 已提交
7
    # vnode
H
Hongze Cheng 已提交
8
    "src/vnd/vnodeOpen.c"
H
Hongze Cheng 已提交
9
    "src/vnd/vnodeBufPool.c"
H
Hongze Cheng 已提交
10 11 12
    "src/vnd/vnodeCfg.c"
    "src/vnd/vnodeCommit.c"
    "src/vnd/vnodeQuery.c"
H
Hongze Cheng 已提交
13
    "src/vnd/vnodeModule.c"
H
Hongze Cheng 已提交
14
    "src/vnd/vnodeSvr.c"
M
Minghao Li 已提交
15
    "src/vnd/vnodeSync.c"
H
Hongze Cheng 已提交
16
    "src/vnd/vnodeSnapshot.c"
H
Hongze Cheng 已提交
17
    "src/vnd/vnodeRetention.c"
18
    "src/vnd/vnodeInitApi.c"
H
Hongze Cheng 已提交
19

H
Hongze Cheng 已提交
20
    # meta
H
Hongze Cheng 已提交
21
    "src/meta/metaOpen.c"
H
Hongze Cheng 已提交
22 23
    "src/meta/metaIdx.c"
    "src/meta/metaTable.c"
24
    "src/meta/metaSma.c"
H
Hongze Cheng 已提交
25
    "src/meta/metaQuery.c"
H
Hongze Cheng 已提交
26
    "src/meta/metaCommit.c"
H
Hongze Cheng 已提交
27
    "src/meta/metaEntry.c"
H
Hongze Cheng 已提交
28
    "src/meta/metaSnapshot.c"
H
Hongze Cheng 已提交
29
    "src/meta/metaCache.c"
30
    "src/meta/metaTtl.c"
H
Hongze Cheng 已提交
31

32 33
    # sma
    "src/sma/smaEnv.c"
C
Cary Xu 已提交
34
    "src/sma/smaUtil.c"
35
    "src/sma/smaFS.c"
36
    "src/sma/smaOpen.c"
C
Cary Xu 已提交
37
    "src/sma/smaCommit.c"
38
    "src/sma/smaRollup.c"
C
Cary Xu 已提交
39
    "src/sma/smaSnapshot.c"
C
Cary Xu 已提交
40
    "src/sma/smaTimeRange.c"
41

H
Hongze Cheng 已提交
42 43 44 45
    # tsdb
    "src/tsdb/tsdbCommit.c"
    "src/tsdb/tsdbFile.c"
    "src/tsdb/tsdbFS.c"
H
Hongze Cheng 已提交
46
    "src/tsdb/tsdbOpen.c"
H
Hongze Cheng 已提交
47 48
    "src/tsdb/tsdbMemTable.c"
    "src/tsdb/tsdbRead.c"
49
    "src/tsdb/tsdbCache.c"
H
Hongze Cheng 已提交
50
    "src/tsdb/tsdbWrite.c"
H
refact  
Hongze Cheng 已提交
51
    "src/tsdb/tsdbReaderWriter.c"
H
Hongze Cheng 已提交
52
    "src/tsdb/tsdbUtil.c"
H
Hongze Cheng 已提交
53
    "src/tsdb/tsdbSnapshot.c"
54
    "src/tsdb/tsdbCacheRead.c"
H
Hongze Cheng 已提交
55
    "src/tsdb/tsdbRetention.c"
H
Hongze Cheng 已提交
56
    "src/tsdb/tsdbDiskData.c"
H
Hongze Cheng 已提交
57
    "src/tsdb/tsdbMergeTree.c"
H
Hongze Cheng 已提交
58
    "src/tsdb/tsdbDataIter.c"
H
Hongze Cheng 已提交
59

H
Hongze Cheng 已提交
60 61
    # tq
    "src/tq/tq.c"
62
    "src/tq/tqUtil.c"
63
    "src/tq/tqScan.c"
L
Liu Jicong 已提交
64
    "src/tq/tqMeta.c"
H
Hongze Cheng 已提交
65
    "src/tq/tqRead.c"
L
Liu Jicong 已提交
66
    "src/tq/tqOffset.c"
L
Liu Jicong 已提交
67 68 69
    "src/tq/tqPush.c"
    "src/tq/tqSink.c"
    "src/tq/tqCommit.c"
70
    "src/tq/tqRestore.c"
L
Liu Jicong 已提交
71 72
    "src/tq/tqSnapshot.c"
    "src/tq/tqOffsetSnapshot.c"
H
Hongze Cheng 已提交
73
)
X
Xiaoyu Wang 已提交
74 75 76 77 78 79 80 81 82 83

IF (TD_VNODE_PLUGINS)
  target_sources(
    vnode
    PRIVATE
    ${TD_ENTERPRISE_DIR}/src/plugins/vnode/src/tsdbCompact.c
    ${TD_ENTERPRISE_DIR}/src/plugins/vnode/src/vnodeCompact.c
  )
ENDIF ()

Y
yihaoDeng 已提交
84
IF (NOT ${TD_LINUX})
H
Hongze Cheng 已提交
85 86
target_include_directories(
    vnode
H
Hongze Cheng 已提交
87
    PUBLIC "inc"
H
Hongze Cheng 已提交
88
    PUBLIC "src/inc"
dengyihao's avatar
dengyihao 已提交
89
    PUBLIC "${TD_SOURCE_DIR}/include/libs/scalar"
90
    PUBLIC "${TD_SOURCE_DIR}/contrib/rocksdb/include"
H
Hongze Cheng 已提交
91
)
Y
yihaoDeng 已提交
92 93 94 95 96 97 98 99 100
ELSE()
target_include_directories(
    vnode
    PUBLIC "inc"
    PUBLIC "src/inc"
    PUBLIC "${TD_SOURCE_DIR}/include/libs/scalar"
)
ENDIF (NOT ${TD_LINUX})

101
IF (TD_LINUX)
Y
yihaoDeng 已提交
102 103 104 105 106 107 108 109 110
target_include_directories(
      vnode 
      PUBLIC "${TD_SOURCE_DIR}/deps/${TD_DEPS_DIR}/rocksdb_static"
    )

    target_link_directories(
        vnode 
        PUBLIC "${TD_SOURCE_DIR}/deps/${TD_DEPS_DIR}/rocksdb_static"
    )
H
Hongze Cheng 已提交
111 112 113 114 115 116 117 118
target_link_libraries(
    vnode
    PUBLIC os
    PUBLIC util
    PUBLIC common
    PUBLIC tfs
    PUBLIC wal
    PUBLIC qworker
S
Shengliang Guan 已提交
119
    PUBLIC sync
H
Hongze Cheng 已提交
120 121
    PUBLIC executor
    PUBLIC scheduler
H
Hongze Cheng 已提交
122
    PUBLIC tdb
H
Hongze Cheng 已提交
123 124 125

    # PUBLIC bdb
    # PUBLIC scalar
dengyihao's avatar
dengyihao 已提交
126
    PUBLIC rocksdb
H
Hongze Cheng 已提交
127 128
    PUBLIC transport
    PUBLIC stream
dengyihao's avatar
dengyihao 已提交
129
    PUBLIC index
H
Hongze Cheng 已提交
130
)
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
ELSE()
target_link_libraries(
    vnode
    PUBLIC os
    PUBLIC util
    PUBLIC common
    PUBLIC tfs
    PUBLIC wal
    PUBLIC qworker
    PUBLIC sync
    PUBLIC executor
    PUBLIC scheduler
    PUBLIC tdb

    # PUBLIC bdb
    # PUBLIC scalar
    PUBLIC rocksdb
    PUBLIC transport
    PUBLIC stream
    PUBLIC index
)
ENDIF()
M
Minglei Jin 已提交
153 154 155 156 157

IF (TD_GRANT)
  TARGET_LINK_LIBRARIES(vnode PUBLIC grant)
ENDIF ()

H
Hongze Cheng 已提交
158
target_compile_definitions(vnode PUBLIC -DMETA_REFACT)
H
Hongze Cheng 已提交
159 160 161

if(${BUILD_WITH_INVERTEDINDEX})
    add_definitions(-DUSE_INVERTED_INDEX)
dengyihao's avatar
dengyihao 已提交
162
endif(${BUILD_WITH_INVERTEDINDEX})
H
Hongze Cheng 已提交
163

dengyihao's avatar
dengyihao 已提交
164 165 166 167 168 169
if(${BUILD_WITH_ROCKSDB})
    add_definitions(-DUSE_ROCKSDB)
endif(${BUILD_WITH_ROCKSDB})



H
Hongze Cheng 已提交
170
if(${BUILD_TEST})
C
Cary Xu 已提交
171
    add_subdirectory(test)
H
Hongze Cheng 已提交
172
endif(${BUILD_TEST})