21 #define SEQAN3_STR_HELPER(x) #x
22 #define SEQAN3_STR(x) SEQAN3_STR_HELPER(x)
31 static_assert(__cplusplus >= 201703,
"SeqAn3 requires C++17, make sure that you have set -std=c++17.");
33 # error "This is not a C++ compiler."
36 #if __has_include(<version>)
42 # if __cpp_concepts == 201507 // GCC and Concepts TS
43 # define SEQAN3_CONCEPT concept bool
45 static_assert(__cpp_concepts >= 201507,
"Your compiler supports Concepts, but the support is not recent enough.");
46 # define SEQAN3_CONCEPT concept
49 # error "SeqAn3 requires C++ Concepts, either vie the TS (flag: -fconcepts) or via C++20 (flag: -std=c++2a / -std=c++20)."
53 #if defined(__GNUC__) && (__GNUC__ < 10)
54 # define SEQAN3_RETURN_TYPE_CONSTRAINT(expression, concept_name, ...) \
55 {expression}; requires concept_name<decltype(expression), __VA_ARGS__>
57 # define SEQAN3_RETURN_TYPE_CONSTRAINT(expression, concept_name, ...) \
58 {expression} -> concept_name<__VA_ARGS__>
62 #if !__has_include(<filesystem>)
63 # if !__has_include(<experimental/filesystem>)
64 # error SeqAn3 requires C++17 filesystem support, but it was not found.
73 #if !__has_include(<seqan3/version.hpp>)
74 # error SeqAn3 include directory not set correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
78 #if __has_include(<range/v3/version.hpp>)
79 # define RANGE_V3_MINVERSION 1100
80 # define RANGE_V3_MAXVERSION 1199
82 # define SEQAN3_MSG "Your version: " SEQAN3_STR(RANGE_V3_VERSION) \
83 "; minimum version: " SEQAN3_STR(RANGE_V3_MINVERSION) \
84 "; expected maximum version: " SEQAN3_STR(RANGE_V3_MAXVERSION)
85 # include <range/v3/version.hpp>
86 # if RANGE_V3_VERSION < RANGE_V3_MINVERSION
87 # error Your range-v3 library is too old.
88 # pragma message(SEQAN3_MSG)
89 # elif RANGE_V3_VERSION > RANGE_V3_MAXVERSION
90 # pragma GCC warning "Your range-v3 library is possibly too new. Some features might not work correctly."
91 # pragma message(SEQAN3_MSG)
95 # error The range-v3 library was not included correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
99 #if __has_include(<sdsl/version.hpp>)
100 # include <sdsl/version.hpp>
101 static_assert(sdsl::sdsl_version_major == 3,
"Only version 3 of the SDSL is supported by SeqAn3.");
103 # error The sdsl library was not included correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
111 #ifndef SEQAN3_WITH_CEREAL
112 # if __has_include(<cereal/cereal.hpp>)
113 # define SEQAN3_WITH_CEREAL 1
115 # define SEQAN3_WITH_CEREAL 0
117 #elif SEQAN3_WITH_CEREAL != 0
118 # if ! __has_include(<cereal/cereal.hpp>)
119 # error Cereal was marked as required, but not found!
123 #if !SEQAN3_WITH_CEREAL
131 # define CEREAL_SERIALIZE_FUNCTION_NAME serialize
133 # define CEREAL_LOAD_FUNCTION_NAME load
135 # define CEREAL_SAVE_FUNCTION_NAME save
137 # define CEREAL_LOAD_MINIMAL_FUNCTION_NAME load_minimal
139 # define CEREAL_SAVE_MINIMAL_FUNCTION_NAME save_minimal
151 #ifndef SEQAN3_WITH_LEMON
152 # if __has_include(<lemon/config.h>)
153 # define SEQAN3_WITH_LEMON 1
155 # define SEQAN3_WITH_LEMON 0
157 #elif SEQAN3_WITH_LEMON != 0
158 # if !__has_include(<lemon/config.h>)
159 # error Lemon was marked as required, but not found!
162 #if SEQAN3_WITH_LEMON == 1
163 # define LEMON_HAVE_LONG_LONG 1
164 # define LEMON_CXX11 1
165 # if defined(__unix__) || defined(__APPLE__)
166 # define LEMON_USE_PTHREAD 1
167 # define LEMON_USE_WIN32_THREADS 0
168 # define LEMON_WIN32 0
170 # define LEMON_USE_PTHREAD 0
171 # define LEMON_USE_WIN32_THREADS 1
172 # define LEMON_WIN32 1
184 #ifndef SEQAN3_DOXYGEN_ONLY
185 # define SEQAN3_DOXYGEN_ONLY(x)
193 #if !defined(SEQAN3_DEPRECATED_310)
194 # define SEQAN3_DEPRECATED_310 [[deprecated("This will be removed in SeqAn-3.1.0; please see the documentation.")]]
201 #ifndef SEQAN3_WORKAROUND_VIEW_PERFORMANCE
202 # define SEQAN3_WORKAROUND_VIEW_PERFORMANCE 1
207 #ifndef SEQAN3_WORKAROUND_GCC_87113
208 # if defined(__GNUC_MINOR__) && ((__GNUC__ == 7) || ((__GNUC__ == 8) && (__GNUC_MINOR__ < 3)))
209 # define SEQAN3_WORKAROUND_GCC_87113 1
211 # define SEQAN3_WORKAROUND_GCC_87113 0
216 #ifndef SEQAN3_WORKAROUND_GCC_90897
217 # if defined(__GNUC__) && (__GNUC__ == 8)
218 # define SEQAN3_WORKAROUND_GCC_90897 1
220 # define SEQAN3_WORKAROUND_GCC_90897 0
225 #ifndef SEQAN3_WORKAROUND_GCC_93983
226 # if defined(__GNUC__) && (__GNUC__ == 10 && __GNUC_MINOR__ <= 1)
227 # define SEQAN3_WORKAROUND_GCC_93983 1
229 # define SEQAN3_WORKAROUND_GCC_93983 0
234 #ifndef SEQAN3_WORKAROUND_GCC_95371 // regressed in gcc10, fixed for gcc10.2
235 # if defined(__GNUC__) && (__GNUC__ == 10 && __GNUC_MINOR__ < 2)
236 # define SEQAN3_WORKAROUND_GCC_95371 1
238 # define SEQAN3_WORKAROUND_GCC_95371 0
243 #ifndef SEQAN3_WORKAROUND_GCC_95578 // regressed in gcc10, fixed for gcc10.2
244 # if defined(__GNUC__) && (__GNUC__ == 10 && __GNUC_MINOR__ < 2)
245 # define SEQAN3_WORKAROUND_GCC_95578 1
247 # define SEQAN3_WORKAROUND_GCC_95578 0
252 #ifndef SEQAN3_WORKAROUND_GCC7_AND_8_CONCEPT_ISSUES
253 # if defined(__GNUC__) && ((__GNUC__ == 7) || (__GNUC__ == 8))
254 # define SEQAN3_WORKAROUND_GCC7_AND_8_CONCEPT_ISSUES 1
256 # define SEQAN3_WORKAROUND_GCC7_AND_8_CONCEPT_ISSUES 0
261 #ifndef SEQAN3_WORKAROUND_GCC_93467 // fixed since gcc10.2
262 # if defined(__GNUC__) && ((__GNUC__ <= 9) || (__GNUC__ == 10 && __GNUC_MINOR__ < 2))
263 # define SEQAN3_WORKAROUND_GCC_93467 1
265 # define SEQAN3_WORKAROUND_GCC_93467 0
270 #ifndef SEQAN3_WORKAROUND_GCC_96070 // not yet fixed, this is a defect within the standard lib
271 # if defined(__GNUC__)
272 # define SEQAN3_WORKAROUND_GCC_96070 1
274 # define SEQAN3_WORKAROUND_GCC_96070 0
284 #undef SEQAN3_STR_HELPER