-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
146 lines (134 loc) · 5.47 KB
/
CMakeLists.txt
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
cmake_minimum_required (VERSION 2.8.0)
project ("ZGen - A collections of sentence linearization tools")
find_package (Boost REQUIRED)
add_definitions (-DBOOST_LOG_DYN_LINK)
set (CMAKE_CXX_FLAGS "-std=c++11 -g -O3 -DNDEBUG -DKENLM_MAX_ORDER=6")
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set (SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)
include_directories (${Boost_INCLUDE_DIRS} ${SOURCE_DIR})
link_directories (${Boost_LIBRARY_DIRS})
#add_executable (zgen-bf
# ${SOURCE_DIR}/utils/ioutils.cc
# ${SOURCE_DIR}/utils/logging.cc
# ${SOURCE_DIR}/types/instance.cc
# ${SOURCE_DIR}/knowledge/postag_constrain.cc
# ${SOURCE_DIR}/engine/postag_alphabet.cc
# ${SOURCE_DIR}/engine/deprel_alphabet.cc
# ${SOURCE_DIR}/engine/word_alphabet.cc
# ${SOURCE_DIR}/bestfirst/learning/learner.cc
# ${SOURCE_DIR}/bestfirst/model/model.cc
# ${SOURCE_DIR}/bestfirst/search/span.cc
# ${SOURCE_DIR}/bestfirst/search/span_utils.cc
# ${SOURCE_DIR}/bestfirst/search/span_allocator.cc
# ${SOURCE_DIR}/bestfirst/search/span_factory.cc
# ${SOURCE_DIR}/bestfirst/pipe/pipe.cc
# ${SOURCE_DIR}/bestfirst/frontend/opt.cc
# ${SOURCE_DIR}/bestfirst/frontend/main.cc
# )
#target_link_libraries (zgen-bf
# boost_program_options
# boost_log_setup
# boost_log
# boost_regex
# boost_serialization
# boost_thread
# boost_system
# pthread)
add_executable (ZGen_SR
${SOURCE_DIR}/utils/ioutils.cc
${SOURCE_DIR}/utils/logging.cc
${SOURCE_DIR}/utils/math_utils.cc
${SOURCE_DIR}/types/instance.cc
${SOURCE_DIR}/types/instance_utils.cc
${SOURCE_DIR}/types/tree.cc
${SOURCE_DIR}/knowledge/postag_constraint.cc
${SOURCE_DIR}/engine/token_alphabet.cc
${SOURCE_DIR}/shiftreduce/types/action.cc
${SOURCE_DIR}/shiftreduce/types/state.cc
${SOURCE_DIR}/types/graph.cc
${SOURCE_DIR}/shiftreduce/types/action_utils.cc
${SOURCE_DIR}/shiftreduce/model/model.cc
${SOURCE_DIR}/shiftreduce/ngram/ngram.cc
${SOURCE_DIR}/shiftreduce/learning/learner.cc
${SOURCE_DIR}/shiftreduce/pipe/pipe.cc
${SOURCE_DIR}/shiftreduce/decode/decode_context.cc
${SOURCE_DIR}/shiftreduce/decode/decoder.cc
${SOURCE_DIR}/shiftreduce/decode/none_decoder.cc
${SOURCE_DIR}/shiftreduce/decode/partial_decoder.cc
${SOURCE_DIR}/shiftreduce/decode/full_decoder.cc
${SOURCE_DIR}/shiftreduce/frontend/opt.cc
${SOURCE_DIR}/shiftreduce/frontend/main.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/search_trie.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/quantize.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/binary_format.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/model.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/trie.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/bhiksha.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/value_build.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/config.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/read_arpa.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/vocab.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/lm_exception.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/sizes.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/trie_sort.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/search_hashed.cc
${SOURCE_DIR}/shiftreduce/ngram/lm/virtual_interface.cc
${SOURCE_DIR}/shiftreduce/ngram/util/read_compressed.cc
${SOURCE_DIR}/shiftreduce/ngram/util/exception.cc
${SOURCE_DIR}/shiftreduce/ngram/util/usage.cc
${SOURCE_DIR}/shiftreduce/ngram/util/mmap.cc
${SOURCE_DIR}/shiftreduce/ngram/util/parallel_read.cc
${SOURCE_DIR}/shiftreduce/ngram/util/bit_packing.cc
${SOURCE_DIR}/shiftreduce/ngram/util/ersatz_progress.cc
${SOURCE_DIR}/shiftreduce/ngram/util/string_piece.cc
${SOURCE_DIR}/shiftreduce/ngram/util/murmur_hash.cc
${SOURCE_DIR}/shiftreduce/ngram/util/pool.cc
${SOURCE_DIR}/shiftreduce/ngram/util/file_piece.cc
${SOURCE_DIR}/shiftreduce/ngram/util/file.cc
${SOURCE_DIR}/shiftreduce/ngram/util/scoped.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/strtod.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/double-conversion.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/bignum.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/diy-fp.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/fixed-dtoa.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/cached-powers.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/bignum-dtoa.cc
${SOURCE_DIR}/shiftreduce/ngram/util/double-conversion/fast-dtoa.cc
)
target_link_libraries (ZGen_SR
boost_program_options
boost_log_setup
boost_log
boost_regex
boost_serialization
boost_thread
boost_system
boost_unit_test_framework
pthread)
#add_executable (unittest
# ${SOURCE_DIR}/types/instance.cc
# ${SOURCE_DIR}/utils/math_utils.cc
# ${SOURCE_DIR}/utils/ioutils.cc
# ${SOURCE_DIR}/bestfirst/search/span.cc
# ${SOURCE_DIR}/bestfirst/search/span_utils.cc
# ${SOURCE_DIR}/bestfirst/search/span_allocator.cc
# ${SOURCE_DIR}/shiftreduce/types/action.cc
# ${SOURCE_DIR}/unittest/test.cc
# ${SOURCE_DIR}/unittest/shiftreduce/test_action.cc
# ${SOURCE_DIR}/unittest/shiftreduce/test_score.cc
# ${SOURCE_DIR}/unittest/bestfirst/test_span_allocator.cc
# ${SOURCE_DIR}/unittest/bestfirst/test_span.cc
# ${SOURCE_DIR}/unittest/bestfirst/test_span_utils.cc
# ${SOURCE_DIR}/unittest/bestfirst/test_span_repr.cc
# ${SOURCE_DIR}/unittest/bestfirst/test_span_types.cc
# )
#target_link_libraries (unittest
# boost_program_options
# boost_log_setup
# boost_log
# boost_regex
# boost_serialization
# boost_thread
# boost_system
# boost_unit_test_framework
# pthread)