summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/SConscript
blob: 378e475dc4460883f23164240092413a6b539f5f (plain)
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# -*- mode: python -*-

Import("env")
Import("has_option")

env = env.Clone()

env.Library(
    target="test_commands_enabled",
    source=[
        "test_commands_enabled.cpp",
    ]
)

env.Library(
    target='server_status_core',
    source=[
        'server_status_internal.cpp',
        'server_status_metric.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/util/net/network',
    ]
)

env.Library(
    target='server_status',
    source=[
        'server_status.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/commands',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/transport/service_executor',
    ],
)

env.Library(
    target="write_commands_common",
    source=[
        "write_commands/write_commands_common.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/ops/write_ops_parsers',
    ],
)

env.Library(
    target="core",
    source=[
        "authentication_commands.cpp",
        "conn_pool_stats.cpp",
        "conn_pool_sync.cpp",
        "connection_status.cpp",
        "copydb_common.cpp",
        "end_sessions_command.cpp",
        "fail_point_cmd.cpp",
        "feature_compatibility_version_command_parser.cpp",
        "find_and_modify_common.cpp",
        "generic.cpp",
        "hashcmd.cpp",
        "isself.cpp",
        "kill_all_sessions_by_pattern_command.cpp",
        "kill_all_sessions_command.cpp",
        "kill_sessions_command.cpp",
        "mr_common.cpp",
        "parameters.cpp",
        "reap_logical_session_cache_now.cpp",
        "refresh_logical_session_cache_now.cpp",
        "refresh_sessions_command.cpp",
        "refresh_sessions_command_internal.cpp",
        "rename_collection_common.cpp",
        "start_session_command.cpp",
        "user_management_commands_common.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/client/clientdriver',
        '$BUILD_DIR/mongo/db/audit',
        '$BUILD_DIR/mongo/db/auth/authcommon',
        '$BUILD_DIR/mongo/db/auth/authorization_manager_global',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
        '$BUILD_DIR/mongo/db/common',
        '$BUILD_DIR/mongo/db/curop',
        '$BUILD_DIR/mongo/db/exec/working_set',
        '$BUILD_DIR/mongo/db/index/key_generator',
        '$BUILD_DIR/mongo/db/index_names',
        '$BUILD_DIR/mongo/db/kill_sessions',
        '$BUILD_DIR/mongo/db/lasterror',
        '$BUILD_DIR/mongo/db/log_process_details',
        '$BUILD_DIR/mongo/db/logical_session_cache',
        '$BUILD_DIR/mongo/db/logical_session_cache_impl',
        '$BUILD_DIR/mongo/db/logical_session_id',
        '$BUILD_DIR/mongo/db/logical_session_id_helpers',
        '$BUILD_DIR/mongo/db/matcher/expressions',
        '$BUILD_DIR/mongo/db/repl/isself',
        '$BUILD_DIR/mongo/db/repl/repl_coordinator_global',
        '$BUILD_DIR/mongo/db/server_options',
        '$BUILD_DIR/mongo/db/server_parameters',
        '$BUILD_DIR/mongo/db/startup_warnings_common',
        '$BUILD_DIR/mongo/db/stats/counters',
        '$BUILD_DIR/mongo/db/stats/timer_stats',
        '$BUILD_DIR/mongo/db/views/views',
        '$BUILD_DIR/mongo/logger/parse_log_component_settings',
        '$BUILD_DIR/mongo/s/client/sharding_client',
        '$BUILD_DIR/mongo/s/coreshard',
        '$BUILD_DIR/mongo/s/write_ops/batch_write_types',
        '$BUILD_DIR/mongo/scripting/scripting_common',
        '$BUILD_DIR/mongo/transport/message_compressor',
        '$BUILD_DIR/mongo/transport/transport_layer_common',
        '$BUILD_DIR/mongo/util/cmdline_utils/cmdline_utils',
        '$BUILD_DIR/mongo/util/ntservice',
        '$BUILD_DIR/mongo/util/processinfo',
        'server_status_core',
    ],
)

env.Library(
    target="dcommands_fsync",
    source=[
        "fsync.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/concurrency/write_conflict_exception',
        '$BUILD_DIR/mongo/db/curop',
        '$BUILD_DIR/mongo/db/storage/mmap_v1/storage_mmapv1',
    ],
)

env.Library(
    target="dcommands_fcv",
    source=[
        "feature_compatibility_version.cpp",
    ],
    LIBDEPS=[
        'core',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/dbdirectclient',
    ],
)

