File: CMakeLists.txt

package info (click to toggle)
seqan2 2.4.0+dfsg-11~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 223,500 kB
  • sloc: cpp: 256,886; ansic: 91,672; python: 8,339; sh: 995; xml: 570; makefile: 251; awk: 51
file content (187 lines) | stat: -rw-r--r-- 8,265 bytes parent folder | download | duplicates (3)
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
# ===========================================================================
#                  SeqAn - The Library for Sequence Analysis
# ===========================================================================
# File: /tests/index/CMakeLists.txt
#
# CMakeLists.txt file for the index module tests.
# ===========================================================================

cmake_minimum_required (VERSION 3.0.0)
project (seqan_tests_index CXX)
message (STATUS "Configuring tests/index")

# ----------------------------------------------------------------------------
# Dependencies
# ----------------------------------------------------------------------------

# Search SeqAn and select dependencies.
if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
    find_package (OpenMP)
    find_package (SeqAn REQUIRED)
endif ()

# ----------------------------------------------------------------------------
# Build Setup
# ----------------------------------------------------------------------------

# Add include directories.
include_directories (${SEQAN_INCLUDE_DIRS})

# Add definitions set by find_package (SeqAn).
add_definitions (${SEQAN_DEFINITIONS})

# Update the list of file names below if you add source files to your test.
add_executable (test_index_creation
                test_index_creation.cpp
                test_index_creation.h
                test_index_helpers.h)
target_link_libraries (test_index_creation ${SEQAN_LIBRARIES})

add_executable (test_index_crosscompare_char
                test_index_crosscompare_char.cpp
                test_crosscompare.h)
target_link_libraries (test_index_crosscompare_char ${SEQAN_LIBRARIES})

# We need an additional TU for the DFI test otherwise GCC 4.7 warns in 32 bit mode.
add_executable (test_index_crosscompare_char_dfi
                test_index_crosscompare_char_dfi.cpp
                test_crosscompare.h)
target_link_libraries (test_index_crosscompare_char_dfi ${SEQAN_LIBRARIES})

add_executable (test_index_crosscompare_dna
                test_index_crosscompare_dna.cpp
                test_crosscompare.h)
target_link_libraries (test_index_crosscompare_dna ${SEQAN_LIBRARIES})

# We need an additional TU for the DFI test otherwise GCC 4.7 warns in 32 bit mode.
add_executable (test_index_crosscompare_dna_dfi
                test_index_crosscompare_dna_dfi.cpp
                test_crosscompare.h)
target_link_libraries (test_index_crosscompare_dna_dfi ${SEQAN_LIBRARIES})

add_executable (test_index_qgram
                test_index_qgram.cpp
                test_qgram_index.h)
target_link_libraries (test_index_qgram ${SEQAN_LIBRARIES})

add_executable (test_index_sa_bwtwalk
                test_index_sa_bwtwalk.cpp
                test_sa_bwtwalk.h)
target_link_libraries (test_index_sa_bwtwalk ${SEQAN_LIBRARIES})

add_executable (test_index_shapes
                test_index_shapes.cpp
                test_shapes.h)
target_link_libraries (test_index_shapes ${SEQAN_LIBRARIES})

add_executable (test_index_drawing
                test_index_drawing.cpp)
target_link_libraries (test_index_drawing ${SEQAN_LIBRARIES})

#add_executable (test_index_fm_right_array_binary_tree
#                test_index_fm_right_array_binary_tree.cpp
#                test_index_fm_right_array_binary_tree.h
#                test_index_fm_right_array_binary_tree_iterator.h
#                test_index_helpers.h)
#target_link_libraries (test_index_fm_right_array_binary_tree ${SEQAN_LIBRARIES})

add_executable (test_index_fm_rank_dictionary
                test_index_fm_rank_dictionary.cpp
                test_index_helpers.h)
target_link_libraries (test_index_fm_rank_dictionary ${SEQAN_LIBRARIES})

add_executable (test_index_fm_sparse_string
                test_index_fm_sparse_string.cpp)
target_link_libraries (test_index_fm_sparse_string ${SEQAN_LIBRARIES})

add_executable (test_index_base
                test_index_base.cpp
                test_index_helpers.h)
target_link_libraries (test_index_base ${SEQAN_LIBRARIES})

add_executable (test_index_fm
                test_index_fm.cpp
                test_index_helpers.h)
target_link_libraries (test_index_fm ${SEQAN_LIBRARIES})

add_executable (test_index_bifm
                test_index_bifm.cpp
                test_index_helpers.h)
