forked from bitextor/bitextor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (46 loc) · 1.76 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
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 11)
project(bitextor)
set(PREPROCESS_PATH "${PROJECT_SOURCE_DIR}/third_party/preprocess")
set(SKIP_PREPROCESS_BUILD ON) # avoid compiling preprocess a million times
set(CMAKE_BUILD_TYPE "Release")
include(GNUInstallDirs)
# override output paths of children to put everything in the same folder
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
if(NOT SKIP_PREPROCESS)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/preprocess preprocess)
install(TARGETS b64filter cache docenc foldfilter mmhsum
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()
if(NOT SKIP_WARC2TEXT)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/warc2text warc2text)
endif()
if(NOT SKIP_PREVERTICAL2TEXT)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/prevertical2text prevertical2text)
endif()
if(NOT SKIP_BLEUALIGN)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/bleualign-cpp bleualign-cpp)
endif()
if (NOT SKIP_HUNALIGN)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/hunalign/src)
install(PROGRAMS ${PROJECT_BINARY_DIR}/bin/hunalign
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()
if (NOT SKIP_DOCALIGN)
set(BUILD_TESTING OFF)
add_subdirectory(${PROJECT_SOURCE_DIR}/document-aligner document-aligner)
endif()
if (NOT SKIP_BIROAMER)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/biroamer fast_align)
endif()
if (NOT SKIP_MGIZA)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/mgiza/mgizapp mgizapp)
endif()
if (NOT SKIP_KENLM)
set(KENLM_MAX_ORDER 7)
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/kenlm kenlm)
endif()