-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathCMakeLists.txt
654 lines (604 loc) · 24.8 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
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
# Specify the minimum version for CMake
cmake_minimum_required(VERSION 3.1)
# Project's name
project(odgi)
# We build using c++17
set(CMAKE_CXX_STANDARD 17)
# Use all standard-compliant optimizations
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -O3 -g")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -O3 -g")
#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O -g -fsanitize=address")
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O -g -fsanitize=address")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# assumes clang build
# we can't reliably detect when we're using clang, so for the time being we assume
# TODO: can't we though?
# adapted from https://stackoverflow.com/questions/46414660/macos-cmake-and-openmp
# find_package(OpenMP) does not work reliably on macOS, so we do its work ourselves
set (OpenMP_C "${CMAKE_C_COMPILER}")
set (OpenMP_C_FLAGS " -Xpreprocessor -fopenmp -I/opt/local/include/libomp -I/usr/local/include -L/opt/local/lib/libomp -L/usr/local/lib")
set (OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
set (OpenMP_CXX "${CMAKE_CXX_COMPILER}")
set (OpenMP_CXX_FLAGS " -Xpreprocessor -fopenmp -I/opt/local/include/libomp -I/usr/local/include -L/opt/local/lib/libomp -L/usr/local/lib")
set (OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
set (OpenMP_libomp_LIBRARY "omp")
set (OpenMP_libgomp_LIBRARY "gomp")
set (OpenMP_libiomp5_LIBRARY "iomp5")
# and now add the OpenMP parameters to the compile flags
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS} -lomp")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
find_package(OpenMP REQUIRED)
# add the flags it detects to the compile flags
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -fopenmp")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fopenmp")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Set the output folder where your program will be created
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib)
# The following folder will be included
include_directories("${PROJECT_SOURCE_DIR}")
# Add external projects
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
# TODO: We're using INSTALL_DIR very wrong. We *should* be actually installing
# the external projects into their prefixes and working with the installed
# files. Instead we're building but not installing them and trying to work with
# the non-installed build trees.
#
# Hence the blanked out INSTALL_COMMANDs to suppress the install step.
#
# We need to NOT blank out UPDATE_COMMAND or we can never change the Git revision we point to.
# The cost of this is that we have to re-configure on every build if we do update.
# sdsl-lite (full build using its cmake config)
ExternalProject_Add(sdsl-lite
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/sdsl-lite"
CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
UPDATE_COMMAND ""
INSTALL_COMMAND "")
ExternalProject_Get_property(sdsl-lite INSTALL_DIR)
set(sdsl-lite_INCLUDE "${INSTALL_DIR}/src/sdsl-lite-build/include")
set(sdsl-lite-divsufsort_INCLUDE "${INSTALL_DIR}/src/sdsl-lite-build/external/libdivsufsort/include")
set(sdsl-lite_LIB "${INSTALL_DIR}/src/sdsl-lite-build/lib")
set(sdsl-lite-divsufsort_LIB "${INSTALL_DIR}/src/sdsl-lite-build/external/libdivsufsort/lib")
# DYNAMIC (full build using its cmake config)
ExternalProject_Add(dynamic
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/DYNAMIC"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(dynamic SOURCE_DIR)
set(dynamic_INCLUDE "${SOURCE_DIR}/include")
# hopscotch_map (required by DYNAMIC)
ExternalProject_Add(hopscotch_map
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/hopscotch-map"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(hopscotch_map SOURCE_DIR)
set(hopscotch_map_INCLUDE "${SOURCE_DIR}/include")
# gfakluge (now header only)
ExternalProject_Add(gfakluge
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/gfakluge"
CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(gfakluge SOURCE_DIR)
set(gfakluge_INCLUDE "${SOURCE_DIR}/src")
set(gfakluge_tinyFA_INCLUDE "${SOURCE_DIR}/src/tinyFA")
ExternalProject_Get_property(gfakluge INSTALL_DIR)
set(gfakluge_LIB "${INSTALL_DIR}/src/gfakluge")
# libhandlegraph (full build using its cmake config)
ExternalProject_Add(handlegraph
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/libhandlegraph"
CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>")
ExternalProject_Get_property(handlegraph INSTALL_DIR)
set(handlegraph_INCLUDE "${INSTALL_DIR}/include")
set(handlegraph_LIB "${INSTALL_DIR}/lib")
# taywee's C++ args library, header only
ExternalProject_Add(tayweeargs
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/args"
UPDATE_COMMAND ""
INSTALL_COMMAND "")
ExternalProject_Get_property(tayweeargs SOURCE_DIR)
set(tayweeargs_INCLUDE "${SOURCE_DIR}")
# BBHash perfect hasher
ExternalProject_Add(bbhash
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/BBHash"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(bbhash SOURCE_DIR)
set(bbhash_INCLUDE "${SOURCE_DIR}")
# sparsepp
ExternalProject_Add(sparsepp
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/sparsepp"
BUILD_IN_SOURCE TRUE
CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(sparsepp SOURCE_DIR)
set(sparsepp_INCLUDE "${SOURCE_DIR}/sparsepp/")
ExternalProject_Get_property(sparsepp INSTALL_DIR)
set(sparsepp_LIB "${INSTALL_DIR}/src/sparsepp/sparsepp/")
# ska
ExternalProject_Add(ska
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/flat_hash_map"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(ska SOURCE_DIR)
set(ska_INCLUDE "${SOURCE_DIR}")
# intervaltree
ExternalProject_Add(intervaltree
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/intervaltree"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(intervaltree SOURCE_DIR)
set(intervaltree_INCLUDE "${SOURCE_DIR}")
# cgranges
ExternalProject_Add(cgranges
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/cgranges"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(cgranges SOURCE_DIR)
set(cgranges_INCLUDE "${SOURCE_DIR}/cpp")
# mmmulti (memory mapped multimap, multiset, and interval tree)
ExternalProject_Add(mmmulti
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/mmmulti"
BUILD_COMMAND ""
UPDATE_COMMAND ""
INSTALL_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(mmmulti SOURCE_DIR)
set(mmmulti_INCLUDE "${SOURCE_DIR}/src")
# In-place Parallel Super Scalar Samplesort (IPS⁴o), header only
ExternalProject_Add(ips4o
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/ips4o"
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(ips4o SOURCE_DIR)
set(ips4o_INCLUDE "${SOURCE_DIR}")
# atomic queue library
ExternalProject_Add(atomicqueue
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/atomic_queue/include/atomic_queue"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(atomicqueue SOURCE_DIR)
set(atomicqueue_INCLUDE "${SOURCE_DIR}/")
# lodepng
ExternalProject_Add(lodepng
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/lodepng"
UPDATE_COMMAND ""
INSTALL_COMMAND "")
ExternalProject_Get_property(lodepng SOURCE_DIR)
set(lodepng_INCLUDE "${SOURCE_DIR}")
set(lodepng_LIB "${SOURCE_DIR}/lib")
# structures
ExternalProject_Add(structures
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/structures"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(structures SOURCE_DIR)
set(structures_INCLUDE "${SOURCE_DIR}/src/include")
ExternalProject_Add(picosha256
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/PicoSHA2"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(picosha256 SOURCE_DIR)
set(picosha256_INCLUDE "${SOURCE_DIR}")
# SGD based graph layout
ExternalProject_Add(sgd2
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/sgd2"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(sgd2 SOURCE_DIR)
set(sgd2_INCLUDE "${SOURCE_DIR}/src")
ExternalProject_Add(mondriaan
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/mondriaan"
UPDATE_COMMAND ""
INSTALL_COMMAND "")
ExternalProject_Get_property(mondriaan SOURCE_DIR)
set(mondriaan_INCLUDE "${SOURCE_DIR}/src")
set(mondriaan_LIB "${SOURCE_DIR}/lib")
ExternalProject_Add(libbf
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/libbf"
CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>")
ExternalProject_Get_property(libbf INSTALL_DIR)
#message(STATUS "libbf target " ${INSTALL_DIR})
set(libbf_INCLUDE "${INSTALL_DIR}/include")
set(libbf_LIB "${INSTALL_DIR}/lib")
# httplib for HTTP server
ExternalProject_Add(httplib
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/cpp-httplib"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(httplib SOURCE_DIR)
set(httplib_INCLUDE "${SOURCE_DIR}")
# cpp_random_distributions for Zipfian distribution
ExternalProject_Add(random_distributions
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/cpp_random_distributions"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(random_distributions SOURCE_DIR)
set(random_distributions_INCLUDE "${SOURCE_DIR}")
# dirtyzipf pow-approximate Zipf distribution
ExternalProject_Add(dirtyzipf
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/dirtyzipf"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(dirtyzipf SOURCE_DIR)
set(dirtyzipf_INCLUDE "${SOURCE_DIR}")
# header-only pseudorandom number generator library
ExternalProject_Add(xoshiro
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/Xoshiro-cpp"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(xoshiro SOURCE_DIR)
set(xoshiro_INCLUDE "${SOURCE_DIR}")
ExternalProject_Add(atomicbitvector
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/atomicbitvector/include"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(atomicbitvector SOURCE_DIR)
set(atomicbitvector_INCLUDE "${SOURCE_DIR}")
#add_subdirectory(deps/mmmulti/deps/mio)
ExternalProject_Add(mio
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/mmmulti/deps/mio"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
CONFIGURE_COMMAND "")
ExternalProject_Get_property(mio SOURCE_DIR)
set(mio_INCLUDE "${SOURCE_DIR}/include")
# pybind11
#ExternalProject_Add(pybind11
# GIT_REPOSITORY https://github.com/pybind/pybind11.git
# GIT_TAG v2.2.4
# CONFIGURE_COMMAND ""
# BUILD_COMMAND ""
# INSTALL_COMMAND "")
#ExternalProject_Get_Property(pybind11 SOURCE_DIR)
#set(pybind11_INCLUDE_DIRS ${SOURCE_DIR}/include)
#set(pybind11_DIR ${SOURCE_DIR})
#add_subdirectory(${pybind11_DIR})
set(CMAKE_BUILD_TYPE Release)
#set(CMAKE_BUILD_TYPE Debug)
# set up our target executable and specify its dependencies and includes
add_library(odgi_objs OBJECT
${CMAKE_SOURCE_DIR}/src/odgi.cpp
${CMAKE_SOURCE_DIR}/src/reclaimer.cpp
${CMAKE_SOURCE_DIR}/src/utils.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/subgraph/region.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/subgraph/extract.cpp
${CMAKE_SOURCE_DIR}/src/position.cpp
${CMAKE_SOURCE_DIR}/src/gfa_to_handle.cpp
${CMAKE_SOURCE_DIR}/src/split.cpp
${CMAKE_SOURCE_DIR}/src/node.cpp
${CMAKE_SOURCE_DIR}/src/subgraph.cpp
${CMAKE_SOURCE_DIR}/src/version.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/depth_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/overlap_main.cpp
${CMAKE_SOURCE_DIR}/src/unittest/driver.cpp
${CMAKE_SOURCE_DIR}/src/unittest/handle.cpp
${CMAKE_SOURCE_DIR}/src/unittest/fuzz.cpp
${CMAKE_SOURCE_DIR}/src/unittest/simplify.cpp
${CMAKE_SOURCE_DIR}/src/unittest/sort.cpp
${CMAKE_SOURCE_DIR}/src/unittest/pathindex.cpp
${CMAKE_SOURCE_DIR}/src/unittest/edge.cpp
${CMAKE_SOURCE_DIR}/src/unittest/extract.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/subcommand.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/build_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/test_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/stats_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/cover_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/explode_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/squeeze_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/sort_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/view_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/kmers_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/unitig_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/viz_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/paths_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/prune_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/unchop_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/normalize_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/extract_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/position_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/degree_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/bin_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/matrix_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/chop_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/crush_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/groom_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/layout0_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/layout_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/draw_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/flatten_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/break_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/pathindex_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/panpos_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/server_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/version_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/untangle_main.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/tips_main.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/topological_sort.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/kmer.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/hash.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/is_single_stranded.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/remove_high_degree.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/prune.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/depth.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/cycle_breaking_sort.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/random_order.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/eades_algorithm.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/dagify.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/dagify_sort.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/split_strands.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/strongly_connected_components.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/weakly_connected_components.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/dfs.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/bfs.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/find_shortest_paths.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/id_ordered_paths.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/simple_components.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/bin_path_info.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/bin_path_depth.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/sgd_layout.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/mondriaan_sort.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/matrix_writer.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/temp_file.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/linear_index.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/linear_sgd.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/break_cycles.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/xp.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/cut_tips.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/merge.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/normalize.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/simplify_siblings.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/chop.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/unchop.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/perfect_neighbors.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/cover.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/path_sgd.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/path_sgd_layout.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/draw.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/layout.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/atomic_image.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/remove_isolated.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/expand_context.cpp
${CMAKE_SOURCE_DIR}/src/subcommand/validate_main.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/untangle.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/stepindex.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/groom.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/crush_n.cpp
${CMAKE_SOURCE_DIR}/src/unittest/edge.cpp
${CMAKE_SOURCE_DIR}/src/algorithms/tips.cpp)
set(odgi_DEPS
sdsl-lite
dynamic
hopscotch_map
gfakluge
handlegraph
tayweeargs
bbhash
sparsepp
ska
intervaltree
cgranges
lodepng
structures
picosha256
sgd2
mondriaan
libbf
httplib
random_distributions
dirtyzipf
mmmulti
ips4o
xoshiro
atomicqueue
mio)
add_dependencies(odgi_objs ${odgi_DEPS})
set(odgi_INCLUDES
"${CMAKE_SOURCE_DIR}/src"
"${CMAKE_SOURCE_DIR}/src/algorithms"
"${sdsl-lite_INCLUDE}"
"${sdsl-lite-divsufsort_INCLUDE}"
"${dynamic_INCLUDE}"
"${hopscotch_map_INCLUDE}"
"${gfakluge_INCLUDE}"
"${gfakluge_tinyFA_INCLUDE}"
"${handlegraph_INCLUDE}"
"${tayweeargs_INCLUDE}"
"${sparsepp_INCLUDE}"
"${ska_INCLUDE}"
"${intervaltree_INCLUDE}"
"${cgranges_INCLUDE}"
"${mmmulti_INCLUDE}"
"${ips4o_INCLUDE}"
"${atomicqueue_INCLUDE}"
"${lodepng_INCLUDE}"
"${bbhash_INCLUDE}"
"${structures_INCLUDE}"
"${picosha256_INCLUDE}"
"${sgd2_INCLUDE}"
"${mondriaan_INCLUDE}"
"${libbf_INCLUDE}"
"${httplib_INCLUDE}"
"${random_distributions_INCLUDE}"
"${dirtyzipf_INCLUDE}"
"${xoshiro_INCLUDE}"
"${atomicbitvector_INCLUDE}"
"${mio_INCLUDE}")
set(odgi_LIBS
"${sdsl-lite_LIB}/libsdsl.a"
"${sdsl-lite-divsufsort_LIB}/libdivsufsort.a"
"${sdsl-lite-divsufsort_LIB}/libdivsufsort64.a"
"${handlegraph_LIB}/libhandlegraph.a"
"${lodepng_LIB}/liblodepng.a"
"${mondriaan_LIB}/libmondriaan.a"
"${libbf_LIB}/libbf.a"
"-ldl"
"-latomic"
jemalloc)
#"-lefence") # for malloc error checking
#"-ltcmalloc") # for heap profiling
set(odgi_HEADERS
${CMAKE_SOURCE_DIR}/include/odgi_git_version.hpp
${CMAKE_SOURCE_DIR}/src/hash_map.hpp
${CMAKE_SOURCE_DIR}/src/odgi.hpp
${CMAKE_SOURCE_DIR}/src/node.hpp
${CMAKE_SOURCE_DIR}/src/bmap.hpp
${CMAKE_SOURCE_DIR}/src/subgraph.hpp
${CMAKE_SOURCE_DIR}/src/split.hpp
${CMAKE_SOURCE_DIR}/src/varint.hpp
${CMAKE_SOURCE_DIR}/src/dna.hpp
${CMAKE_SOURCE_DIR}/src/phf.hpp
${CMAKE_SOURCE_DIR}/src/bgraph.hpp
${CMAKE_SOURCE_DIR}/src/gfa_to_handle.hpp
${CMAKE_SOURCE_DIR}/src/subcommand/subcommand.hpp
${CMAKE_SOURCE_DIR}/src/io_helper.hpp
${CMAKE_SOURCE_DIR}/src/version.hpp
${CMAKE_SOURCE_DIR}/src/btypes.hpp
${CMAKE_SOURCE_DIR}/src/dynamic_types.hpp
${CMAKE_SOURCE_DIR}/src/dynamic_structs.hpp
${CMAKE_SOURCE_DIR}/src/position.hpp
${CMAKE_SOURCE_DIR}/src/dset64.hpp
${CMAKE_SOURCE_DIR}/src/lockfree_hashtable.hpp
${CMAKE_SOURCE_DIR}/src/reclaimer.hpp
${CMAKE_SOURCE_DIR}/src/colorbrewer.hpp
${CMAKE_SOURCE_DIR}/src/unittest/driver.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/linear_index.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/random_order.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/cycle_breaking_sort.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/prune.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/reverse_complement.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/bin_path_info.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/bin_path_depth.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/dfs.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/chop.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/unchop.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/apply_bulk_modifications.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/dagify.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/weakly_connected_components.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/extract_containing_graph.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/eades_algorithm.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/perfect_neighbors.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/temp_file.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/distance_to_tail.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/simple_components.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/cut_tips.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/break_cycles.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/bfs.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/is_acyclic.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/id_sort.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/linear_sgd.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/matrix_writer.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/find_shortest_paths.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/extend.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/split_strands.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/extract_extending_graph.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/extract_connecting_graph.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/cover.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/path_sgd.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/path_sgd_layout.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/kmer.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/expand_context.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/id_ordered_paths.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/normalize.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/merge.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/count_walks.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/remove_high_degree.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/a_star.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/dagify_sort.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/xp.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/remove_isolated.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/sgd_term.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/simplify_siblings.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/sgd_layout.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/topological_sort.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/depth.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/sorted_id_ranges.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/strongly_connected_components.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/mondriaan_sort.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/hash.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/hilbert.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/groom.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/distance_to_head.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/is_single_stranded.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/shortest_cycle.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/untangle.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/progress.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/tips.hpp
${CMAKE_SOURCE_DIR}/src/algorithms/tips_bed_writer_thread.hpp)
target_include_directories(odgi_objs PUBLIC ${odgi_INCLUDES})
set_target_properties(odgi_objs PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(libodgi_static STATIC $<TARGET_OBJECTS:odgi_objs>)
set_target_properties(libodgi_static PROPERTIES OUTPUT_NAME "odgi")
set_target_properties(libodgi_static PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(libodgi_shared SHARED $<TARGET_OBJECTS:odgi_objs> src/algorithms/fonts/field8.h src/algorithms/fonts/font5x8.h)
set_target_properties(libodgi_shared PROPERTIES OUTPUT_NAME "odgi")
set_target_properties(libodgi_shared PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
set_target_properties(libodgi_static PROPERTIES PUBLIC_HEADER "${odgi_HEADERS}")
set_target_properties(libodgi_shared PROPERTIES PUBLIC_HEADER "${odgi_HEADERS}")
add_executable(odgi
$<TARGET_OBJECTS:odgi_objs>
${CMAKE_SOURCE_DIR}/src/main.cpp)
target_link_libraries(odgi ${odgi_LIBS})
set_target_properties(odgi PROPERTIES OUTPUT_NAME "odgi")
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/deps/pybind11/CMakeLists.txt)
execute_process(COMMAND git submodule update --init --recursive)
endif()
add_subdirectory(deps/pybind11)
pybind11_add_module(odgi_pybind11 "${CMAKE_SOURCE_DIR}/src/pythonmodule.cpp")
add_dependencies(odgi_pybind11 ${odgi_DEPS} libodgi_static)
target_include_directories(odgi_pybind11 PUBLIC ${odgi_INCLUDES})
target_link_libraries(odgi_pybind11 PRIVATE "${CMAKE_SOURCE_DIR}/lib/libodgi.a" "${odgi_LIBS}")
set_target_properties(odgi_pybind11 PROPERTIES OUTPUT_NAME "odgi")
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/include)
execute_process(COMMAND bash scripts/generate_git_version.sh ${CMAKE_SOURCE_DIR}/include)
install(TARGETS odgi DESTINATION bin)
install(TARGETS libodgi_static ARCHIVE DESTINATION lib LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include/odgi)
install(TARGETS libodgi_shared ARCHIVE DESTINATION lib LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include/odgi)
install(TARGETS odgi_pybind11 LIBRARY DESTINATION lib)
if (APPLE)
elseif (TRUE)
if (BUILD_STATIC)
set(CMAKE_EXE_LINKER_FLAGS "-static")
endif()
endif()