target_link_libraries (test_index_bifm ${SEQAN_LIBRARIES})

add_executable (test_index_vstree
                test_index_vstree.cpp
                test_index_fm_stree.h
                test_index_helpers.h)
target_link_libraries (test_index_vstree ${SEQAN_LIBRARIES})

# GCC < 4.5 segfaults when compiling the test_index_stree_iterators test.
# Enable if the compiler is not GCC or the version is >= 4.5.
if (NOT CMAKE_COMPILER_IS_GNUCXX OR (450 LESS _GCC_VERSION))
    add_executable (
        test_index_stree_iterators
        test_index_stree_iterators.cpp
        test_stree_iterators.h)
    target_link_libraries (test_index_stree_iterators ${SEQAN_LIBRARIES})
endif ()

add_executable (test_index_view
                test_index_view.cpp
                test_index_view.h)
target_link_libraries (test_index_view ${SEQAN_LIBRARIES})

add_executable (test_index_finder
                test_index_finder.cpp
                test_index_helpers.h)
target_link_libraries (test_index_finder ${SEQAN_LIBRARIES})

add_executable (test_find_backtracking
                test_find_backtracking.cpp
                test_find_backtracking.h
                test_find_base.h)
target_link_libraries (test_find_backtracking ${SEQAN_LIBRARIES})

add_executable (test_find2_index_approx
                test_find2_index_approx.cpp
                test_find2_index_approx.h)
target_link_libraries (test_find2_index_approx ${SEQAN_LIBRARIES})

add_executable (test_index_repeats
               test_index_repeats.cpp
               test_index_repeats.h)
target_link_libraries (test_index_repeats ${SEQAN_LIBRARIES})

add_executable (test_index_swift
                test_index_swift.cpp)
target_link_libraries (test_index_swift ${SEQAN_LIBRARIES})

# Add CXX flags found by find_package (SeqAn).
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")

# ----------------------------------------------------------------------------
# Register with CTest
# ----------------------------------------------------------------------------

add_test (NAME test_test_index_creation COMMAND $<TARGET_FILE:test_index_creation>)
add_test (NAME test_test_index_crosscompare_char COMMAND $<TARGET_FILE:test_index_crosscompare_char>)
add_test (NAME test_test_index_crosscompare_char_dfi COMMAND $<TARGET_FILE:test_index_crosscompare_char_dfi>)
add_test (NAME test_test_index_crosscompare_dna COMMAND $<TARGET_FILE:test_index_crosscompare_dna>)
add_test (NAME test_test_index_crosscompare_dna_dfi COMMAND $<TARGET_FILE:test_index_crosscompare_dna_dfi>)
add_test (NAME test_test_index_qgram COMMAND $<TARGET_FILE:test_index_qgram>)
add_test (NAME test_test_index_sa_bwtwalk COMMAND $<TARGET_FILE:test_index_sa_bwtwalk>)
add_test (NAME test_test_index_shapes COMMAND $<TARGET_FILE:test_index_shapes>)
add_test (NAME test_test_index_drawing COMMAND $<TARGET_FILE:test_index_drawing>)
#add_test (NAME test_test_index_fm_right_array_binary_tree COMMAND $<TARGET_FILE:test_index_fm_right_array_binary_tree>)
add_test (NAME test_test_index_fm_rank_dictionary COMMAND $<TARGET_FILE:test_index_fm_rank_dictionary>)
add_test (NAME test_test_index_fm_sparse_string COMMAND $<TARGET_FILE:test_index_fm_sparse_string>)
add_test (NAME test_test_index_base COMMAND $<TARGET_FILE:test_index_base>)
add_test (NAME test_test_index_fm COMMAND $<TARGET_FILE:test_index_fm>)
add_test (NAME test_test_index_bifm COMMAND $<TARGET_FILE:test_index_bifm>)
add_test (NAME test_test_index_vstree COMMAND $<TARGET_FILE:test_index_vstree>)
if (NOT CMAKE_COMPILER_IS_GNUCXX OR (450 LESS _GCC_VERSION))
    add_test (NAME test_test_index_stree_iterators COMMAND $<TARGET_FILE:test_index_stree_iterators>)
endif ()
add_test (NAME test_test_index_view COMMAND $<TARGET_FILE:test_index_view>)
add_test (NAME test_test_index_finder COMMAND $<TARGET_FILE:test_index_finder>)
add_test (NAME test_test_find_backtracking COMMAND $<TARGET_FILE:test_find_backtracking>)
add_test (NAME test_test_index_repeats COMMAND $<TARGET_FILE:test_index_repeats>)