summaryrefslogtreecommitdiff
path: root/src/mongo/tools/SConscript
blob: 10acd257809e845f999576a1020f6c2c399937cb (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
# -*- mode: python; -*-

Import('env')
Import('get_option')

env = env.Clone()

yamlEnv = env.Clone()
yamlEnv.InjectThirdParty(libraries=['yaml'])

mongobridge = env.Program(
    target="mongobridge",
    source=[
        "bridge.cpp",
        "bridge_commands.cpp",
        "mongobridge_options.cpp",
        env.Idlc("mongobridge_options.idl")[0],
        "mongobridge_options_init.cpp"
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/dbmessage',
        '$BUILD_DIR/mongo/rpc/rpc',
        '$BUILD_DIR/mongo/transport/message_compressor',
        '$BUILD_DIR/mongo/transport/message_compressor_options_server',
        '$BUILD_DIR/mongo/transport/service_entry_point',
        '$BUILD_DIR/mongo/transport/service_executor',
        '$BUILD_DIR/mongo/transport/transport_layer',
        '$BUILD_DIR/mongo/util/net/network',
        '$BUILD_DIR/mongo/util/options_parser/options_parser_init',
        '$BUILD_DIR/mongo/util/signal_handlers',
    ],
    AIB_COMPONENT='tools',
)

mongoebench = yamlEnv.Program(
    target='mongoebench',
    source=[
        'mongoebench_main.cpp',
        'mongoebench_options.cpp',
        'mongoebench_options_init.cpp',
        env.Idlc('mongoebench_options.idl')[0],
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/dbdirectclient',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger' if get_option('wiredtiger') == 'on' else [],
        '$BUILD_DIR/mongo/embedded/embedded',
        '$BUILD_DIR/mongo/embedded/embedded_integration_helpers',
        '$BUILD_DIR/mongo/shell/benchrun',
        '$BUILD_DIR/mongo/util/signal_handlers',
    ],
    AIB_COMPONENT="embedded-test",
    AIB_COMPONENTS_EXTRA=[
        "tests",
        "benchmarks",
    ],
)

# TODO: remove this when hygienic is driving all tarball creation
install_mongoebench = env.Install("#/", mongoebench)
env.Alias("install-embedded-test", [install_mongoebench[0]])
install_mongobridge = env.Install("#/", mongobridge)
env.Alias("install-tools", [install_mongobridge[0]])

env.Alias('all', mongoebench)  # This ensures it compiles and links, but doesn't copy it anywhere.