summaryrefslogtreecommitdiff
path: root/src/mongo/client/embedded/SConscript
blob: 16d45f9fba5c18fb6ac82f1bb3e850eb9cdf6d4b (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
# -*- mode: python; -*-

Import("env")

env = env.Clone()

env.Library(
    target="service_entry_point_embedded",
    source=[
        "service_entry_point_embedded.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/transport/service_entry_point',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/auth/authcore',
        '$BUILD_DIR/mongo/db/auth/authmongod',
        '$BUILD_DIR/mongo/db/command_can_run_here',
        '$BUILD_DIR/mongo/db/ops/write_ops_exec',
        '$BUILD_DIR/mongo/db/rw_concern_d',
        '$BUILD_DIR/mongo/db/s/sharding',
        '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file',
        '$BUILD_DIR/mongo/db/storage/storage_engine_metadata',
    ],
)

env.Library(
    target="service_context_embedded",
    source=[
        "service_context_embedded.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/transport/service_entry_point',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/concurrency/lock_manager',
        '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file',
        '$BUILD_DIR/mongo/db/storage/storage_engine_metadata',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/mongo/util/options_parser/options_parser_init',
        'service_entry_point_embedded',
    ],
)

env.Library(
    target='embedded',
    source=[
        'embedded.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/authz_manager_external_state_factory_d',
        '$BUILD_DIR/mongo/db/catalog/catalog_impl',
        '$BUILD_DIR/mongo/db/commands/dcommands',
        '$BUILD_DIR/mongo/db/dbdirectclient',
        '$BUILD_DIR/mongo/db/mongod_options',
        '$BUILD_DIR/mongo/db/op_observer_d',
        '$BUILD_DIR/mongo/db/repair_database_and_check_version',
        '$BUILD_DIR/mongo/db/repl/storage_interface_impl',
        '$BUILD_DIR/mongo/db/repl/repl_coordinator_impl',
        '$BUILD_DIR/mongo/db/startup_warnings_mongod',
        '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger',
        '$BUILD_DIR/mongo/mongod_options_init',
        '$BUILD_DIR/mongo/util/net/network',
        '$BUILD_DIR/mongo/util/version_impl',
        'service_context_embedded',
        'service_entry_point_embedded',
    ]
)

capi = env.Library(
    target='mongo_embedded_capi',
    source=[
        'libmongodbcapi.cpp',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/transport/transport_layer_mock',
        'embedded',
    ]
)

env.Alias('embedded_capi', capi)

capiTest = env.Program(
    target='mongo_embedded_capi_test',
    source=[
        'libmongodbcapi_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/unittest/unittest',
        '$BUILD_DIR/mongo/util/net/network',
        'mongo_embedded_capi',
    ],
)

env.RegisterUnitTest(capiTest[0])
env.Alias('embedded_capi', capiTest)

if not env['MONGO_HAVE_LIBMONGOC']:
    Return()

embeddedTransport = env.Library(
    target='mongo_embedded_transport',
    source=[
       'embedded_transport_layer.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        'mongo_embedded_capi',
    ],
    SYSLIBDEPS=[
        'mongoc-1.0',
        'bson-1.0',
    ]
)

env.Alias('embedded_capi', embeddedTransport)

embeddedTransportTest = env.Program(
    target='mongo_embedded_transport_test',
    source=[
        'embedded_transport_layer_test.cpp',
        'functions_for_test.cpp',
    ],
    LIBDEPS=[
        'mongo_embedded_transport',
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/unittest/unittest',
    ]
)

env.Alias('embedded_capi', embeddedTransportTest)
env.RegisterUnitTest(embeddedTransportTest[0]);