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 --- 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 ++++-- 5 files changed, 17 insertions(+), 22 deletions(-) (limited to 'training') 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}) -- cgit v1.2.3