Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kpu/kenlm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2020-10-01 19:58:13 +0300
committerKenneth Heafield <github@kheafield.com>2020-10-01 19:58:13 +0300
commitf214294469950effc2151ad462f577feadb1c445 (patch)
tree57ab33c591fa4be13ae3139d9f2737305c253fb5
parentb63a09cebd4b94a78c876ee250bcc3dc49491da6 (diff)
OpenMP fix for mac?
-rw-r--r--lm/interpolate/CMakeLists.txt12
1 files changed, 5 insertions, 7 deletions
diff --git a/lm/interpolate/CMakeLists.txt b/lm/interpolate/CMakeLists.txt
index dc6c05e..c5c7fd2 100644
--- a/lm/interpolate/CMakeLists.txt
+++ b/lm/interpolate/CMakeLists.txt
@@ -17,16 +17,14 @@ if(ENABLE_INTERPOLATE)
tune_weights.cc
universal_vocab.cc)
+ add_library(kenlm_interpolate ${KENLM_INTERPOLATE_SOURCE})
+ target_link_libraries(kenlm_interpolate PUBLIC kenlm Eigen3::Eigen)
+
find_package(OpenMP)
- if (OPENMP_FOUND)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
- else()
- message(STATUS "OpenMP support would be nice for parallelizing matrix operations.")
+ if (OPENMP_CXX_FOUND)
+ target_link_libraries(kenlm_interpolate PUBLIC OpenMP::OpenMP_CXX)
endif()
- add_library(kenlm_interpolate ${KENLM_INTERPOLATE_SOURCE})
- target_link_libraries(kenlm_interpolate PUBLIC kenlm Eigen3::Eigen)
set(KENLM_INTERPOLATE_EXES
interpolate