summaryrefslogtreecommitdiff
path: root/src/mongo/platform/SConscript
blob: 193a62de65c35d4da321feedb8f6f7b1ed4a470d (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
# -*- mode: python -*-

Import([
    "env",
    "get_option",
])

env = env.Clone()
env.CppUnitTest(
    target='platform_test',
    source=[
        'atomic_proxy_test.cpp',
        'atomic_word_test.cpp',
        'bits_test.cpp',
        'endian_test.cpp',
        'mutex_test.cpp',
        'process_id_test.cpp',
        'random_test.cpp',
        'source_location_test.cpp',
        'stack_locator_test.cpp',
        'decimal128_test.cpp',
        'decimal128_bson_test.cpp',
        'overflow_arithmetic_test.cpp'
    ],
)

env.Benchmark(
    target='endian_bm',
    source=[
        'endian_bm.cpp',
    ],
    LIBDEPS=[
    ],
)

if not get_option("link-model") == "dynamic":
    Return()

env.Library(
    target="visibility_test_libcommon",
    source=[
        "visibility_test_libcommon.cpp",
    ],
    LIBDEPS_NO_INHERIT=[
        '$BUILD_DIR/third_party/shim_allocator',
        '$BUILD_DIR/shim_crt',
        '$BUILD_DIR/shim_cxx',
    ],
    LIBDEPS=[],
    MONGO_API_NAME="visibility_test_libcommon",
)

env.Library(
    target="visibility_test_lib1",
    source=[
        "visibility_test_lib1.cpp"
    ],
    LIBDEPS_NO_INHERIT=[
        '$BUILD_DIR/third_party/shim_allocator',
        '$BUILD_DIR/shim_crt',
        '$BUILD_DIR/shim_cxx',
    ],
    LIBDEPS=[],
    LIBDEPS_PRIVATE=[
        "visibility_test_libcommon",
    ],
    MONGO_API_NAME="visibility_test_lib1",
)

env.Library(
    target="visibility_test_lib2",
    source=[
        "visibility_test_lib2.cpp"
    ],
    LIBDEPS_NO_INHERIT=[
        '$BUILD_DIR/third_party/shim_allocator',
        '$BUILD_DIR/shim_crt',
        '$BUILD_DIR/shim_cxx',
    ],
    LIBDEPS=[
        "visibility_test_lib1",
    ],
    LIBDEPS_PRIVATE=[
        "visibility_test_libcommon",
    ],
    MONGO_API_NAME="visibility_test_lib2",
)

visibility_test1 = env.Program(
    target="visibility_test1",
    source=[
        "visibility_test1.cpp",
    ],
    LIBDEPS_NO_INHERIT=[
        '$BUILD_DIR/third_party/shim_allocator',
        '$BUILD_DIR/shim_crt',
        '$BUILD_DIR/shim_cxx',
    ],
    LIBDEPS=[
        "visibility_test_lib1",
    ],
    AIB_COMPONENT="visibility-test",
    AIB_COMPONENTS_EXTRA=[
        "unittests",
        "tests",
    ],
)
env.RegisterTest("$UNITTEST_LIST", visibility_test1[0])

visibility_test2 = env.Program(
    target="visibility_test2",
    source=[
        "visibility_test2.cpp",
    ],
    LIBDEPS_NO_INHERIT=[
        '$BUILD_DIR/third_party/shim_allocator',
        '$BUILD_DIR/shim_crt',
        '$BUILD_DIR/shim_cxx',
    ],
    LIBDEPS=[
        "visibility_test_lib2",
    ],
    AIB_COMPONENT="visibility-test",
    AIB_COMPONENTS_EXTRA=[
        "unittests",
        "tests",
    ],
)
env.RegisterTest("$UNITTEST_LIST", visibility_test2[0])