-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
65 lines (50 loc) · 2.21 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
cmake_minimum_required (VERSION 3.25)
project (
floxer
LANGUAGES CXX
VERSION 0.2.0
DESCRIPTION "FM-Index longread PEX-seeded aligner"
)
# Force language standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Specify the directories where to store the built archives, libraries and executables
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# ----- dependencies -----
# for the CPM package manager
# it is recommended to set the CPM_SOURCE_CACHE variable to avoid repetitive downloads
include(cmake/CPM.cmake)
CPMUsePackageLock (cmake/package-lock.cmake)
CPMGetPackage(sharg) # for CLI parsing
CPMGetPackage(spdlog) # for logging and output (includes libfmt)
CPMGetPackage(IVio) # for sequence input (that works well with fmindex-collection)
CPMGetPackage(IVSigma) # for sequence alphabet and transformation utilities (that works well with fmindex-collection)
CPMGetPackage(fmindex-collection) # for the FM-index
CPMGetPackage(cereal) # for FM-index serialization
CPMGetPackage(seqan3) # for alignment and sam/bam output
CPMGetPackage(interval-tree) # for interval tree data structure in the interval optimization
CPMGetPackage(BS_thread_pool) # for the thread pool and parallel task queue
add_library(BS_thread_pool INTERFACE)
target_include_directories(BS_thread_pool INTERFACE ${BS_thread_pool_SOURCE_DIR}/include)
CPMGetPackage(use_ccache) # for faster compile times
# ----- floxer source code -----
add_subdirectory(src/lib)
add_subdirectory(src/main)
# ----- testing -----
# for when the tests should not be built
option (${PROJECT_NAME}_TEST "Enable testing for ${PROJECT_NAME}." ON)
if (${PROJECT_NAME}_TEST)
add_subdirectory (test EXCLUDE_FROM_ALL)
endif ()
# copy test data from source tree to build dir
set(test_data_dir "${CMAKE_BINARY_DIR}/test_data")
file (MAKE_DIRECTORY ${test_data_dir})
file (GLOB TEST_DATA_FILES ${PROJECT_SOURCE_DIR}/test/data/*)
foreach (test_data_file ${TEST_DATA_FILES})
file(COPY ${test_data_file} DESTINATION ${test_data_dir})
unset (test_data_file)
endforeach ()
unset(test_data_dir)