-
Notifications
You must be signed in to change notification settings - Fork 100
/
SConscript
152 lines (136 loc) · 4.37 KB
/
SConscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# -*- mode: python -*-
Import("env")
env = env.Clone()
dynamic_syslibdeps = []
conf = Configure(env)
if conf.CheckLibWithHeader("lz4", ["lz4.h","lz4hc.h"], "C", "LZ4_versionNumber();", autoadd=False ):
dynamic_syslibdeps.append("lz4")
env.InjectMongoIncludePaths()
env.InjectThirdParty(libraries=['s2',]) # for Encoder and Decoder
conf.Finish()
env.Library(
target= 'storage_rocks_base',
source= [
'src/rocks_compaction_scheduler.cpp',
'src/rocks_counter_manager.cpp',
'src/rocks_global_options.cpp',
'src/rocks_engine.cpp',
'src/rocks_record_store.cpp',
'src/rocks_recovery_unit.cpp',
'src/rocks_index.cpp',
'src/rocks_durability_manager.cpp',
'src/rocks_snapshot_manager.cpp',
'src/rocks_util.cpp',
'src/rocks_oplog_manager.cpp',
'src/rocks_begin_transaction_block.cpp',
'src/rocks_prepare_conflict.cpp',
# TODO(wolfkdy): move totdb files into a seperate compile-unit
'src/totdb/totransaction_impl.cpp',
'src/totdb/totransaction_db_impl.cpp',
'src/totdb/totransaction_prepare_iterator.cpp',
env.Idlc('src/rocks_parameters.idl')[0],
env.Idlc('src/rocks_global_options.idl')[0],
'src/rocks_parameters.cpp',
],
LIBDEPS= [
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/namespace_string',
'$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/prepare_conflict_tracker',
'$BUILD_DIR/mongo/db/catalog/collection_options',
'$BUILD_DIR/mongo/db/concurrency/lock_manager',
'$BUILD_DIR/mongo/db/concurrency/write_conflict_exception',
'$BUILD_DIR/mongo/db/curop',
'$BUILD_DIR/mongo/db/index/index_descriptor',
'$BUILD_DIR/mongo/db/storage/bson_collection_catalog_entry',
'$BUILD_DIR/mongo/db/storage/index_entry_comparison',
'$BUILD_DIR/mongo/db/storage/journal_listener',
'$BUILD_DIR/mongo/db/storage/key_string',
'$BUILD_DIR/mongo/db/storage/oplog_hack',
'$BUILD_DIR/mongo/db/storage/kv/kv_prefix',
'$BUILD_DIR/mongo/util/background_job',
'$BUILD_DIR/mongo/util/concurrency/ticketholder',
'$BUILD_DIR/mongo/util/processinfo',
'$BUILD_DIR/third_party/shim_snappy',
'$BUILD_DIR/third_party/s2/util/coding/coding',
],
LIBDEPS_PRIVATE= [
'$BUILD_DIR/mongo/db/snapshot_window_options',
],
SYSLIBDEPS=["rocksdb",
"z",
"bz2"] #z and bz2 are dependencies for rocks
+ dynamic_syslibdeps
)
env.Library(
target= 'storage_rocks',
source= [
'src/rocks_init.cpp',
'src/rocks_options_init.cpp',
'src/rocks_record_store_mongod.cpp',
'src/rocks_server_status.cpp',
],
LIBDEPS= [
'storage_rocks_base',
],
PROGDEPS_DEPENDENTS=['$BUILD_DIR/mongo/mongod']
)
env.Library(
target= 'storage_rocks_mock',
source= [
'src/rocks_record_store_mock.cpp',
],
LIBDEPS= [
'storage_rocks_base',
]
)
env.CppUnitTest(
target='storage_rocks_index_test',
source=[
'src/rocks_index_test.cpp'
],
LIBDEPS=[
'storage_rocks_mock',
'$BUILD_DIR/mongo/db/storage/sorted_data_interface_test_harness'
]
)
env.CppUnitTest(
target='storage_rocks_record_store_test',
source=[
'src/rocks_record_store_test.cpp'
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/storage/record_store_test_harness',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/repl/replmocks',
'$BUILD_DIR/mongo/util/clock_source_mock',
'storage_rocks_mock',
]
)
env.CppUnitTest(
target='storage_rocks_recovery_unit_test',
source=[
'src/rocks_recovery_unit_test.cpp',
],
LIBDEPS=[
'storage_rocks_mock',
'$BUILD_DIR/mongo/util/clock_source_mock',
'$BUILD_DIR/mongo/db/storage/test_harness_helper',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/index/index_access_methods',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/repl/replmocks',
],
)
env.CppUnitTest(
target='totdb_test',
source=[
'src/totdb/totransaction_test.cpp',
],
LIBDEPS=[
'storage_rocks_mock',
],
)