# Commands that should only be present in mongod
env.Library(
    target="dcommands",
    source=[
        "apply_ops_cmd.cpp",
        "clone.cpp",
        "clone_collection.cpp",
        "collection_to_capped.cpp",
        "compact.cpp",
        "copydb.cpp",
        "copydb_start_commands.cpp",
        "count_cmd.cpp",
        "cpuload.cpp",
        "create_indexes.cpp",
        "current_op.cpp",
        "dbcheck.cpp",
        "dbcommands.cpp",
        "dbhash.cpp",
        "distinct.cpp",
        "do_txn_cmd.cpp",
        "driverHelpers.cpp",
        "drop_indexes.cpp",
        "eval.cpp",
        "explain_cmd.cpp",
        "find_and_modify.cpp",
        "find_cmd.cpp",
        "geo_near_cmd.cpp",
        "get_last_error.cpp",
        "getmore_cmd.cpp",
        "group_cmd.cpp",
        "haystack.cpp",
        "index_filter_commands.cpp",
        "kill_op.cpp",
        "killcursors_cmd.cpp",
        "list_collections.cpp",
        "list_databases.cpp",
        "list_indexes.cpp",
        "lock_info.cpp",
        "mr.cpp",
        "oplog_application_checks.cpp",
        "oplog_note.cpp",
        "parallel_collection_scan.cpp",
        "pipeline_command.cpp",
        "plan_cache_commands.cpp",
        "rename_collection_cmd.cpp",
        "repair_cursor.cpp",
        "resize_oplog.cpp",
        "restart_catalog_command.cpp",
        "run_aggregate.cpp",
        "set_feature_compatibility_version_command.cpp",
        "snapshot_management.cpp",
        "test_commands.cpp",
        "top_command.cpp",
        "touch.cpp",
        "user_management_commands.cpp",
        "validate.cpp",
        "write_commands/write_commands.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/client/clientdriver',
        '$BUILD_DIR/mongo/db/auth/authmongod',
        '$BUILD_DIR/mongo/db/background',
        '$BUILD_DIR/mongo/db/catalog/catalog_helpers',
        '$BUILD_DIR/mongo/db/catalog/catalog_impl',
        '$BUILD_DIR/mongo/db/catalog/collection',
        '$BUILD_DIR/mongo/db/catalog/index_key_validate',
        '$BUILD_DIR/mongo/db/cloner',
        '$BUILD_DIR/mongo/db/command_can_run_here',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/exec/stagedebug_cmd',
        '$BUILD_DIR/mongo/db/index/index_access_method',
        '$BUILD_DIR/mongo/db/index_d',
        '$BUILD_DIR/mongo/db/lasterror',
        '$BUILD_DIR/mongo/db/ops/write_ops_parsers',
        '$BUILD_DIR/mongo/db/query_exec',
        '$BUILD_DIR/mongo/db/repair_database',
        '$BUILD_DIR/mongo/db/repl/dbcheck',
        '$BUILD_DIR/mongo/db/repl/isself',
        '$BUILD_DIR/mongo/db/repl/oplog',
        '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
        '$BUILD_DIR/mongo/db/rw_concern_d',
        '$BUILD_DIR/mongo/db/server_options_core',
        '$BUILD_DIR/mongo/db/stats/serveronly_stats',
        '$BUILD_DIR/mongo/db/storage/mmap_v1/storage_mmapv1',
        '$BUILD_DIR/mongo/db/views/views_mongod',
        '$BUILD_DIR/mongo/s/catalog/sharding_catalog_manager',
        '$BUILD_DIR/mongo/s/client/parallel',
        'core',
        'current_op_common',
        'dcommands_fcv',
        'dcommands_fsync',
        'killcursors_common',
        'write_commands_common',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/ops/write_ops_exec',
    ],
)

env.Library(
    target='killcursors_common',
    source=[
        'killcursors_common.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/audit',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/auth/authorization_manager_global',
        '$BUILD_DIR/mongo/db/query/command_request_response',
    ],
)

env.Library(
    target='current_op_common',
    source=[
        'current_op_common.cpp'
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/namespace_string',
        '$BUILD_DIR/mongo/db/pipeline/aggregation_request',
        '$BUILD_DIR/mongo/db/query/command_request_response',
        '$BUILD_DIR/mongo/db/service_context',
    ]
)

env.Library(
    target="list_collections_filter",
    source=[
        'list_collections_filter.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ],
)

env.CppUnitTest(
    target="list_collections_filter_test",
    source=[
        "list_collections_filter_test.cpp"
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/commands/list_collections_filter',
    ],
)

env.CppUnitTest(
    target="index_filter_commands_test",
    source=[
        "index_filter_commands_test.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/query/query_planner",
        "$BUILD_DIR/mongo/db/query/query_test_service_context",
        "$BUILD_DIR/mongo/db/serveronly",
        "$BUILD_DIR/mongo/db/service_context_d",
        "dcommands",
    ],
)

env.CppUnitTest(
    target="mr_test",
    source=[
        "mr_test.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/serveronly",
        "$BUILD_DIR/mongo/db/service_context_d",
        "dcommands",
    ],
)

env.CppUnitTest(
    target="plan_cache_commands_test",
    source=[
        "plan_cache_commands_test.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/query/query_planner",
        "$BUILD_DIR/mongo/db/query/query_test_service_context",
        "$BUILD_DIR/mongo/db/serveronly",
        "$BUILD_DIR/mongo/db/service_context_d",
        "dcommands",
    ],
)

if has_option('use-cpu-profiler'):
    profEnv = env.Clone()
    profEnv.InjectThirdPartyIncludePaths('gperftools')
    profEnv.Library(
        target='cpuprofiler',
        source=[
            'cpuprofile.cpp',
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/db/commands',
            '$BUILD_DIR/mongo/db/db_raii',
        ],
        LIBDEPS_DEPENDENTS=[
            '$BUILD_DIR/mongo/mongodmain',
        ],
    )