summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/SConscript
blob: 48638bcd7262eed9e1b4f3cffb804681c8969ba8 (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
# -*- 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/util/net/network',
        '$BUILD_DIR/mongo/base'
        ]
    )

env.Library(
    target="core",
    source=[
        "authentication_commands.cpp",
        "conn_pool_stats.cpp",
        "conn_pool_sync.cpp",
        "connection_status.cpp",
        "copydb_common.cpp",
        "fail_point_cmd.cpp",
        "feature_compatibility_version_command_parser.cpp",
        "find_and_modify_common.cpp",
        "hashcmd.cpp",
        "isself.cpp",
        "mr_common.cpp",
        "rename_collection_common.cpp",
        "server_status.cpp",
        "parameters.cpp",
        "user_management_commands_common.cpp",
        "write_commands/write_commands_common.cpp",
        "generic.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/auth/serverauth',
        '$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/lasterror',
        '$BUILD_DIR/mongo/db/log_process_details',
        '$BUILD_DIR/mongo/db/matcher/expressions',
        '$BUILD_DIR/mongo/db/matcher/expressions_geo',
        '$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',
    ],
)

# 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",
        "dbcommands.cpp",
        "compact.cpp",
        "copydb.cpp",
        "copydb_start_commands.cpp",
        "count_cmd.cpp",
        "create_indexes.cpp",
        "current_op.cpp",
        "dbhash.cpp",
        "distinct.cpp",
        "driverHelpers.cpp",
        "drop_indexes.cpp",
        "eval.cpp",
        "explain_cmd.cpp",
        "feature_compatibility_version.cpp",
        "find_and_modify.cpp",
        "find_cmd.cpp",
        "fsync.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_note.cpp",
        "parallel_collection_scan.cpp",
        "pipeline_command.cpp",
        "plan_cache_commands.cpp",
        "rename_collection_cmd.cpp",
        "repair_cursor.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/index_key_validate',
        '$BUILD_DIR/mongo/db/clientcursor',
        '$BUILD_DIR/mongo/db/cloner',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/index/index_access_methods',
        '$BUILD_DIR/mongo/db/index_d',
        '$BUILD_DIR/mongo/db/lasterror',
        '$BUILD_DIR/mongo/db/ops/write_ops',
        '$BUILD_DIR/mongo/db/ops/write_ops_parsers',
        '$BUILD_DIR/mongo/db/pipeline/serveronly',
        '$BUILD_DIR/mongo/db/repair_database',
        '$BUILD_DIR/mongo/db/repl/isself',
        '$BUILD_DIR/mongo/db/repl/repl_coordinator_impl',
        '$BUILD_DIR/mongo/db/server_options_core',
        '$BUILD_DIR/mongo/db/stats/serveronly',
        '$BUILD_DIR/mongo/db/storage/mmap_v1/storage_mmapv1',
        '$BUILD_DIR/mongo/db/views/views_mongod',
        '$BUILD_DIR/mongo/s/client/parallel',
        'apply_ops_cmd_common',
        'core',
        'killcursors_common',
    ],
)

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='apply_ops_cmd_common',
    source=[
        'apply_ops_cmd_common.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/catalog/document_validation',
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/auth/authcore',
        '$BUILD_DIR/mongo/db/namespace_string',
        '$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_test_service_context",
        "$BUILD_DIR/mongo/db/serveronly",
    ],
)

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

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

if has_option('use-cpu-profiler'):
    profEnv = env.Clone()
    profEnv.InjectThirdPartyIncludePaths('gperftools')
    profEnv.Library('cpuprofiler',
        source=[
            'cpuprofile.cpp',
        ],
        LIBDEPS=[
        ],
        LIBDEPS_TAGS=[
            'illegal_cyclic_or_unresolved_dependencies_whitelisted',
        ],
    )