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 --- training/utils/CMakeLists.txt | 32 +++++++++++++++++++++++++++++ training/utils/Makefile.am | 48 ------------------------------------------- 2 files changed, 32 insertions(+), 48 deletions(-) create mode 100644 training/utils/CMakeLists.txt delete mode 100644 training/utils/Makefile.am (limited to 'training/utils') diff --git a/training/utils/CMakeLists.txt b/training/utils/CMakeLists.txt new file mode 100644 index 00000000..1734ee73 --- /dev/null +++ b/training/utils/CMakeLists.txt @@ -0,0 +1,32 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../utils) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../mteval) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder) + +set(training_utils_STAT_SRCS + candidate_set.h + entropy.h + lbfgs.h + online_optimizer.h + optimize.h + risk.h + sentserver.h + candidate_set.cc + entropy.cc + optimize.cc + online_optimizer.cc + risk.cc) + +add_library(training_utils STATIC ${training_utils_STAT_SRCS}) + + +set(sentserver_SRCS sentserver.cc) +add_executable(sentserver ${sentserver_SRCS}) +target_link_libraries(sentserver) + +set(sentclient_SRCS sentclient.cc) +add_executable(sentclient ${sentclient_SRCS}) +target_link_libraries(sentclient) + +set(grammar_convert_SRCS grammar_convert.cc) +add_executable(grammar_convert ${grammar_convert_SRCS}) +target_link_libraries(grammar_convert libcdec mteval utils ${Boost_LIBRARIES} z) diff --git a/training/utils/Makefile.am b/training/utils/Makefile.am deleted file mode 100644 index edaaf3d4..00000000 --- a/training/utils/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -noinst_LIBRARIES = libtraining_utils.a - -bin_PROGRAMS = \ - sentserver \ - sentclient \ - grammar_convert - -noinst_PROGRAMS = \ - lbfgs_test \ - optimize_test - -EXTRA_DIST = decode-and-evaluate.pl libcall.pl parallelize.pl - -sentserver_SOURCES = sentserver.cc -sentserver_LDFLAGS = $(PTHREAD_LIBS) -sentserver_CXXFLAGS = $(PTHREAD_CFLAGS) - -sentclient_SOURCES = sentclient.cc -sentclient_LDFLAGS = $(PTHREAD_LIBS) -sentclient_CXXFLAGS = $(PTHREAD_CFLAGS) - -TESTS = lbfgs_test optimize_test - -libtraining_utils_a_SOURCES = \ - candidate_set.h \ - entropy.h \ - lbfgs.h \ - online_optimizer.h \ - optimize.h \ - risk.h \ - sentserver.h \ - candidate_set.cc \ - entropy.cc \ - optimize.cc \ - online_optimizer.cc \ - risk.cc - -optimize_test_SOURCES = optimize_test.cc -optimize_test_LDADD = libtraining_utils.a ../../utils/libutils.a - -grammar_convert_SOURCES = grammar_convert.cc -grammar_convert_LDADD = ../../decoder/libcdec.a ../../mteval/libmteval.a ../../utils/libutils.a - -lbfgs_test_SOURCES = lbfgs_test.cc -lbfgs_test_LDADD = ../../utils/libutils.a - -AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/decoder -I$(top_srcdir)/utils -I$(top_srcdir)/mteval -I$(top_srcdir)/klm - -- cgit v1.2.3