summaryrefslogtreecommitdiff
path: root/src/mongo/db/free_mon/SConscript
blob: 0bfce9a48a813327942ffcfda40313e90f0990cd (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
# -*- mode: python -*-
Import("env")
Import("get_option")

env = env.Clone()

fmEnv = env.Clone()
fmEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])

fmEnv.Library(
    target='free_mon',
    source=[
        'free_mon_queue.cpp',
        'free_mon_storage.cpp',
        env.Idlc('free_mon_protocol.idl')[0],
        env.Idlc('free_mon_storage.idl')[0],
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/concurrency/lock_manager',
        '$BUILD_DIR/mongo/db/dbhelpers',
        '$BUILD_DIR/mongo/db/ftdc/ftdc',
        '$BUILD_DIR/mongo/idl/idl_parser',
        '$BUILD_DIR/third_party/shim_snappy',
    ],
)

if get_option("enable-free-mon") == "on":
    fmEnv.Library(
        target='free_mon_mongod',
        source=[
            'free_mon_mongod.cpp',
            'http_client_curl.cpp',
            #'http_client_curl.cpp' if not env.TargetOSIs('windows') else 'http_client_winhttp.cpp',
        ],
        LIBDEPS=[
            'free_mon',
        ],
        SYSLIBDEPS=[
            'libcurld' if env.TargetOSIs('windows') else 'curl',
    #        'winhttp' if env.TargetOSIs('windows') else 'curl',
        ],
    )
else:
    fmEnv.Library(
        target='free_mon_mongod',
        source=[
            'free_mon_stub.cpp',
        ],
    )


env.CppUnitTest(
    target='free_mon_test',
    source=[
        'free_mon_queue_test.cpp',
        'free_mon_storage_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/repl/replmocks',
        '$BUILD_DIR/mongo/db/repl/storage_interface_impl',
        '$BUILD_DIR/mongo/db/serveronly',
        '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
        '$BUILD_DIR/mongo/db/service_context_d',
        '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
        '$BUILD_DIR/mongo/unittest/concurrency',
        '$BUILD_DIR/mongo/util/clock_source_mock',
        'free_mon',
    ],
)