summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/SConscript
blob: 6de7f88f34574e32e2098fcfab05eace2195943e (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
# -*- mode: python -*-

Import("env")

env.SConscript(
    dirs=[
        'unicode',
    ],
)

stop_word_languages = [
    'danish',
    'dutch',
    'english',
    'finnish',
    'french',
    'german',
    'hungarian',
    'italian',
    'norwegian',
    'portuguese',
    'romanian',
    'russian',
    'spanish',
    'swedish',
    'turkish',
]

env.Command( [ "stop_words_list.h", "stop_words_list.cpp"],
             [ "generate_stop_words.py"] + [ 'stop_words_%s.txt' % x for x in stop_word_languages ],
             "$PYTHON $SOURCES $TARGETS" )

baseEnv=env.Clone()
baseEnv.InjectThirdPartyIncludePaths(libraries=['stemmer'])
baseEnv.Library('base', [
        'fts_index_format.cpp',
        'fts_matcher.cpp',
        'fts_query_impl.cpp',
        'fts_query_parser.cpp',
        'fts_spec.cpp',
        'fts_spec_legacy.cpp',
        'fts_language.cpp',
        'fts_basic_phrase_matcher.cpp',
        'fts_basic_tokenizer.cpp',
        'fts_unicode_phrase_matcher.cpp',
        'fts_unicode_tokenizer.cpp',
        'fts_util.cpp',
        'fts_element_iterator.cpp',
        'stemmer.cpp',
        'stop_words.cpp',
        'stop_words_list.cpp',
        'tokenizer.cpp',
        ], LIBDEPS=["$BUILD_DIR/mongo/base",
                    "$BUILD_DIR/mongo/db/common",
                    "$BUILD_DIR/mongo/db/fts/unicode/unicode",
                    "$BUILD_DIR/mongo/platform/platform",
                    "$BUILD_DIR/mongo/util/md5",
                    "$BUILD_DIR/third_party/shim_stemmer",
                    ])

env.Library(
    target='fts_query_noop',
    source=[
        'fts_query_noop.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ],
)

env.Library( 'server_common', [
             ],
             LIBDEPS=[
                 '$BUILD_DIR/mongo/base',
                 '$BUILD_DIR/mongo/db/server_parameters',
             ],
)

env.Library('ftsmongod', [
        ], LIBDEPS=["base","server_common"])


env.Library('ftsmongos', [
        ], LIBDEPS=["server_common"])


env.CppUnitTest( "fts_basic_phrase_matcher_test", "fts_basic_phrase_matcher_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_basic_tokenizer_test", "fts_basic_tokenizer_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_element_iterator_test", "fts_element_iterator_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_index_format_test", "fts_index_format_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_language_test", "fts_language_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_matcher_test", "fts_matcher_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_query_impl_test", "fts_query_impl_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_query_noop_test", "fts_query_noop_test.cpp",
                 LIBDEPS=["fts_query_noop"] )

env.CppUnitTest( "fts_spec_test", "fts_spec_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_stemmer_test", "stemmer_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_stop_words_test", "stop_words_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_tokenizer_test", "tokenizer_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_unicode_phrase_matcher_test", "fts_unicode_phrase_matcher_test.cpp",
                 LIBDEPS=["base"] )

env.CppUnitTest( "fts_unicode_tokenizer_test", "fts_unicode_tokenizer_test.cpp",
                 LIBDEPS=["base"] )