summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-02-21 20:07:47 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-02-21 20:07:47 +0000
commit4f9ab0daefcd4b1ff9ae810908cdf5be143f68c5 (patch)
tree76b43241a5a220dff884695c1a5f465e90e1e364
parent631a24d44b0d416c6c23fdf3c84d78ba2ff9ab35 (diff)
Main make compiles the c++ extractor.
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac1
-rw-r--r--extractor/Makefile.am119
3 files changed, 65 insertions, 58 deletions
diff --git a/Makefile.am b/Makefile.am
index 6038effa..a0fba116 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,8 @@ SUBDIRS = \
training \
training/liblbfgs \
word-aligner \
- example_extff
+ example_extff \
+ extractor
#gi/pyp-topics/src gi/clda/src gi/posterior-regularisation/prjava
diff --git a/configure.ac b/configure.ac
index 22b8c451..66ab7778 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,7 @@ then
AC_SUBST(AS_TR_CPP([GMOCK_CPPFLAGS]), ["$gmock_CPPFLAGS"])
AC_SUBST(AS_TR_CPP([GMOCK_LDFLAGS]), ["$gmock_LDFLAGS"])
AC_SUBST(AS_TR_CPP([GMOCK_LIBS]), ["$gmock_LIBS"])
+ AM_CONDITIONAL([HAVE_GMOCK], true)
fi
CPPFLAGS="$SAVE_CPPFLAGS"
diff --git a/extractor/Makefile.am b/extractor/Makefile.am
index 8f76dea5..df796cea 100644
--- a/extractor/Makefile.am
+++ b/extractor/Makefile.am
@@ -1,63 +1,68 @@
bin_PROGRAMS = compile run_extractor
-noinst_PROGRAMS = \
- alignment_test \
- binary_search_merger_test \
- data_array_test \
- fast_intersector_test \
- feature_count_source_target_test \
- feature_is_source_singleton_test \
- feature_is_source_target_singleton_test \
- feature_max_lex_source_given_target_test \
- feature_max_lex_target_given_source_test \
- feature_sample_source_count_test \
- feature_target_given_source_coherent_test \
- grammar_extractor_test \
- intersector_test \
- linear_merger_test \
- matching_comparator_test \
- matching_test \
- matchings_finder_test \
- phrase_test \
- precomputation_test \
- rule_extractor_helper_test \
- rule_extractor_test \
- rule_factory_test \
- sampler_test \
- scorer_test \
- suffix_array_test \
- target_phrase_extractor_test \
- translation_table_test \
- veb_test
+EXTRA_PROGRAMS = alignment_test \
+ binary_search_merger_test \
+ data_array_test \
+ fast_intersector_test \
+ feature_count_source_target_test \
+ feature_is_source_singleton_test \
+ feature_is_source_target_singleton_test \
+ feature_max_lex_source_given_target_test \
+ feature_max_lex_target_given_source_test \
+ feature_sample_source_count_test \
+ feature_target_given_source_coherent_test \
+ grammar_extractor_test \
+ intersector_test \
+ linear_merger_test \
+ matching_comparator_test \
+ matching_test \
+ matchings_finder_test \
+ phrase_test \
+ precomputation_test \
+ rule_extractor_helper_test \
+ rule_extractor_test \
+ rule_factory_test \
+ sampler_test \
+ scorer_test \
+ suffix_array_test \
+ target_phrase_extractor_test \
+ translation_table_test \
+ veb_test
-TESTS = alignment_test \
- binary_search_merger_test \
- data_array_test \
- fast_intersector_test \
- feature_count_source_target_test \
- feature_is_source_singleton_test \
- feature_is_source_target_singleton_test \
- feature_max_lex_source_given_target_test \
- feature_max_lex_target_given_source_test \
- feature_sample_source_count_test \
- feature_target_given_source_coherent_test \
- grammar_extractor_test \
- intersector_test \
- linear_merger_test \
- matching_comparator_test \
- matching_test \
- matchings_finder_test \
- phrase_test \
- precomputation_test \
- rule_extractor_helper_test \
- rule_extractor_test \
- rule_factory_test \
- sampler_test \
- scorer_test \
- suffix_array_test \
- target_phrase_extractor_test \
- translation_table_test \
- veb_test
+if HAVE_GTEST
+ RUNNABLE_TESTS = alignment_test \
+ binary_search_merger_test \
+ data_array_test \
+ fast_intersector_test \
+ feature_count_source_target_test \
+ feature_is_source_singleton_test \
+ feature_is_source_target_singleton_test \
+ feature_max_lex_source_given_target_test \
+ feature_max_lex_target_given_source_test \
+ feature_sample_source_count_test \
+ feature_target_given_source_coherent_test \
+ grammar_extractor_test \
+ intersector_test \
+ linear_merger_test \
+ matching_comparator_test \
+ matching_test \
+ matchings_finder_test \
+ phrase_test \
+ precomputation_test \
+ rule_extractor_helper_test \
+ rule_extractor_test \
+ rule_factory_test \
+ sampler_test \
+ scorer_test \
+ suffix_array_test \
+ target_phrase_extractor_test \
+ translation_table_test \
+ veb_test
+endif
+
+noinst_PROGRAMS = $(RUNNABLE_TESTS)
+
+TESTS = $(RUNNABLE_TESTS)
alignment_test_SOURCES = alignment_test.cc
alignment_test_LDADD = $(GTEST_LDFLAGS) $(GTEST_LIBS) libextractor.a