summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/SConscript
blob: 0e5a1ead912f4f85bb02c54e67637ebfb3fc2f54 (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
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.Library(
        target='index_descriptor',
        source=[
            'index_descriptor.cpp',
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/base',
            '$BUILD_DIR/mongo/db/catalog/collection',
            '$BUILD_DIR/mongo/db/catalog/index_catalog',
        ],
        LIBDEPS_PRIVATE=[
            '$BUILD_DIR/mongo/db/index_names',
            '$BUILD_DIR/mongo/db/namespace_string',
        ],
)

env.Library(
        target='duplicate_key_tracker',
        source=[
            'duplicate_key_tracker.cpp',
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/db/service_context',
        ],
        LIBDEPS_PRIVATE=[
            '$BUILD_DIR/mongo/base',
            '$BUILD_DIR/mongo/db/curop',
            '$BUILD_DIR/mongo/db/storage/index_entry_comparison',
        ],
)

env.Library(
        target='key_generator',
        source=[
            'btree_key_generator.cpp',
            'expression_keys_private.cpp',
            'sort_key_generator.cpp',
            'wildcard_key_generator.cpp',
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/base',
            '$BUILD_DIR/mongo/db/bson/dotted_path_support',
            '$BUILD_DIR/mongo/db/exec/working_set',
            '$BUILD_DIR/mongo/db/fts/base_fts',
            '$BUILD_DIR/mongo/db/geo/geoparser',
            '$BUILD_DIR/mongo/db/index_names',
            '$BUILD_DIR/mongo/db/mongohasher',
            '$BUILD_DIR/mongo/db/projection_exec_agg',
            '$BUILD_DIR/mongo/db/query/collation/collator_interface',
            '$BUILD_DIR/mongo/db/query/sort_pattern',
            '$BUILD_DIR/third_party/s2/s2',
            'expression_params',
            'index_descriptor',
        ],
)

env.Library(
        target='expression_params',
        source=[
            'expression_params.cpp',
            's2_common.cpp'
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/base',
            '$BUILD_DIR/mongo/bson/util/bson_extract',
            '$BUILD_DIR/mongo/db/geo/geometry',
            '$BUILD_DIR/mongo/db/geo/geoparser',
            '$BUILD_DIR/mongo/db/mongohasher',
            '$BUILD_DIR/mongo/db/query/collation/collator_interface',
            '$BUILD_DIR/mongo/db/storage/key_string',
            '$BUILD_DIR/third_party/s2/s2',
        ]
)

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

serveronlyEnv = env.Clone()
serveronlyEnv.InjectThirdParty(libraries=['snappy'])
serveronlyEnv.Library(
    target="index_access_method",
    source=[
        "index_access_method.cpp"
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/catalog/index_catalog_entry',
        '$BUILD_DIR/mongo/db/curop',
        '$BUILD_DIR/mongo/db/concurrency/write_conflict_exception',
        '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
        '$BUILD_DIR/mongo/db/storage/encryption_hooks',
        '$BUILD_DIR/mongo/db/storage/index_entry_comparison',
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/third_party/shim_snappy',
        'index_descriptor',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/logical_clock',
        '$BUILD_DIR/mongo/idl/server_parameter',
    ],
)

env.Library(
    target="index_access_methods",
    source=[
        "2d_access_method.cpp",
        "btree_access_method.cpp",
        "fts_access_method.cpp",
        "hash_access_method.cpp",
        "haystack_access_method.cpp",
        "index_access_method_factory_impl.cpp",
        "s2_access_method.cpp",
        "wildcard_access_method.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/query_exec',
        'index_access_method',
        'key_generator',
    ],
)

env.Library(
    target="index_build_interceptor",
    source=[
        "index_build_interceptor.cpp",
        env.Idlc('index_build_interceptor.idl')[0],
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        'duplicate_key_tracker',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/catalog/index_timestamp_helper',
        '$BUILD_DIR/mongo/db/multi_key_path_tracker',
        'index_access_methods',
    ],
)

env.CppUnitTest(
    target='db_index_test',
    source=[
        '2d_key_generator_test.cpp',
        'btree_key_generator_test.cpp',
        'hash_key_generator_test.cpp',
        's2_key_generator_test.cpp',
        'sort_key_generator_test.cpp',
        'wildcard_key_generator_test.cpp',
    ],
    LIBDEPS=[
        'key_generator',
        "$BUILD_DIR/mongo/db/matcher/expressions",
        '$BUILD_DIR/mongo/db/mongohasher',
        '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
        '$BUILD_DIR/mongo/db/query/query_test_service_context',
    ],
)