summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/kv/SConscript
blob: b00678c3d264eb7350f64e485c07a40ea508b0a8 (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
Import("env")

env.Library(
    target='kv_engine_core',
    source=[
        'kv_catalog.cpp',
        'kv_collection_catalog_entry.cpp',
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/concurrency/lock_manager',
        '$BUILD_DIR/mongo/db/index/index_descriptor',
        '$BUILD_DIR/mongo/db/namespace_string',
        '$BUILD_DIR/mongo/db/storage/bson_collection_catalog_entry',
        ],
    LIBDEPS_TAGS=[
        # Depends on KVDatabaseCatalogEntry::getIndex, which does not have
        # a unique definition.
        'incomplete',
    ],
    )

# Should not be referenced outside this SConscript file.
env.Library(
    target='kv_database_catalog_entry_core',
    source=['kv_database_catalog_entry.cpp'],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/storage/bson_collection_catalog_entry',
        '$BUILD_DIR/mongo/db/storage/kv/kv_engine_core',
    ],
    LIBDEPS_TAGS=[
        # Depends on KVDatabaseCatalogEntry::getIndex, which is not uniquely defined
        'incomplete',
    ],
)

# Should not be referenced outside this SConscript file.
env.Library(
    target='kv_storage_engine',
    source=['kv_storage_engine.cpp'],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/storage/kv/kv_engine_core',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        'kv_database_catalog_entry_core',
    ],
)

# KVDatabaseCatalogEntry::getIndex() depends on index access methods
# in $BUILD_DIR/mongo/serveronly.
env.Library(
    target='kv_engine',
    source=[
        'kv_database_catalog_entry_get_index.cpp',
        ],
    LIBDEPS=[
        'kv_database_catalog_entry_core',
        'kv_engine_core',
        'kv_storage_engine',
        ],
    LIBDEPS_TAGS=[
        # Depends on symbols from serverOnlyFiles
        'incomplete',
        ],
    )

# Stubs out KVDatabaseCatalogEntry::getIndex() for testing.
# Should not be referenced outside this SConscript file.
env.Library(
    target='kv_engine_mock',
    source=[
        'kv_database_catalog_entry_get_index_mock.cpp'
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/storage/storage_options',
        'kv_database_catalog_entry_core',
        'kv_engine_core',
        'kv_storage_engine',
        ]
    )

env.Library(
    target='kv_engine_test_harness',
    source=[
        'kv_engine_test_harness.cpp',
        'kv_engine_test_snapshots.cpp',
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/mongo/unittest/unittest',
        'kv_engine_core',
        ],
    LIBDEPS_TAGS=[
        # Depends on KVHarnessHelper::create which does not have a unique definition
        'incomplete',
    ],

    )

env.CppUnitTest(
    target='kv_database_catalog_entry_test',
    source=[
        'kv_database_catalog_entry_test.cpp',
        ],
    LIBDEPS=[
        'kv_engine_mock',
        '$BUILD_DIR/mongo/db/namespace_string',
        '$BUILD_DIR/mongo/db/catalog/collection_options',
        '$BUILD_DIR/mongo/db/storage/devnull/storage_devnull_core',
        '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store',
        ]
    )