summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog/SConscript
blob: 99fc1cb47afeae2f99ce082dd6b9d08a5061831e (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
# -*- mode: python -*-

Import("env")

env.SConscript(
    dirs=[
        'legacy',
        'replset',
    ],
)

env.Library(
    target='catalog_types',
    source=[
        'type_actionlog.cpp',
        'type_changelog.cpp',
        'type_chunk.cpp',
        'type_collection.cpp',
        'type_config_version.cpp',
        'type_database.cpp',
        'type_lockpings.cpp',
        'type_locks.cpp',
        'type_mongos.cpp',
        'type_settings.cpp',
        'type_shard.cpp',
        'type_tags.cpp',
    ],
    LIBDEPS=[
        'mongo_version_range',
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/bson/util/bson_extract',
        '$BUILD_DIR/mongo/db/common',
    ]
)

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

env.Library(
    target='catalog_manager',
    source=[
        'catalog_cache.cpp',
        'catalog_manager.cpp',
        'catalog_manager_common.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/common',
        '$BUILD_DIR/mongo/s/write_ops/batch_write_types',
        '$BUILD_DIR/mongo/s/common',
        '$BUILD_DIR/mongo/s/catalog/catalog_types',
        '$BUILD_DIR/mongo/s/client/sharding_client',
        '$BUILD_DIR/mongo/s/shard_util',
        'dist_lock_manager',
    ],
    LIBDEPS_TAGS=[
        # Circular with coreshard for mongo::grid and mongo::DBConfig.
        'incomplete',
    ],
)

env.Library(
    target='forwarding_catalog_manager',
    source=[
        'forwarding_catalog_manager.cpp'
    ],
    LIBDEPS=[
        'catalog_manager',
        'dist_lock_catalog_impl',
        'legacy/catalog_manager_legacy',
        'replset/catalog_manager_replica_set',
        'replset/replset_dist_lock_manager',
    ]
)

env.Library(
    target='catalog_manager_mock',
    source=[
        'catalog_manager_mock.cpp',
    ],
    LIBDEPS=[
        'catalog_manager',
        'dist_lock_manager_mock',
    ]
)

env.CppUnitTest(
    target='catalog_types_test',
    source=[
        'type_changelog_test.cpp',
        'type_chunk_test.cpp',
        'type_collection_test.cpp',
        'type_config_version_test.cpp',
        'type_database_test.cpp',
        'type_lockpings_test.cpp',
        'type_locks_test.cpp',
        'type_mongos_test.cpp',
        'type_settings_test.cpp',
        'type_shard_test.cpp',
        'type_tags_test.cpp',
    ],
    LIBDEPS=[
        'catalog_types'
    ]
)

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

env.Library(
    target='dist_lock_manager_mock',
    source=[
        'dist_lock_manager_mock.cpp',
    ],
    LIBDEPS=[
        'dist_lock_manager',
        '$BUILD_DIR/mongo/unittest/unittest',
    ],
)

env.Library(
    target='dist_lock_catalog_interface',
    source=[
        'dist_lock_catalog.cpp',
    ],
    LIBDEPS=[
    ],
)

env.Library(
    target='dist_lock_catalog_impl',
    source=[
        'dist_lock_catalog_impl.cpp',
    ],
    LIBDEPS=[
        'catalog_types',
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/client/read_preference',
        '$BUILD_DIR/mongo/client/remote_command_targeter',
        '$BUILD_DIR/mongo/db/common',
        '$BUILD_DIR/mongo/db/query/command_request_response',
        '$BUILD_DIR/mongo/db/repl/read_concern_args',
        '$BUILD_DIR/mongo/rpc/command_status',
        '$BUILD_DIR/mongo/s/client/sharding_client',
        '$BUILD_DIR/mongo/s/write_ops/batch_write_types',
        '$BUILD_DIR/mongo/util/net/hostandport',
        'dist_lock_catalog_interface',
    ],
)

env.CppUnitTest(
    target='dist_lock_catalog_impl_test',
    source=[
        'dist_lock_catalog_impl_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/client/remote_command_targeter_mock',
        '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init',
        '$BUILD_DIR/mongo/executor/network_test_env',
        '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
        '$BUILD_DIR/mongo/s/coreshard',
        '$BUILD_DIR/mongo/s/mongoscore',
        'catalog_manager_mock',
        'dist_lock_catalog_impl',
    ]
)

env.Library(
    target='dist_lock_catalog_mock',
    source=[
        'dist_lock_catalog_mock.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/unittest/unittest',
        'catalog_types',
        'dist_lock_catalog_interface',
    ]
)