-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
199 lines (162 loc) · 3.82 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
cmake_minimum_required(VERSION 3.0)
project(TN93)
#-------------------------------------------------------------------------------
# default installation prefix
#-------------------------------------------------------------------------------
set(INSTALL_PREFIX /usr/local CACHE PATH "Installation prefix")
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE INTERNAL "Installation prefix" FORCE)
set(CMAKE_CONFIGURATION_TYPES Release)
# SET VERSION FROM FILE
file (STRINGS "VERSION.txt" VERSION_NUMBER)
add_definitions (-DVERSION_NUMBER=\"${VERSION_NUMBER}\")
add_compile_options (-O3 -std=c++14 -funroll-loops )
add_link_options(-O3 -std=c++14 -funroll-loops)
include_directories(
src/
)
add_executable(
tn93
src/TN93.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse.cpp
)
add_executable(
tn93-cluster
src/cluster.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_cluster.cpp
)
add_executable(
seqcoverage
src/charfreqs.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_cf.cpp
)
add_executable(
readreduce
src/read_reducer.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_merge.cpp
)
add_executable(
nucfreqsfasta
src/nuc_freqs_from_fasta.cpp
src/stringBuffer.cc
src/tn93_shared.cc
)
add_executable(
ShortestPathTN93
src/ShortestPathTN93.cpp
src/stringBuffer.cc
src/tn93_shared.cc
)
add_executable(
selectreads
src/trim_reads.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_trim.cpp
)
add_executable(
validate_fasta
src/validate_fasta.cpp
src/stringBuffer.cc
src/tn93_shared.cc
)
add_executable(
fasta_digest
src/fasta_digest.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_fasta_digest.cpp
)
add_executable(
fasta_diff
src/fasta_diff.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_fasta_diff.cpp
)
add_executable(
seqdiff
src/seqdiff.cpp
src/stringBuffer.cc
src/tn93_shared.cc
src/argparse_seqdiff.cpp
)
#set(DEFAULT_COMPILE_OPTIONS -O3 -std=c++14 -funroll-loops )
#set(DEFAULT_COMPILE_OPTIONS -std=c++14 -g -fsanitize=address -O0)
#set(DEFAULT_LINK_OPTIONS ${DEFAULT_COMPILE_OPTIONS})
#add_definitions(${DEFAULT_COMPILE_OPTIONS})
find_package(OpenMP)
if(${OPENMP_FOUND})
add_definitions(${OpenMP_CXX_FLAGS})
target_link_libraries(tn93 PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(tn93-cluster PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(selectreads PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(seqcoverage PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(readreduce PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(fasta_diff PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(ShortestPathTN93 PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
target_link_libraries(seqdiff PRIVATE ${DEFAULT_LIBRARIES} OpenMP::OpenMP_CXX)
endif(${OPENMP_FOUND})
install(
TARGETS tn93
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS tn93-cluster
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS selectreads
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS seqcoverage
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS readreduce
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS fasta_diff
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS seqdiff
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS fasta_digest
RUNTIME DESTINATION bin
OPTIONAL
)
install(
TARGETS ShortestPathTN93
RUNTIME DESTINATION bin
OPTIONAL
)
add_custom_target(TN93SP
DEPENDS ShortestPathTN93
)
install(
TARGETS nucfreqsfasta
RUNTIME DESTINATION bin
OPTIONAL
)
add_custom_target(NF
DEPENDS nucfreqsfasta
)