forked from migumar2/libCSD
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
119 lines (96 loc) · 2.33 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
cmake_minimum_required(VERSION 3.14)
project(CSD)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
add_subdirectory(libcds)
include_directories(libcds/includes)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(base_srcs
StringDictionary.cpp
StringDictionaryFMINDEX.cpp
StringDictionaryHASHHF.cpp
StringDictionaryHASHRPDAC.cpp
StringDictionaryHASHRPF.cpp
StringDictionaryHASHUFFDAC.cpp
StringDictionaryHHTFC.cpp
StringDictionaryHTFC.cpp
StringDictionaryPFC.cpp
StringDictionaryRPDAC.cpp
StringDictionaryRPFC.cpp
StringDictionaryRPHTFC.cpp
StringDictionaryXBW.cpp
StringDictionaryHASHRPDACBlocks.cpp
)
set(fmindex_srcs
FMIndex/SSA.cpp
FMIndex/SuffixArray.cpp
)
set(hash_srcs
Hash/HashBBdh.cpp
Hash/HashBdh.cpp
Hash/Hash.cpp
Hash/HashDAC.cpp
Hash/Hashdh.cpp
)
set(huffman_srcs
Huffman/huff.cpp
Huffman/Huffman.cpp
)
set(hutucker_srcs
HuTucker/HuTucker.cpp
)
set(repair_srcs
RePair/Coder/arrayg.cpp
RePair/Coder/basics.cpp
RePair/Coder/CRePair.cpp
RePair/Coder/dictionary.cpp
RePair/Coder/hash.cpp
RePair/Coder/heap.cpp
RePair/Coder/IRePair.cpp
RePair/Coder/records.cpp
RePair/RePair.cpp
)
set(utils_srcs
utils/DAC_BVLS.cpp
utils/DAC_VLS.cpp
utils/LogSequence.cpp
utils/VByte.cpp
utils/Coder/BinaryNode.cpp
utils/Coder/Coder.cpp
utils/Coder/DecodingTableBuilder.cpp
utils/Coder/DecodingTable.cpp
utils/Coder/DecodingTree.cpp
utils/Coder/StatCoder.cpp
)
set(xbw_srcs
XBW/TrieNode.cpp
XBW/XBW.cpp
)
add_library(CSD
${base_srcs}
${fmindex_srcs}
${hash_srcs}
${huffman_srcs}
${hutucker_srcs}
${repair_srcs}
${utils_srcs}
${xbw_srcs}
)
add_dependencies(CSD cds)
find_package(GTest QUIET)
if(GTest_FOUND)
enable_testing()
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(pfc_test test/pfc_test.cpp)
target_link_libraries(pfc_test CSD cds ${GTEST_BOTH_LIBRARIES} pthread)
add_executable(hrpdac_blocks_test test/hrpdac_blocks_test.cpp)
target_link_libraries(hrpdac_blocks_test CSD cds ${GTEST_BOTH_LIBRARIES} pthread)
add_executable(parallel_test test/parallel_test.cpp)
target_link_libraries(parallel_test CSD cds ${GTEST_BOTH_LIBRARIES} pthread)
add_test(NAME pfc_test COMMAND ./pfc_test)
add_test(NAME hrpdac_blocks_test COMMAND ./hrpdac_blocks_test)
add_test(NAME parallel_test COMMAND ./parallel_test)
endif()