-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
468 lines (356 loc) · 20.7 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# Copyright (c) 2021 Christopher Taylor
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Require a recent version of cmake
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# This project is C++ based.
project(miniaturist CXX)
# Instruct cmake to find the HPX settings
include(FindPkgConfig REQUIRED)
find_package(HPX REQUIRED)
find_package(LAPACK REQUIRED)
find_package(BLAS REQUIRED)
find_package(OpenSSL REQUIRED)
pkg_check_modules(ICU18N REQUIRED icu-i18n)
pkg_check_modules(ICUIO REQUIRED icu-io)
pkg_check_modules(ICUUC REQUIRED icu-uc)
if(NOT ICUUC_FOUND)
message("icu could not be found.")
else()
message("-- icu version: " "${ICUUC_VERSION}")
if(ICUUC_VERSION EQUAL "69.1")
add_definitions(-DICU69=1)
endif()
endif()
include_directories(${BLAS_INCLUDE_DIR})
find_package(blaze NO_CMAKE_PACKAGE_REGISTRY)
if(NOT blaze_FOUND)
message("Blaze could not be found. Please specify blaze_DIR to assist locating it.")
endif()
include("${blaze_DIR}/blaze-config-version.cmake")
message("-- Blaze version: " "${PACKAGE_VERSION}")
find_package(pybind11 NO_CMAKE_PACKAGE_REGISTRY)
if(NOT pybind11_FOUND)
message("-- pybind11 could not be found. Please specify pybind11_DIR to assist locating it.")
endif()
message("-- pybind11_DIR defined: " "${pybind11_DIR}")
#include_directories(${pybind11_INCLUDE_DIR})
#pybind11_add_module(pyparlda pyparlda.cpp)
add_library(ldaobj OBJECT jch.cpp documents.cpp results.cpp gibbs.cpp)
target_include_directories(ldaobj PUBLIC ${LAPACK_INCLUDE_DIRS})
target_include_directories(ldaobj PUBLIC ${BLAS_INCLUDE_DIRS})
target_include_directories(ldaobj PUBLIC ${ICU18N_INCLUDE_DIRS})
target_include_directories(ldaobj PUBLIC ${ICUIO_INCLUDE_DIRS})
target_include_directories(ldaobj PUBLIC ${ICUUC_INCLUDE_DIRS})
target_include_directories(ldaobj PUBLIC ${OPENSSL_INCLUDE_DIRS})
target_compile_options(ldaobj PUBLIC ${ICU18N_CFLAGS_OTHER})
target_compile_options(ldaobj PUBLIC ${ICUIO_CFLAGS_OTHER})
target_compile_options(ldaobj PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_directories(ldaobj PUBLIC ${OPENSSL_LIBRARY_DIRS})
if(DEFINED libhdfs3_DIR)
message("-- libhdfs3_DIR defined: " "${libhdfs3_DIR}")
if(EXISTS "${libhdfs3_DIR}/include/hdfs/hdfs.h")
message("-- Found libhdfs3.h")
if(EXISTS "${libhdfs3_DIR}/lib/libhdfs3.so")
message("-- Found libhdfs3.so")
add_executable(distparldahdfs hdfs_support.cpp distparldahdfs.cpp)
target_link_libraries(distparldahdfs ldaobj distparldalib)
target_compile_options(distparldahdfs PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_compile_definitions(distparldahdfs PUBLIC BLAZE_USE_HPX_THREADS BLAZE_USE_STATIC_MEMORY_PARALLELIZATION BLAZE_USE_HPX_THREADS)
target_link_libraries(distparldahdfs -lstdc++fs)
target_link_libraries(distparldahdfs ${HPX_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(distparldahdfs ${LAPACK_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(distparldahdfs ${BLAS_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(distparldahdfs ${ICU18N_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(distparldahdfs PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(distparldahdfs ${ICUIO_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(distparldahdfs PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(distparldahdfs ${ICUUC_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(distparldahdfs PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(distparldahdfs ${OPENSSL_LIBRARIES})
target_link_directories(distparldahdfs PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(distparldahdfs PUBLIC ${OPENSSL_INCLUDE_DIRS})
target_link_libraries(distparldahdfs -lhdfs3)
target_link_directories(distparldahdfs PUBLIC ${libhdfs3_DIR}/lib)
target_include_directories(distparldahdfs PUBLIC ${libhdfs3_DIR}/include)
add_executable(distvocabhdfs jch.cpp hdfs_support.cpp distvocabhdfs.cpp)
target_compile_options(distvocabhdfs PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_link_libraries(distvocabhdfs -lstdc++fs)
target_link_libraries(distvocabhdfs ${HPX_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(distvocabhdfs ${LAPACK_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(distvocabhdfs ${BLAS_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(distvocabhdfs ${ICU18N_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(distvocabhdfs PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(distvocabhdfs ${ICUIO_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(distvocabhdfs PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(distvocabhdfs ${ICUUC_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(distvocabhdfs PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(distvocabhdfs ${OPENSSL_LIBRARIES})
target_link_directories(distvocabhdfs PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(distvocabhdfs PUBLIC ${OPENSSL_INCLUDE_DIRS})
target_link_libraries(distvocabhdfs -lhdfs3)
target_link_directories(distvocabhdfs PUBLIC ${libhdfs3_DIR}/lib)
target_include_directories(distvocabhdfs PUBLIC ${libhdfs3_DIR}/include)
install(
# install all miniaturist hdfs header files
FILES ${PROJECT_SOURCE_DIR}/hdfs_support.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/miniaturist
)
install(
# install all miniaturist hdfs program files
FILES ${CMAKE_CURRENT_BINARY_DIR}/distparldahdfs ${CMAKE_CURRENT_BINARY_DIR}/distvocabhdfs
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
else()
message("-- libhdfs3.so not found; distvocabhdfs distparldahdfs will not be built")
endif()
else()
message("-- libhdfs3.h not found; distvocabhdfs distparldahdfs will not be built.")
endif()
else()
message("-- libhdfs3_DIR not defined; distvocabhdfs distparldahdfs will not be built.")
endif()
add_library(ldalib STATIC ldalib.cpp)
target_link_libraries(ldalib ldaobj)
target_link_libraries(ldalib ${LAPACK_LIBRARIES})
target_link_directories(ldalib PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(ldalib PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(ldalib ${BLAS_LIBRARIES})
target_link_directories(ldalib PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(ldalib PUBLIC ${BLAS_INCLUDE_DIRS})
add_executable(lda lda.cpp)
target_link_libraries(lda ldalib)
target_compile_options(lda PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_link_libraries(lda -lstdc++fs)
target_link_libraries(lda ${LAPACK_LIBRARIES})
target_link_directories(lda PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(lda PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(lda ${BLAS_LIBRARIES})
target_link_directories(lda PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(lda PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(lda ${ICU18N_LIBRARIES})
target_link_directories(lda PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(lda PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(lda PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(lda ${ICUIO_LIBRARIES})
target_link_directories(lda PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(lda PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(lda PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(lda ${ICUUC_LIBRARIES})
target_link_directories(lda PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(lda PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(lda PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(lda ${OPENSSL_LIBRARIES})
target_link_directories(lda PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(lda PUBLIC ${OPENSSL_INCLUDE_DIRS})
add_library(parldalib STATIC parldalib.cpp)
target_link_libraries(parldalib ldaobj)
target_compile_options(parldalib PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_compile_definitions(parldalib PUBLIC BLAZE_USE_HPX_THREADS BLAZE_USE_STATIC_MEMORY_PARALLELIZATION BLAZE_USE_HPX_THREADS)
target_link_libraries(parldalib ${HPX_LIBRARIES})
target_link_directories(parldalib PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(parldalib PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(parldalib ${LAPACK_LIBRARIES})
target_link_directories(parldalib PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(parldalib PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(parldalib ${BLAS_LIBRARIES})
target_link_directories(parldalib PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(parldalib PUBLIC ${BLAS_INCLUDE_DIRS})
add_executable(parlda parlda.cpp)
target_link_libraries(parlda parldalib)
target_compile_options(parlda PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_compile_definitions(parlda PUBLIC BLAZE_USE_HPX_THREADS BLAZE_USE_STATIC_MEMORY_PARALLELIZATION BLAZE_USE_HPX_THREADS)
target_link_libraries(parlda -lstdc++fs)
target_link_libraries(parlda ${HPX_LIBRARIES})
target_link_directories(parlda PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(parlda ${LAPACK_LIBRARIES})
target_link_directories(parlda PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(parlda ${BLAS_LIBRARIES})
target_link_directories(parlda PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(parlda ${ICU18N_LIBRARIES})
target_link_directories(parlda PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(parlda PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(parlda ${ICUIO_LIBRARIES})
target_link_directories(parlda PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(parlda PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(parlda ${ICUUC_LIBRARIES})
target_link_directories(parlda PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(parlda PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(parlda ${OPENSSL_LIBRARIES})
target_link_directories(parlda PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(parlda PUBLIC ${OPENSSL_INCLUDE_DIRS})
add_library(distparldalib STATIC distparldalib.cpp)
target_link_libraries(distparldalib ldaobj)
target_compile_options(distparldalib PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_compile_definitions(distparldalib PUBLIC BLAZE_USE_HPX_THREADS BLAZE_USE_STATIC_MEMORY_PARALLELIZATION BLAZE_USE_HPX_THREADS)
target_link_libraries(distparldalib ${HPX_LIBRARIES})
target_link_directories(distparldalib PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(distparldalib PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(distparldalib ${LAPACK_LIBRARIES})
target_link_directories(distparldalib PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(distparldalib PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(distparldalib ${BLAS_LIBRARIES})
target_link_directories(distparldalib PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(distparldalib PUBLIC ${BLAS_INCLUDE_DIRS})
add_executable(distparlda distparlda.cpp)
target_link_libraries(distparlda distparldalib)
target_compile_options(distparlda PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_compile_definitions(distparlda PUBLIC BLAZE_USE_HPX_THREADS BLAZE_USE_STATIC_MEMORY_PARALLELIZATION BLAZE_USE_HPX_THREADS)
target_link_libraries(distparlda -lstdc++fs)
target_link_libraries(distparlda ${HPX_LIBRARIES})
target_link_directories(distparlda PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(distparlda ${LAPACK_LIBRARIES})
target_link_directories(distparlda PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(distparlda ${BLAS_LIBRARIES})
target_link_directories(distparlda PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(distparlda ${ICU18N_LIBRARIES})
target_link_directories(distparlda PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(distparlda PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(distparlda ${ICUIO_LIBRARIES})
target_link_directories(distparlda PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(distparlda PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(distparlda ${ICUUC_LIBRARIES})
target_link_directories(distparlda PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(distparlda PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(distparlda ${OPENSSL_LIBRARIES})
target_link_directories(distparlda PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(distparlda PUBLIC ${OPENSSL_INCLUDE_DIRS})
add_executable(vocab jch.cpp documents.cpp vocab.cpp)
target_compile_options(vocab PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_link_libraries(vocab -lstdc++fs)
target_link_libraries(vocab ${LAPACK_LIBRARIES})
target_link_directories(vocab PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(vocab PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(vocab ${BLAS_LIBRARIES})
target_link_directories(vocab PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(vocab PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(vocab ${ICU18N_LIBRARIES})
target_link_directories(vocab PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(vocab PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(vocab PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(vocab ${ICUIO_LIBRARIES})
target_link_directories(vocab PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(vocab PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(vocab PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(vocab ${ICUUC_LIBRARIES})
target_link_directories(vocab PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(vocab PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(vocab PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(vocab ${OPENSSL_LIBRARIES})
target_link_directories(vocab PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(vocab PUBLIC ${OPENSSL_INCLUDE_DIRS})
add_executable(distvocab jch.cpp documents.cpp distvocab.cpp)
target_compile_options(distvocab PUBLIC ${DISTPARLDA_CONFIG_DEFINITIONS})
target_link_libraries(distvocab -lstdc++fs)
target_link_libraries(distvocab ${HPX_LIBRARIES})
target_link_directories(distvocab PUBLIC ${HPX_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${HPX_INCLUDE_DIRS})
target_link_libraries(distvocab ${LAPACK_LIBRARIES})
target_link_directories(distvocab PUBLIC ${LAPACK_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${LAPACK_INCLUDE_DIRS})
target_link_libraries(distvocab ${BLAS_LIBRARIES})
target_link_directories(distvocab PUBLIC ${BLAS_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${BLAS_INCLUDE_DIRS})
target_link_libraries(distvocab ${ICU18N_LIBRARIES})
target_link_directories(distvocab PUBLIC ${ICU18N_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${ICU18N_INCLUDE_DIRS})
target_compile_options(distvocab PUBLIC ${ICU18N_CFLAGS_OTHER})
target_link_libraries(distvocab ${ICUIO_LIBRARIES})
target_link_directories(distvocab PUBLIC ${ICUIO_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${ICUIO_INCLUDE_DIRS})
target_compile_options(distvocab PUBLIC ${ICUIO_CFLAGS_OTHER})
target_link_libraries(distvocab ${ICUUC_LIBRARIES})
target_link_directories(distvocab PUBLIC ${ICUUC_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${ICUUC_INCLUDE_DIRS})
target_compile_options(distvocab PUBLIC ${ICUUC_CFLAGS_OTHER})
target_link_libraries(distvocab ${OPENSSL_LIBRARIES})
target_link_directories(distvocab PUBLIC ${OPENSSL_LIBRARY_DIRS})
target_include_directories(distvocab PUBLIC ${OPENSSL_INCLUDE_DIRS})
install(
# install all miniaturist header files
FILES ${PROJECT_SOURCE_DIR}/gibbs.hpp ${PROJECT_SOURCE_DIR}/inverted_index.hpp ${PROJECT_SOURCE_DIR}/jch.hpp ${PROJECT_SOURCE_DIR}/parldalib.hpp ${PROJECT_SOURCE_DIR}/results.hpp ${PROJECT_SOURCE_DIR}/distparldalib.hpp ${PROJECT_SOURCE_DIR}/documents.hpp ${PROJECT_SOURCE_DIR}/hdfs_support.hpp ${PROJECT_SOURCE_DIR}/inverted_index_serialize.hpp ${PROJECT_SOURCE_DIR}/ldalib.hpp ${PROJECT_SOURCE_DIR}/serialize.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/miniaturist
)
install(
# install all miniaturist library files
FILES ${CMAKE_CURRENT_BINARY_DIR}/libdistparldalib.a ${CMAKE_CURRENT_BINARY_DIR}/libldalib.a ${CMAKE_CURRENT_BINARY_DIR}/libparldalib.a
DESTINATION ${CMAKE_INSTALL_LIBDIR}/miniaturist
)
install(
# install all miniaturist program files
FILES ${CMAKE_CURRENT_BINARY_DIR}/distparlda ${CMAKE_CURRENT_BINARY_DIR}/lda ${CMAKE_CURRENT_BINARY_DIR}/parlda ${CMAKE_CURRENT_BINARY_DIR}/distvocab ${CMAKE_CURRENT_BINARY_DIR}/vocab
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(pybind11_FOUND)
pybind11_add_module(pylda jch.cpp documents.cpp results.cpp gibbs.cpp ldalib.cpp pylda.cpp)
target_link_libraries(pylda PRIVATE -lstdc++fs)
target_link_libraries(pylda PRIVATE ${LAPACK_LIBRARIES})
target_link_directories(pylda PRIVATE ${LAPACK_LIBRARY_DIRS})
target_include_directories(pylda PRIVATE ${LAPACK_INCLUDE_DIRS})
target_link_libraries(pylda PRIVATE ${BLAS_LIBRARIES})
target_link_directories(pylda PRIVATE ${BLAS_LIBRARY_DIRS})
target_include_directories(pylda PRIVATE ${BLAS_INCLUDE_DIRS})
target_link_libraries(pylda PRIVATE ${ICU18N_LIBRARIES})
target_link_directories(pylda PRIVATE ${ICU18N_LIBRARY_DIRS})
target_include_directories(pylda PRIVATE ${ICU18N_INCLUDE_DIRS})
target_compile_options(pylda PRIVATE ${ICU18N_CFLAGS_OTHER})
target_link_libraries(pylda PRIVATE ${ICUIO_LIBRARIES})
target_link_directories(pylda PRIVATE ${ICUIO_LIBRARY_DIRS})
target_include_directories(pylda PRIVATE ${ICUIO_INCLUDE_DIRS})
target_compile_options(pylda PRIVATE ${ICUIO_CFLAGS_OTHER})
target_link_libraries(pylda PRIVATE ${ICUUC_LIBRARIES})
target_link_directories(pylda PRIVATE ${ICUUC_LIBRARY_DIRS})
target_include_directories(pylda PRIVATE ${ICUUC_INCLUDE_DIRS})
target_compile_options(pylda PRIVATE ${ICUUC_CFLAGS_OTHER})
target_link_libraries(pylda PRIVATE ${OPENSSL_LIBRARIES})
target_link_directories(pylda PRIVATE ${OPENSSL_LIBRARY_DIRS})
target_include_directories(pylda PRIVATE ${OPENSSL_INCLUDE_DIRS})
target_include_directories(pylda PRIVATE ${pybind11_INCLUDE_DIR})
endif()