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
|
# -*- mode: python; -*-
Import("env")
Import("get_option")
env = env.Clone()
yamlEnv = env.Clone()
yamlEnv.InjectThirdPartyIncludePaths(libraries=['yaml'])
env.Library(
target='embedded',
source=[
'embedded.cpp',
'embedded_auth_manager.cpp',
'embedded_auth_session.cpp',
'embedded_commands.cpp',
'embedded_ismaster.cpp',
'embedded_options.cpp',
'embedded_options_init.cpp',
'embedded_options_parser_init.cpp',
'index_create_impl_embedded.cpp',
'replication_coordinator_embedded.cpp',
'service_context_embedded.cpp',
'service_entry_point_embedded.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/auth/auth',
'$BUILD_DIR/mongo/db/catalog/catalog_impl',
'$BUILD_DIR/mongo/db/command_can_run_here',
'$BUILD_DIR/mongo/db/commands',
'$BUILD_DIR/mongo/db/commands/fsync_locked',
'$BUILD_DIR/mongo/db/commands/mongod_fcv',
'$BUILD_DIR/mongo/db/commands/standalone',
'$BUILD_DIR/mongo/db/concurrency/lock_manager',
'$BUILD_DIR/mongo/db/op_observer_d',
'$BUILD_DIR/mongo/db/repair_database_and_check_version',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/repl/replica_set_messages',
'$BUILD_DIR/mongo/db/repl/storage_interface_impl',
'$BUILD_DIR/mongo/db/rw_concern_d',
'$BUILD_DIR/mongo/db/s/sharding',
'$BUILD_DIR/mongo/db/server_options',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/service_entry_point_common',
'$BUILD_DIR/mongo/db/storage/mobile/storage_mobile',
'$BUILD_DIR/mongo/db/storage/storage_engine_common',
'$BUILD_DIR/mongo/db/storage/storage_engine_lock_file',
'$BUILD_DIR/mongo/db/storage/storage_engine_metadata',
'$BUILD_DIR/mongo/db/storage/storage_init_d',
'$BUILD_DIR/mongo/db/storage/storage_options',
'$BUILD_DIR/mongo/db/wire_version',
'$BUILD_DIR/mongo/rpc/client_metadata',
'$BUILD_DIR/mongo/util/options_parser/options_parser',
'$BUILD_DIR/mongo/util/version_impl',
]
)
env.Library(
target='mongo_embedded_capi',
source=[
'capi.cpp',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/rpc/protocol',
'$BUILD_DIR/mongo/transport/transport_layer_mock',
'embedded',
],
INSTALL_ALIAS=[
'mobile-dev',
],
)
if get_option('install-mode') == 'hygienic':
env.AutoInstall(
'include/mongo/embedded-v1/mongo/embedded',
source=['capi.h'],
INSTALL_ALIAS=[
'mobile-dev',
],
)
capiTest = yamlEnv.Program(
target='mongo_embedded_capi_test',
source=[
'capi_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/server_options_core',
'$BUILD_DIR/mongo/rpc/protocol',
'$BUILD_DIR/mongo/unittest/unittest',
'$BUILD_DIR/mongo/util/net/network',
'$BUILD_DIR/mongo/util/options_parser/options_parser',
'mongo_embedded_capi',
],
INSTALL_ALIAS=[
'mobile-test',
],
)
env.RegisterUnitTest(capiTest[0])
mongoed = yamlEnv.Program(
target='mongoed',
source=[
'mongoed_main.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/commands/shell_protocol',
'$BUILD_DIR/mongo/db/mongod_options',
'$BUILD_DIR/mongo/db/server_options',
'$BUILD_DIR/mongo/db/repl/repl_set_status_commands',
'$BUILD_DIR/mongo/transport/service_entry_point',
'$BUILD_DIR/mongo/transport/transport_layer_manager',
'$BUILD_DIR/mongo/util/signal_handlers',
'embedded',
],
INSTALL_ALIAS=[
'mobile-test',
],
)
env.Alias('all', mongoed) # This ensures it compiles and links, but doesn't copy it anywhere.
hygienic = get_option('install-mode') == 'hygienic'
if not hygienic:
env.Install('#/', mongoed)
if not env['MONGO_HAVE_LIBMONGOC']:
Return()
env.Library(
target='mongo_embedded_mongoc_client',
source=[
'mongoc_client.cpp',
],
LIBDEPS=[
'mongo_embedded_capi',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/third_party/shim_zlib',
],
SYSLIBDEPS=[
'mongoc-1.0',
'bson-1.0',
],
INSTALL_ALIAS=[
'mobile-dev',
],
)
if get_option('install-mode') == 'hygienic':
env.AutoInstall(
'include/mongo/embedded-v1/mongo/embedded',
source=['mongoc_client.h'],
INSTALL_ALIAS=[
'mobile-dev',
],
)
clientTest = yamlEnv.Program(
target='mongo_embedded_mongoc_client_test',
source=[
'mongo_embedded_mongoc_client_test.cpp',
'functions_for_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/server_options_core',
'$BUILD_DIR/mongo/unittest/unittest',
'$BUILD_DIR/mongo/util/options_parser/options_parser',
'mongo_embedded_mongoc_client',
],
INSTALL_ALIAS=[
'mobile-test',
],
)
env.RegisterUnitTest(clientTest[0]);
|