summaryrefslogtreecommitdiff
path: root/training/pro
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2015-04-02 00:50:04 -0400
committerChris Dyer <redpony@gmail.com>2015-04-02 00:50:04 -0400
commit5ee02ce1602f2fce6d5af5db93c2278fe6c9ede5 (patch)
tree7ebad8dd99e38d190c579f425c3eb959363e96e5 /training/pro
parente7d77de8a9b9929b22fc6562f88f3668900f9662 (diff)
parent737ed7a7f932b1a7e40d2755bcdee6bc0aa2de63 (diff)
Merge pull request #70 from redpony/cmake
Cmake
Diffstat (limited to 'training/pro')
-rw-r--r--training/pro/CMakeLists.txt18
-rw-r--r--training/pro/Makefile.am13
-rw-r--r--training/pro/mr_pro_reduce.cc1
3 files changed, 18 insertions, 14 deletions
diff --git a/training/pro/CMakeLists.txt b/training/pro/CMakeLists.txt
new file mode 100644
index 00000000..5ee09a74
--- /dev/null
+++ b/training/pro/CMakeLists.txt
@@ -0,0 +1,18 @@
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../utils)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../utils)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../mteval)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder)
+
+########### next target ###############
+
+set(mr_pro_map_SRCS mr_pro_map.cc)
+add_executable(mr_pro_map ${mr_pro_map_SRCS})
+target_link_libraries(mr_pro_map training_utils libcdec ksearch mteval utils klm klm_util klm_util_double ${Boost_LIBRARIES} z)
+
+########### next target ###############
+
+set(mr_pro_reduce_SRCS mr_pro_reduce.cc)
+add_executable(mr_pro_reduce ${mr_pro_reduce_SRCS})
+target_link_libraries(mr_pro_reduce lbfgs utils ${Boost_LIBRARIES} z)
+
diff --git a/training/pro/Makefile.am b/training/pro/Makefile.am
deleted file mode 100644
index 09364804..00000000
--- a/training/pro/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-bin_PROGRAMS = \
- mr_pro_map \
- mr_pro_reduce
-
-mr_pro_map_SOURCES = mr_pro_map.cc
-mr_pro_map_LDADD = ../../training/utils/libtraining_utils.a ../../decoder/libcdec.a ../../mteval/libmteval.a ../../utils/libutils.a
-
-mr_pro_reduce_SOURCES = mr_pro_reduce.cc
-mr_pro_reduce_LDADD = ../../training/liblbfgs/liblbfgs.a ../../utils/libutils.a
-
-EXTRA_DIST = mr_pro_generate_mapper_input.pl pro.pl
-
-AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/utils -I$(top_srcdir)/decoder -I$(top_srcdir)/mteval -I$(top_srcdir)/training/utils -I$(top_srcdir)/training
diff --git a/training/pro/mr_pro_reduce.cc b/training/pro/mr_pro_reduce.cc
index 5ef9b470..a61a3a5f 100644
--- a/training/pro/mr_pro_reduce.cc
+++ b/training/pro/mr_pro_reduce.cc
@@ -18,7 +18,6 @@ namespace po = boost::program_options;
// since this is a ranking model, there should be equal numbers of
// positive and negative examples, so the bias should be 0
-static const double MAX_BIAS = 1e-10;
void InitCommandLine(int argc, char** argv, po::variables_map* conf) {
po::options_description opts("Configuration options");