From 89bc8b1d36946c7dff14a9d189c8c0fe27d7049e Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 18 Apr 2016 14:49:35 +0000 Subject: [PATCH] User-specified kenlm path --- CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ca5a6c5..4bb21fe3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,10 +19,15 @@ else(Boost_FOUND) endif(Boost_FOUND) ### KenLM stuff - BEGIN ### -set(EXT_LIBS ${EXT_LIBS} /home/marcinj/Badania/kenlm/build/lib/libkenlm.a) -set(EXT_LIBS ${EXT_LIBS} /home/marcinj/Badania/kenlm/build/lib/libkenlm_util.a) -include_directories(/home/marcinj/Badania/kenlm) -add_definitions(-DKENLM_MAX_ORDER=9) +set(KENLM CACHE STRING "Path to compiled kenlm directory") +if (NOT EXISTS "${KENLM}/build/lib/libkenlm.a") + message(FATAL_ERROR "Could not find ${KENLM}/build/lib/libkenlm.a") +endif() + +set(EXT_LIBS ${EXT_LIBS} ${KENLM}/build/lib/libkenlm.a) +set(EXT_LIBS ${EXT_LIBS} ${KENLM}/build/lib/libkenlm_util.a) +include_directories(${KENLM}) +add_definitions(-DKENLM_MAX_ORDER=6) #find_package (OpenMP) #if (OPENMP_FOUND)