summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/SConscript
blob: 8525401fb724a9490e59f69778cbc72f672dd6c7 (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

Import('env')

env.Library(
    target='field_path',
    source=[
        'field_path.cpp',
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/util/foundation',
        ]
    )

env.CppUnitTest(
    target='field_path_test',
    source='field_path_test.cpp',
    LIBDEPS=[
        'field_path',
        ],
    )

env.Library(
    target='document_value',
    source=[
        'document.cpp',
        'value.cpp',
        ],
    LIBDEPS=[
        'field_path',
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/util/foundation',
        '$BUILD_DIR/mongo/util/intrusive_counter',
        ]
    )

env.CppUnitTest(
    target='document_value_test',
    source='document_value_test.cpp',
    LIBDEPS=[
        'document_value',
        ],
    )

env.CppUnitTest(
    target='document_source_test',
    source='document_source_test.cpp',
    LIBDEPS=[
        'document_source',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/util/clock_source_mock',
        '$BUILD_DIR/mongo/executor/thread_pool_task_executor',
        '$BUILD_DIR/mongo/executor/network_interface_thread_pool',
        '$BUILD_DIR/mongo/executor/network_interface_factory'
        ],
    )

env.Library(
    target='dependencies',
    source=[
        'dependencies.cpp',
        ],
    LIBDEPS=[
        'document_value',
        'field_path',
    ]
)

env.Library(
    target='expression',
    source=[
        'expression.cpp',
        ],
    LIBDEPS=[
        'dependencies',
        'document_value',
    ]
)

env.Library(
    target='accumulator',
    source=[
        'accumulator.cpp',
        'accumulator_add_to_set.cpp',
        'accumulator_avg.cpp',
        'accumulator_first.cpp',
        'accumulator_last.cpp',
        'accumulator_min_max.cpp',
        'accumulator_push.cpp',
        'accumulator_std_dev.cpp',
        'accumulator_sum.cpp',
        ],
    LIBDEPS=[
        'document_value',
        '$BUILD_DIR/mongo/util/summation',
        'expression',
        'field_path',
    ]
)

docSourceEnv = env.Clone()
docSourceEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])
docSourceEnv.Library(
    target='document_source',
    source=[
        'document_source.cpp',
        'document_source_geo_near.cpp',
        'document_source_graph_lookup.cpp',
        'document_source_group.cpp',
        'document_source_index_stats.cpp',
        'document_source_limit.cpp',
        'document_source_lookup.cpp',
        'document_source_match.cpp',
        'document_source_merge_cursors.cpp',
        'document_source_mock.cpp',
        'document_source_out.cpp',
        'document_source_project.cpp',
        'document_source_redact.cpp',
        'document_source_sample.cpp',
        'document_source_sample_from_random_cursor.cpp',
        'document_source_skip.cpp',
        'document_source_sort.cpp',
        'document_source_unwind.cpp',
        ],
    LIBDEPS=[
        'accumulator',
        'dependencies',
        'document_value',
        'expression',
        '$BUILD_DIR/mongo/client/clientdriver',
        '$BUILD_DIR/mongo/db/bson/dotted_path_support',
        '$BUILD_DIR/mongo/db/matcher/expressions',
        '$BUILD_DIR/mongo/db/matcher/expression_algo',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger_customization_hooks',
        '$BUILD_DIR/third_party/shim_snappy',
    ],
    LIBDEPS_TAGS=[
        # Inclusion of sorter.cpp causes a dependency on mongo::isMongos,
        # which is not uniquely defined
        'incomplete'
    ],

)

env.Library(
    target='pipeline',
    source=[
        'pipeline.cpp',
        ],
    LIBDEPS=[
        'dependencies',
        'document_source',
        'document_value',
        '$BUILD_DIR/mongo/db/auth/authorization_manager_global',
        '$BUILD_DIR/mongo/db/auth/authcore',
        '$BUILD_DIR/mongo/db/bson/dotted_path_support',
        '$BUILD_DIR/mongo/db/query/collation/collation_serializer',
        '$BUILD_DIR/mongo/db/query/collation/collator_factory_interface',
        '$BUILD_DIR/mongo/db/repl/read_concern_args',
        '$BUILD_DIR/mongo/db/storage/storage_options',
    ]
)

env.CppUnitTest(
    target='agg_expression_test',
    source='expression_test.cpp',
    LIBDEPS=[
        'accumulator',
        'expression',
        ],
    )

env.CppUnitTest(
    target='accumulator_test',
    source='accumulator_test.cpp',
    LIBDEPS=[
        'accumulator',
        ],
    )

env.CppUnitTest(
    target='pipeline_test',
    source='pipeline_test.cpp',
    LIBDEPS=[
        'pipeline',
        '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init',
        '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
        '$BUILD_DIR/mongo/db/query/query_test_service_context',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/db/service_context_noop_init',
        ],
    )

env.CppUnitTest(
    target='lookup_set_cache_test',
    source=[
        'lookup_set_cache_test.cpp',
    ],
    LIBDEPS=[
        'document_value',
        '$BUILD_DIR/mongo/base',
    ]
)