-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
86 lines (71 loc) · 2.49 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
# SPDX-FileCopyrightText: 2006-2023, Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2023, Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0
cmake_minimum_required (VERSION 3.25)
project(fmindex-collection LANGUAGES CXX C
DESCRIPTION "fmindex-collection -- Datastructures and Algorithms for (Bi-)FMIndices and Approximate Pattern Matching")
option(FMC_USE_SDSL "Activate occ tables that use SDSL as a backend" ${PROJECT_IS_TOP_LEVEL})
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(FMC_USE_SDSL OFF)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(FMC_USE_SDSL OFF)
endif()
find_package(OpenMP QUIET)
include(cmake/CPM.cmake)
CPMAddPackage("gh:SGSSGene/[email protected]")
CPMLoadDependenciesFile("${CMAKE_CURRENT_SOURCE_DIR}/cpm.dependencies")
include(fmindex_collection-config.cmake)
if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
target_compile_options(libsais PRIVATE -fp-model=strict -fno-strict-aliasing)
endif()
if (PROJECT_IS_TOP_LEVEL)
enable_testing()
add_subdirectory(src/test_fmindex-collection)
add_subdirectory(src/test_search_schemes)
# example executable
add_executable(example
src/example/main.cpp
src/example/utils/utils.cpp
)
target_link_libraries(example
PRIVATE
fmindex-collection::fmindex-collection
fmt::fmt-header-only
cereal::cereal
)
# example executable
add_executable(search_scheme_generator
src/search_scheme_generator/main.cpp
)
target_link_libraries(search_scheme_generator
PRIVATE
fmindex-collection::fmindex-collection
fmt::fmt-header-only
cereal::cereal
)
# easyExample executable
add_executable(easyExample
src/easyExample/main.cpp
)
target_link_libraries(easyExample
PRIVATE
fmindex-collection::fmindex-collection
fmt::fmt-header-only
cereal::cereal
)
add_executable(run_search_schemes
src/run_search_schemes/main.cpp
)
target_link_libraries(run_search_schemes
PRIVATE
search_schemes
fmt::fmt-header-only
)
add_subdirectory(src/fmindex-collection-stats)
add_subdirectory(src/test_header)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(fmindex-collection INTERFACE /bigobj /EHsc -DNOMINMAX)
else()
target_compile_options(fmindex-collection INTERFACE -Wall -Werror -Wpedantic -Wextra -fPIC)
endif()
endif()