From 95183b5760d7f168ae093ae8f9b29740628a278f Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 3 Mar 2015 01:14:07 -0500 Subject: migration to cmake --- decoder/CMakeLists.txt | 179 ++++++++++++++++++++++++++++++++++++++ decoder/Makefile.am | 166 ----------------------------------- decoder/apply_models.h | 6 +- decoder/decoder.h | 4 +- decoder/factored_lexicon_helper.h | 2 +- decoder/ff_csplit.h | 4 +- decoder/ff_klm.cc | 1 - decoder/ff_klm.h | 2 +- decoder/ff_lm.cc | 2 +- decoder/ff_lm.h | 3 +- decoder/ff_ngrams.cc | 8 +- decoder/ff_ngrams.h | 2 +- decoder/ff_spans.h | 1 - decoder/ff_wordalign.cc | 2 - decoder/grammar.h | 2 +- decoder/hg_union.cc | 4 +- decoder/phrasebased_translator.h | 2 +- decoder/scfg_translator.cc | 2 +- decoder/sentence_metadata.h | 6 +- decoder/translator.h | 8 +- decoder/tree_fragment.cc | 4 +- decoder/trule.h | 2 +- 22 files changed, 209 insertions(+), 203 deletions(-) create mode 100644 decoder/CMakeLists.txt delete mode 100644 decoder/Makefile.am (limited to 'decoder') diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt new file mode 100644 index 00000000..591ab7b3 --- /dev/null +++ b/decoder/CMakeLists.txt @@ -0,0 +1,179 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../utils) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../mteval) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../klm) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) + +PROJECT(decoder C CXX) + +find_package(FLEX REQUIRED) + +FLEX_TARGET(RuleLexer rule_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/rule_lexer.cc) + +set(libcdec_SRCS + aligner.h + apply_models.h + bottom_up_parser.h + bottom_up_parser-rs.h + csplit.h + decoder.h + earley_composer.h + factored_lexicon_helper.h + ff.h + ff_basic.h + ff_bleu.h + ff_charset.h + ff_conll.h + ff_const_reorder_common.h + ff_const_reorder.h + ff_context.h + ff_csplit.h + ff_external.h + ff_factory.h + ff_klm.h + ff_lexical.h + ff_lm.h + ff_ngrams.h + ff_parse_match.h + ff_register.h + ff_rules.h + ff_ruleshape.h + ff_sample_fsa.h + ff_soft_syn.h + ff_soft_syntax.h + ff_soft_syntax_mindist.h + ff_source_path.h + ff_source_syntax.h + ff_source_syntax2.h + ff_spans.h + ff_tagger.h + ff_wordalign.h + ff_wordset.h + ffset.h + forest_writer.h + freqdict.h + grammar.h + hg.h + hg_intersect.h + hg_io.h + hg_remove_eps.h + hg_sampler.h + hg_test.h + hg_union.h + incremental.h + inside_outside.h + kbest.h + lattice.h + lexalign.h + lextrans.h + nt_span.h + oracle_bleu.h + phrasebased_translator.h + phrasetable_fst.h + program_options.h + rule_lexer.h + sentence_metadata.h + sentences.h + tagger.h + translator.h + trule.h + viterbi.h + aligner.cc + apply_models.cc + bottom_up_parser.cc + bottom_up_parser-rs.cc + cdec_ff.cc + csplit.cc + decoder.cc + earley_composer.cc + factored_lexicon_helper.cc + ff.cc + ff_basic.cc + ff_bleu.cc + ff_charset.cc + ff_conll.cc + ff_context.cc + ff_const_reorder.cc + ff_csplit.cc + ff_external.cc + ff_factory.cc + ff_klm.cc + ff_lm.cc + ff_ngrams.cc + ff_parse_match.cc + ff_rules.cc + ff_ruleshape.cc + ff_soft_syn.cc + ff_soft_syntax.cc + ff_soft_syntax_mindist.cc + ff_source_path.cc + ff_source_syntax.cc + ff_source_syntax2.cc + ff_spans.cc + ff_tagger.cc + ff_wordalign.cc + ff_wordset.cc + ffset.cc + forest_writer.cc + fst_translator.cc + tree2string_translator.cc + grammar.cc + hg.cc + hg_intersect.cc + hg_io.cc + hg_remove_eps.cc + hg_sampler.cc + hg_union.cc + incremental.cc + lattice.cc + lexalign.cc + lextrans.cc + node_state_hash.h + tree_fragment.cc + tree_fragment.h + maxtrans_blunsom.cc + phrasebased_translator.cc + phrasetable_fst.cc + rescore_translator.cc + ${FLEX_RuleLexer_OUTPUTS} + scfg_translator.cc + tagger.cc + translator.cc + trule.cc + viterbi.cc) + +add_library(libcdec STATIC ${libcdec_SRCS}) + +set(cdec_SRCS cdec.cc) +add_executable(cdec ${cdec_SRCS}) +target_link_libraries(cdec libcdec mteval utils ksearch klm klm_util klm_util_double ${Boost_LIBRARIES} ${ZLIB_LIBRARIES}) + +set(TEST_SRCS + grammar_test.cc + hg_test.cc + parser_test.cc + t2s_test.cc + trule_test.cc) + +foreach(testSrc ${TEST_SRCS}) + #Extract the filename without an extension (NAME_WE) + get_filename_component(testName ${testSrc} NAME_WE) + + #Add compile target + set_source_files_properties(${testSrc} PROPERTIES COMPILE_FLAGS "-DBOOST_TEST_DYN_LINK -DTEST_DATA=\\\"test_data/\\\"") + add_executable(${testName} ${testSrc}) + + #link to Boost libraries AND your targets and dependencies + target_link_libraries(${testName} libcdec mteval utils ksearch klm klm_util klm_util_double ${Boost_LIBRARIES} ${ZLIB_LIBRARIES}) + + #I like to move testing binaries into a testBin directory + set_target_properties(${testName} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + + #Finally add it to test execution - + #Notice the WORKING_DIRECTORY and COMMAND + add_test(NAME ${testName} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${testName} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +endforeach(testSrc) + + + diff --git a/decoder/Makefile.am b/decoder/Makefile.am deleted file mode 100644 index dbec532e..00000000 --- a/decoder/Makefile.am +++ /dev/null @@ -1,166 +0,0 @@ -bin_PROGRAMS = cdec - -noinst_PROGRAMS = \ - trule_test \ - hg_test \ - parser_test \ - t2s_test \ - grammar_test - -TESTS = trule_test parser_test grammar_test hg_test -t2s_test_SOURCES = t2s_test.cc -t2s_test_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a -parser_test_SOURCES = parser_test.cc -parser_test_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a -grammar_test_SOURCES = grammar_test.cc -grammar_test_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a -hg_test_SOURCES = hg_test.cc -hg_test_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a -trule_test_SOURCES = trule_test.cc -trule_test_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) libcdec.a ../mteval/libmteval.a ../utils/libutils.a - -cdec_SOURCES = cdec.cc -cdec_LDFLAGS= -rdynamic $(STATIC_FLAGS) -cdec_LDADD = libcdec.a ../mteval/libmteval.a ../utils/libutils.a ../klm/search/libksearch.a ../klm/lm/libklm.a ../klm/util/libklm_util.a ../klm/util/double-conversion/libklm_util_double.a - -AM_CPPFLAGS = -DTEST_DATA=\"$(top_srcdir)/decoder/test_data\" -DBOOST_TEST_DYN_LINK -W -Wno-sign-compare -I$(top_srcdir) -I$(top_srcdir)/mteval -I$(top_srcdir)/utils -I$(top_srcdir)/klm - -rule_lexer.cc: rule_lexer.ll - $(LEX) -s -CF -8 -o$@ $< - -noinst_LIBRARIES = libcdec.a - -EXTRA_DIST = test_data rule_lexer.ll - -libcdec_a_SOURCES = \ - aligner.h \ - apply_models.h \ - bottom_up_parser.h \ - bottom_up_parser-rs.h \ - csplit.h \ - decoder.h \ - earley_composer.h \ - factored_lexicon_helper.h \ - ff.h \ - ff_basic.h \ - ff_bleu.h \ - ff_charset.h \ - ff_conll.h \ - ff_const_reorder_common.h \ - ff_const_reorder.h \ - ff_context.h \ - ff_csplit.h \ - ff_external.h \ - ff_factory.h \ - ff_klm.h \ - ff_lexical.h \ - ff_lm.h \ - ff_ngrams.h \ - ff_parse_match.h \ - ff_register.h \ - ff_rules.h \ - ff_ruleshape.h \ - ff_sample_fsa.h \ - ff_soft_syn.h \ - ff_soft_syntax.h \ - ff_soft_syntax_mindist.h \ - ff_source_path.h \ - ff_source_syntax.h \ - ff_source_syntax2.h \ - ff_spans.h \ - ff_tagger.h \ - ff_wordalign.h \ - ff_wordset.h \ - ffset.h \ - forest_writer.h \ - freqdict.h \ - grammar.h \ - hg.h \ - hg_intersect.h \ - hg_io.h \ - hg_remove_eps.h \ - hg_sampler.h \ - hg_test.h \ - hg_union.h \ - incremental.h \ - inside_outside.h \ - kbest.h \ - lattice.h \ - lexalign.h \ - lextrans.h \ - nt_span.h \ - oracle_bleu.h \ - phrasebased_translator.h \ - phrasetable_fst.h \ - program_options.h \ - rule_lexer.h \ - sentence_metadata.h \ - sentences.h \ - tagger.h \ - translator.h \ - trule.h \ - viterbi.h \ - aligner.cc \ - apply_models.cc \ - bottom_up_parser.cc \ - bottom_up_parser-rs.cc \ - cdec.cc \ - cdec_ff.cc \ - csplit.cc \ - decoder.cc \ - earley_composer.cc \ - factored_lexicon_helper.cc \ - ff.cc \ - ff_basic.cc \ - ff_bleu.cc \ - ff_charset.cc \ - ff_conll.cc \ - ff_context.cc \ - ff_const_reorder.cc \ - ff_csplit.cc \ - ff_external.cc \ - ff_factory.cc \ - ff_klm.cc \ - ff_lm.cc \ - ff_ngrams.cc \ - ff_parse_match.cc \ - ff_rules.cc \ - ff_ruleshape.cc \ - ff_soft_syn.cc \ - ff_soft_syntax.cc \ - ff_soft_syntax_mindist.cc \ - ff_source_path.cc \ - ff_source_syntax.cc \ - ff_source_syntax2.cc \ - ff_spans.cc \ - ff_tagger.cc \ - ff_wordalign.cc \ - ff_wordset.cc \ - ffset.cc \ - forest_writer.cc \ - fst_translator.cc \ - tree2string_translator.cc \ - grammar.cc \ - hg.cc \ - hg_intersect.cc \ - hg_io.cc \ - hg_remove_eps.cc \ - hg_sampler.cc \ - hg_union.cc \ - incremental.cc \ - lattice.cc \ - lexalign.cc \ - lextrans.cc \ - node_state_hash.h \ - tree_fragment.cc \ - tree_fragment.h \ - maxtrans_blunsom.cc \ - phrasebased_translator.cc \ - phrasetable_fst.cc \ - rescore_translator.cc \ - rule_lexer.cc \ - scfg_translator.cc \ - tagger.cc \ - translator.cc \ - trule.cc \ - viterbi.cc diff --git a/decoder/apply_models.h b/decoder/apply_models.h index f03c973a..bfb37df1 100644 --- a/decoder/apply_models.h +++ b/decoder/apply_models.h @@ -3,9 +3,9 @@ #include -struct ModelSet; -struct Hypergraph; -struct SentenceMetadata; +class ModelSet; +class Hypergraph; +class SentenceMetadata; struct exhaustive_t {}; diff --git a/decoder/decoder.h b/decoder/decoder.h index a545206b..6250d1eb 100644 --- a/decoder/decoder.h +++ b/decoder/decoder.h @@ -25,7 +25,7 @@ private: class SentenceMetadata; class Hypergraph; -class DecoderImpl; +struct DecoderImpl; class DecoderObserver { public: @@ -38,7 +38,7 @@ class DecoderObserver { virtual void NotifyDecodingComplete(const SentenceMetadata& smeta); }; -class Grammar; // TODO once the decoder interface is cleaned up, +struct Grammar; // TODO once the decoder interface is cleaned up, // this should be somewhere else class Decoder { public: diff --git a/decoder/factored_lexicon_helper.h b/decoder/factored_lexicon_helper.h index 460bdebb..8e89f473 100644 --- a/decoder/factored_lexicon_helper.h +++ b/decoder/factored_lexicon_helper.h @@ -7,7 +7,7 @@ #include #include "tdict.h" -struct SentenceMetadata; +class SentenceMetadata; // when computing features, it can be advantageous to: // 1) back off to less specific forms (e.g., less highly inflected forms, POS tags, etc) diff --git a/decoder/ff_csplit.h b/decoder/ff_csplit.h index 227f2a14..1721ed38 100644 --- a/decoder/ff_csplit.h +++ b/decoder/ff_csplit.h @@ -6,7 +6,7 @@ #include "ff.h" #include "klm/lm/model.hh" -class BasicCSplitFeaturesImpl; +struct BasicCSplitFeaturesImpl; class BasicCSplitFeatures : public FeatureFunction { public: BasicCSplitFeatures(const std::string& param); @@ -22,7 +22,7 @@ class BasicCSplitFeatures : public FeatureFunction { boost::shared_ptr pimpl_; }; -template class ReverseCharLMCSplitFeatureImpl; +template struct ReverseCharLMCSplitFeatureImpl; class ReverseCharLMCSplitFeature : public FeatureFunction { public: ReverseCharLMCSplitFeature(const std::string& param); diff --git a/decoder/ff_klm.cc b/decoder/ff_klm.cc index 339a10c3..d395fb47 100644 --- a/decoder/ff_klm.cc +++ b/decoder/ff_klm.cc @@ -347,7 +347,6 @@ void KLanguageModel::TraversalFeaturesImpl(const SentenceMetadata& /* sme SparseVector* features, SparseVector* /*estimated_features*/, void* state) const { - double est = 0; double oovs = 0; double emit = 0; features->set_value(fid_, pimpl_->LookupWords(*edge.rule_, ant_states, &oovs, &emit, state)); diff --git a/decoder/ff_klm.h b/decoder/ff_klm.h index c8350623..7a0b92ec 100644 --- a/decoder/ff_klm.h +++ b/decoder/ff_klm.h @@ -7,7 +7,7 @@ #include "ff_factory.h" #include "ff.h" -template struct KLanguageModelImpl; +template class KLanguageModelImpl; // the supported template types are instantiated explicitly // in ff_klm.cc. diff --git a/decoder/ff_lm.cc b/decoder/ff_lm.cc index bc51076f..0780b266 100644 --- a/decoder/ff_lm.cc +++ b/decoder/ff_lm.cc @@ -211,7 +211,7 @@ class LanguageModelImpl : public LanguageModelInterface { // may be shorter than actual null-terminated length. context must be null terminated. len is just to save effort for subclasses that don't support contextID virtual int ContextSize(WordID const* context,int len) { - unsigned ret; + unsigned ret = 0; //ngram_.contextID((VocabIndex*)context,ret); return ret; } diff --git a/decoder/ff_lm.h b/decoder/ff_lm.h index 83a2e186..740cc492 100644 --- a/decoder/ff_lm.h +++ b/decoder/ff_lm.h @@ -44,8 +44,7 @@ class LanguageModelInterface { } }; -struct LanguageModelImpl; - +class LanguageModelImpl; class LanguageModel : public FeatureFunction { public: // param = "filename.lm [-o n]" diff --git a/decoder/ff_ngrams.cc b/decoder/ff_ngrams.cc index 38e1a60a..a45bd27d 100644 --- a/decoder/ff_ngrams.cc +++ b/decoder/ff_ngrams.cc @@ -33,11 +33,12 @@ struct State { } const State& operator=(const State& other) { memcpy(state, other.state, sizeof(state)); + return *this; } explicit State(const State& other, unsigned order, WordID extend) { - char om1 = order - 1; + unsigned om1 = order - 1; if (!om1) { memset(state, 0, sizeof(state)); return; } - for (char i = 1; i < om1; ++i) state[i - 1]= other.state[i]; + for (unsigned i = 1; i < om1; ++i) state[i - 1]= other.state[i]; state[om1 - 1] = extend; } const WordID& operator[](size_t i) const { return state[i]; } @@ -249,8 +250,6 @@ class NgramDetectorImpl { public: void LookupWords(const TRule& rule, const vector& ant_states, SparseVector* feats, SparseVector* est_feats, void* remnant) { - double sum = 0.0; - double est_sum = 0.0; int num_scored = 0; int num_estimated = 0; bool saw_eos = false; @@ -264,7 +263,6 @@ class NgramDetectorImpl { int unscored_ant_len = UnscoredSize(astate); for (int k = 0; k < unscored_ant_len; ++k) { const WordID cur_word = IthUnscoredWord(k, astate); - const bool is_oov = (cur_word == 0); SparseVector p; if (cur_word == kSOS_) { state = BeginSentenceState(); diff --git a/decoder/ff_ngrams.h b/decoder/ff_ngrams.h index 5dea9a7d..05b25974 100644 --- a/decoder/ff_ngrams.h +++ b/decoder/ff_ngrams.h @@ -7,7 +7,7 @@ #include "ff.h" -struct NgramDetectorImpl; +class NgramDetectorImpl; class NgramDetector : public FeatureFunction { public: // param = "filename.lm [-o ] [-U ] [-B ] [-T ] [-4 <4-gram-prefix>] [-5 <5-gram-prefix>] [-S ] diff --git a/decoder/ff_spans.h b/decoder/ff_spans.h index e2475491..d0036340 100644 --- a/decoder/ff_spans.h +++ b/decoder/ff_spans.h @@ -62,7 +62,6 @@ class CMR2008ReorderingFeatures : public FeatureFunction { // collapsed feature values bool use_collapsed_features_; - int fid_reorder_; std::pair uncoditioned_vals_; std::vector > fvals_; }; diff --git a/decoder/ff_wordalign.cc b/decoder/ff_wordalign.cc index dcb80110..5d4c80c7 100644 --- a/decoder/ff_wordalign.cc +++ b/decoder/ff_wordalign.cc @@ -28,8 +28,6 @@ namespace std { using std::tr1::unordered_map; } #include "tdict.h" // Blunsom hack #include "filelib.h" // Blunsom hack -static const int MAX_SENTENCE_SIZE = 100; - static const int kNULL_i = 255; // -1 as an unsigned char using namespace std; diff --git a/decoder/grammar.h b/decoder/grammar.h index add1a235..37c7276d 100644 --- a/decoder/grammar.h +++ b/decoder/grammar.h @@ -61,7 +61,7 @@ struct Grammar { typedef boost::shared_ptr GrammarPtr; -class TGImpl; +struct TGImpl; struct TextGrammar : public Grammar { TextGrammar(); explicit TextGrammar(const std::string& file); diff --git a/decoder/hg_union.cc b/decoder/hg_union.cc index a659b6bc..da9f2624 100644 --- a/decoder/hg_union.cc +++ b/decoder/hg_union.cc @@ -64,9 +64,9 @@ void Union(const Hypergraph& in, Hypergraph* out) { double n_created = 0; for (const auto& in_node : in.nodes_) { HG::Node& out_node = out->nodes_[h2n[in_node.node_hash]]; - for (const auto oeid : out_node.in_edges_) { + //for (const auto oeid : out_node.in_edges_) { // TODO hash currently existing edges for quick check for duplication - } + //} for (const auto ieid : in_node.in_edges_) { const HG::Edge& in_edge = in.edges_[ieid]; // TODO: replace slow N^2 check with hashing diff --git a/decoder/phrasebased_translator.h b/decoder/phrasebased_translator.h index 10790d0d..85dc0a26 100644 --- a/decoder/phrasebased_translator.h +++ b/decoder/phrasebased_translator.h @@ -3,7 +3,7 @@ #include "translator.h" -class PhraseBasedTranslatorImpl; +struct PhraseBasedTranslatorImpl; class PhraseBasedTranslator : public Translator { public: PhraseBasedTranslator(const boost::program_options::variables_map& conf); diff --git a/decoder/scfg_translator.cc b/decoder/scfg_translator.cc index 538f82ec..9831a3c3 100644 --- a/decoder/scfg_translator.cc +++ b/decoder/scfg_translator.cc @@ -62,7 +62,7 @@ PassThroughGrammar::PassThroughGrammar(const Lattice& input, const string& cat, for (int i = 0; i < input.size(); ++i) { const vector& alts = input[i]; for (int k = 0; k < alts.size(); ++k) { - const int j = alts[k].dist2next + i; + // const int j = alts[k].dist2next + i; const string& src = TD::Convert(alts[k].label); if (ss.count(alts[k].label) == 0) { if (num_pt_features > 0) { diff --git a/decoder/sentence_metadata.h b/decoder/sentence_metadata.h index e13c2ca5..27fcac38 100644 --- a/decoder/sentence_metadata.h +++ b/decoder/sentence_metadata.h @@ -7,8 +7,8 @@ #include "lattice.h" #include "tree_fragment.h" -struct DocScorer; // deprecated, will be removed -struct Score; // deprecated, will be removed +class DocScorer; // deprecated, will be removed +class Score; // deprecated, will be removed namespace cdec { enum InputType { kSEQUENCE, kTREE, kLATTICE, kFOREST, kUNKNOWN }; @@ -17,7 +17,7 @@ class TreeFragment; class SentenceMetadata { public: - friend class DecoderImpl; + friend struct DecoderImpl; SentenceMetadata(int id, const Lattice& ref) : sent_id_(id), src_len_(-1), diff --git a/decoder/translator.h b/decoder/translator.h index 096cf191..37070cda 100644 --- a/decoder/translator.h +++ b/decoder/translator.h @@ -54,7 +54,7 @@ class Translator { State state_; }; -class SCFGTranslatorImpl; +struct SCFGTranslatorImpl; class SCFGTranslator : public Translator { public: SCFGTranslator(const boost::program_options::variables_map& conf); @@ -72,7 +72,7 @@ class SCFGTranslator : public Translator { boost::shared_ptr pimpl_; }; -class FSTTranslatorImpl; +struct FSTTranslatorImpl; class FSTTranslator : public Translator { public: FSTTranslator(const boost::program_options::variables_map& conf); @@ -85,7 +85,7 @@ class FSTTranslator : public Translator { boost::shared_ptr pimpl_; }; -class RescoreTranslatorImpl; +struct RescoreTranslatorImpl; class RescoreTranslator : public Translator { public: RescoreTranslator(const boost::program_options::variables_map& conf); @@ -98,7 +98,7 @@ class RescoreTranslator : public Translator { boost::shared_ptr pimpl_; }; -class Tree2StringTranslatorImpl; +struct Tree2StringTranslatorImpl; class Tree2StringTranslator : public Translator { public: Tree2StringTranslator(const boost::program_options::variables_map& conf, diff --git a/decoder/tree_fragment.cc b/decoder/tree_fragment.cc index 5f717c5b..ff406adf 100644 --- a/decoder/tree_fragment.cc +++ b/decoder/tree_fragment.cc @@ -79,7 +79,7 @@ void TreeFragment::ParseRec(const StringPiece& tree, bool afs, unsigned cp, unsi cerr << "Expected ( at " << cp << endl; abort(); } - const unsigned i = symp; + // const unsigned i = symp; vector rhs; // w | 0 = terminal, w | NT_BIT, index | FRONTIER_BIT ++cp; while(tree[cp] == ' ') { ++cp; } @@ -119,7 +119,7 @@ void TreeFragment::ParseRec(const StringPiece& tree, bool afs, unsigned cp, unsi } } } // continuent has completed, cp is at ), build node - const unsigned j = symp; // span from (i,j) + // const unsigned j = symp; // span from (i,j) // add an internal non-terminal symbol const unsigned nt = TD::Convert(tree.substr(nt_start, nt_end - nt_start).as_string()) | RHS_BIT; nodes[np] = TreeFragmentProduction(nt, rhs); diff --git a/decoder/trule.h b/decoder/trule.h index 7af46747..dda85cef 100644 --- a/decoder/trule.h +++ b/decoder/trule.h @@ -16,7 +16,7 @@ class TRule; typedef boost::shared_ptr TRulePtr; -namespace cdec { struct TreeFragment; } +namespace cdec { class TreeFragment; } struct AlignmentPoint { AlignmentPoint() : s_(), t_() {} -- cgit v1.2.3 From 42e6a2888f986b062c6391b6bef6ef817c6b8a68 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Wed, 4 Mar 2015 22:46:33 -0500 Subject: deal with libdl --- .gitignore | 1 + CMakeLists.txt | 1 + cmake/FindLibDL.cmake | 30 ++++++++++++++++++++++++++++++ decoder/CMakeLists.txt | 4 +++- extractor/CMakeLists.txt | 10 ++++++---- training/crf/CMakeLists.txt | 22 ++++++++-------------- training/dtrain/CMakeLists.txt | 2 +- training/latent_svm/CMakeLists.txt | 2 +- training/mira/CMakeLists.txt | 7 +++---- training/utils/CMakeLists.txt | 6 ++++-- utils/CMakeLists.txt | 2 +- 11 files changed, 59 insertions(+), 28 deletions(-) create mode 100644 cmake/FindLibDL.cmake (limited to 'decoder') diff --git a/.gitignore b/.gitignore index 81ede92e..07145db9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +example_extff/libff_example.so* Testing/ */Testing/ training/Testing/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 21c2a230..934c69e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) #### packages find_package(ZLIB REQUIRED) find_package(BZip2 REQUIRED) +find_package(LibDL REQUIRED) # for pycdec find_package(PythonInterp 2.7 REQUIRED) diff --git a/cmake/FindLibDL.cmake b/cmake/FindLibDL.cmake new file mode 100644 index 00000000..1689e4c7 --- /dev/null +++ b/cmake/FindLibDL.cmake @@ -0,0 +1,30 @@ +# - Find libdl +# Find the native LIBDL includes and library +# +# LIBDL_INCLUDE_DIR - where to find dlfcn.h, etc. +# LIBDL_LIBRARIES - List of libraries when using libdl. +# LIBDL_FOUND - True if libdl found. + + +IF (LIBDL_INCLUDE_DIR) + # Already in cache, be silent + SET(LIBDL_FIND_QUIETLY TRUE) +ENDIF (LIBDL_INCLUDE_DIR) + +FIND_PATH(LIBDL_INCLUDE_DIR dlfcn.h) + +SET(LIBDL_NAMES dl libdl ltdl libltdl) +FIND_LIBRARY(LIBDL_LIBRARY NAMES ${LIBDL_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set LIBDL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibDL DEFAULT_MSG LIBDL_LIBRARY LIBDL_INCLUDE_DIR) + +IF(LIBDL_FOUND) + SET( LIBDL_LIBRARIES ${LIBDL_LIBRARY} ) +ELSE(LIBDL_FOUND) + SET( LIBDL_LIBRARIES ) +ENDIF(LIBDL_FOUND) + +MARK_AS_ADVANCED( LIBDL_LIBRARY LIBDL_INCLUDE_DIR ) diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt index 591ab7b3..f7683887 100644 --- a/decoder/CMakeLists.txt +++ b/decoder/CMakeLists.txt @@ -3,6 +3,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../mteval) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../klm) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + PROJECT(decoder C CXX) find_package(FLEX REQUIRED) @@ -145,7 +147,7 @@ add_library(libcdec STATIC ${libcdec_SRCS}) set(cdec_SRCS cdec.cc) add_executable(cdec ${cdec_SRCS}) -target_link_libraries(cdec libcdec mteval utils ksearch klm klm_util klm_util_double ${Boost_LIBRARIES} ${ZLIB_LIBRARIES}) +target_link_libraries(cdec libcdec mteval utils ksearch klm klm_util klm_util_double ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBDL_LIBRARIES}) set(TEST_SRCS grammar_test.cc diff --git a/extractor/CMakeLists.txt b/extractor/CMakeLists.txt index 1cf8533b..93a524cc 100644 --- a/extractor/CMakeLists.txt +++ b/extractor/CMakeLists.txt @@ -8,9 +8,10 @@ if (OPENMP_FOUND) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") endif() -find_package(GTest REQUIRED) -find_package(GMock REQUIRED) -if(GMOCK_FOUND) +find_package(GTest) +find_package(GMock) +if(GTEST_FOUND) + if(GMOCK_FOUND) #rule_factory_test.cc set(TEST_SRCS alignment_test.cc data_array_test.cc @@ -50,7 +51,8 @@ if(GMOCK_FOUND) add_test(NAME ${testName} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${testName} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endforeach(testSrc) -endif(GMOCK_FOUND) + endif(GMOCK_FOUND) +endif(GTEST_FOUND) set(sacompile_SRCS sacompile.cc) add_executable(sacompile ${sacompile_SRCS}) diff --git a/training/crf/CMakeLists.txt b/training/crf/CMakeLists.txt index 4792983e..85fab7a0 100644 --- a/training/crf/CMakeLists.txt +++ b/training/crf/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder) set(mpi_batch_optimize_SRCS mpi_batch_optimize.cc cllh_observer.cc cllh_observer.h) add_executable(mpi_batch_optimize ${mpi_batch_optimize_SRCS}) -target_link_libraries(mpi_batch_optimize training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) +target_link_libraries(mpi_batch_optimize training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -17,8 +17,7 @@ set(mpi_adagrad_optimize_SRCS mpi_adagrad_optimize.cc cllh_observer.cc cllh_obse add_executable(mpi_adagrad_optimize ${mpi_adagrad_optimize_SRCS}) -target_link_libraries(mpi_adagrad_optimize ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(mpi_adagrad_optimize ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -27,8 +26,7 @@ set(mpi_compute_cllh_SRCS mpi_compute_cllh.cc cllh_observer.cc cllh_observer.h) add_executable(mpi_compute_cllh ${mpi_compute_cllh_SRCS}) -target_link_libraries(mpi_compute_cllh ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(mpi_compute_cllh ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -37,8 +35,7 @@ set(mpi_extract_features_SRCS mpi_extract_features.cc) add_executable(mpi_extract_features ${mpi_extract_features_SRCS}) -target_link_libraries(mpi_extract_features ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(mpi_extract_features ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -47,8 +44,7 @@ set(mpi_extract_reachable_SRCS mpi_extract_reachable.cc) add_executable(mpi_extract_reachable ${mpi_extract_reachable_SRCS}) -target_link_libraries(mpi_extract_reachable ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(mpi_extract_reachable ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -56,8 +52,7 @@ set(mpi_flex_optimize_SRCS mpi_flex_optimize.cc) add_executable(mpi_flex_optimize ${mpi_flex_optimize_SRCS}) -target_link_libraries(mpi_flex_optimize ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(mpi_flex_optimize ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -65,7 +60,7 @@ set(mpi_online_optimize_SRCS mpi_online_optimize.cc) add_executable(mpi_online_optimize ${mpi_online_optimize_SRCS}) -target_link_libraries(mpi_online_optimize ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) +target_link_libraries(mpi_online_optimize ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) ########### next target ############### @@ -73,6 +68,5 @@ set(mpi_baum_welch_SRCS mpi_baum_welch.cc) add_executable(mpi_baum_welch ${mpi_baum_welch_SRCS}) -target_link_libraries(mpi_baum_welch ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(mpi_baum_welch ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) diff --git a/training/dtrain/CMakeLists.txt b/training/dtrain/CMakeLists.txt index 653cfe2b..72e80b6b 100644 --- a/training/dtrain/CMakeLists.txt +++ b/training/dtrain/CMakeLists.txt @@ -12,4 +12,4 @@ set(dtrain_SRCS pairsampling.h score.h) add_executable(dtrain ${dtrain_SRCS}) -target_link_libraries(dtrain libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) +target_link_libraries(dtrain libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) diff --git a/training/latent_svm/CMakeLists.txt b/training/latent_svm/CMakeLists.txt index ec48e02f..332b8d42 100644 --- a/training/latent_svm/CMakeLists.txt +++ b/training/latent_svm/CMakeLists.txt @@ -5,4 +5,4 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder) set(latent_svm_SRCS latent_svm.cc) add_executable(latent_svm ${latent_svm_SRCS}) -target_link_libraries(latent_svm libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) +target_link_libraries(latent_svm libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) diff --git a/training/mira/CMakeLists.txt b/training/mira/CMakeLists.txt index 3a8fa516..bba9ef5f 100644 --- a/training/mira/CMakeLists.txt +++ b/training/mira/CMakeLists.txt @@ -5,13 +5,12 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder) set(kbest_mira_SRCS kbest_mira.cc) add_executable(kbest_mira ${kbest_mira_SRCS}) -target_link_libraries(kbest_mira ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) +target_link_libraries(kbest_mira libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) set(kbest_cut_mira_SRCS kbest_cut_mira.cc) add_executable(kbest_cut_mira ${kbest_cut_mira_SRCS}) -target_link_libraries(kbest_cut_mira ${KDE4_KDECORE_LIBS} libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) +target_link_libraries(kbest_cut_mira libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) set(ada_opt_sm_SRCS ada_opt_sm.cc) add_executable(ada_opt_sm ${ada_opt_sm_SRCS}) -target_link_libraries(ada_opt_sm ${KDE4_KDECORE_LIBS} training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z) - +target_link_libraries(ada_opt_sm training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z ${LIBDL_LIBRARIES}) diff --git a/training/utils/CMakeLists.txt b/training/utils/CMakeLists.txt index 1734ee73..2753b9f0 100644 --- a/training/utils/CMakeLists.txt +++ b/training/utils/CMakeLists.txt @@ -2,6 +2,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../utils) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../mteval) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder) +find_package(Threads REQUIRED) + set(training_utils_STAT_SRCS candidate_set.h entropy.h @@ -21,11 +23,11 @@ add_library(training_utils STATIC ${training_utils_STAT_SRCS}) set(sentserver_SRCS sentserver.cc) add_executable(sentserver ${sentserver_SRCS}) -target_link_libraries(sentserver) +target_link_libraries(sentserver ${CMAKE_THREAD_LIBS_INIT}) set(sentclient_SRCS sentclient.cc) add_executable(sentclient ${sentclient_SRCS}) -target_link_libraries(sentclient) +target_link_libraries(sentclient ${CMAKE_THREAD_LIBS_INIT}) set(grammar_convert_SRCS grammar_convert.cc) add_executable(grammar_convert ${grammar_convert_SRCS}) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 59fb644d..58668254 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,4 +1,4 @@ -include_directories() +set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(TEST_SRCS dict_test.cc logval_test.cc -- cgit v1.2.3 From 5eb2eb6693340c14766876bce705e3adb8733796 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 5 Mar 2015 00:14:16 -0500 Subject: deal with possible RT lib dependency --- cmake/FindRT.cmake | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ decoder/CMakeLists.txt | 4 ++-- klm/lm/CMakeLists.txt | 6 ++++-- 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 cmake/FindRT.cmake (limited to 'decoder') diff --git a/cmake/FindRT.cmake b/cmake/FindRT.cmake new file mode 100644 index 00000000..55ae1a26 --- /dev/null +++ b/cmake/FindRT.cmake @@ -0,0 +1,55 @@ +# - Check for the presence of RT +# +# The following variables are set when RT is found: +# HAVE_RT = Set to true, if all components of RT +# have been found. +# RT_INCLUDES = Include path for the header files of RT +# RT_LIBRARIES = Link these to use RT + +## ----------------------------------------------------------------------------- +## Check for the header files + +find_path (RT_INCLUDES time.h + PATHS /usr/local/include /usr/include ${CMAKE_EXTRA_INCLUDES} + ) + +## ----------------------------------------------------------------------------- +## Check for the library + +find_library (RT_LIBRARIES rt + PATHS /usr/local/lib /usr/lib /lib ${CMAKE_EXTRA_LIBRARIES} + ) + +## ----------------------------------------------------------------------------- +## Actions taken when all components have been found + +if (RT_INCLUDES AND RT_LIBRARIES) + set (HAVE_RT TRUE) +else (RT_INCLUDES AND RT_LIBRARIES) + if (NOT RT_FIND_QUIETLY) + if (NOT RT_INCLUDES) + message (STATUS "Unable to find RT header files!") + endif (NOT RT_INCLUDES) + if (NOT RT_LIBRARIES) + message (STATUS "Unable to find RT library files!") + endif (NOT RT_LIBRARIES) + endif (NOT RT_FIND_QUIETLY) +endif (RT_INCLUDES AND RT_LIBRARIES) + +if (HAVE_RT) + if (NOT RT_FIND_QUIETLY) + message (STATUS "Found components for RT") + message (STATUS "RT_INCLUDES = ${RT_INCLUDES}") + message (STATUS "RT_LIBRARIES = ${RT_LIBRARIES}") + endif (NOT RT_FIND_QUIETLY) +else (HAVE_RT) + if (RT_FIND_REQUIRED) + message (FATAL_ERROR "Could not find RT!") + endif (RT_FIND_REQUIRED) +endif (HAVE_RT) + +mark_as_advanced ( + HAVE_RT + RT_LIBRARIES + RT_INCLUDES + ) diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt index f7683887..ac07e9fe 100644 --- a/decoder/CMakeLists.txt +++ b/decoder/CMakeLists.txt @@ -3,10 +3,10 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../mteval) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../klm) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - PROJECT(decoder C CXX) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + find_package(FLEX REQUIRED) FLEX_TARGET(RuleLexer rule_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/rule_lexer.cc) diff --git a/klm/lm/CMakeLists.txt b/klm/lm/CMakeLists.txt index 5814b623..b95cddee 100644 --- a/klm/lm/CMakeLists.txt +++ b/klm/lm/CMakeLists.txt @@ -1,13 +1,15 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) +find_package(RT) + set(build_binary_SRCS build_binary_main.cc) add_executable(build_binary ${build_binary_SRCS}) -target_link_libraries(build_binary klm klm_util klm_util_double z) +target_link_libraries(build_binary klm klm_util klm_util_double z ${RT_LIBRARIES}) set(ngram_query_SRCS query_main.cc) add_executable(ngram_query ${ngram_query_SRCS}) -target_link_libraries(ngram_query klm klm_util klm_util_double z) +target_link_libraries(ngram_query klm klm_util klm_util_double z ${RT_LIBRARIES}) set(klm_STAT_SRCS bhiksha.hh -- cgit v1.2.3 From 737ed7a7f932b1a7e40d2755bcdee6bc0aa2de63 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 2 Apr 2015 00:36:01 -0400 Subject: fix PIC flag on old version of cmake --- decoder/CMakeLists.txt | 8 ++++++-- utils/CMakeLists.txt | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'decoder') diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt index ac07e9fe..b49d6477 100644 --- a/decoder/CMakeLists.txt +++ b/decoder/CMakeLists.txt @@ -3,9 +3,13 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../mteval) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../klm) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) -PROJECT(decoder C CXX) +PROJECT(decoder CXX) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +if (CMAKE_VERSION VERSION_LESS 2.8.9) # TODO remove once we increase the cmake requirement + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC") +else() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() find_package(FLEX REQUIRED) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 58668254..6982fa11 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,4 +1,8 @@ -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +if (CMAKE_VERSION VERSION_LESS 2.8.9) # TODO remove once we increase the cmake requirement + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC") +else() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() set(TEST_SRCS dict_test.cc logval_test.cc -- cgit v1.2.3