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
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 via 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>)
76 # error SeqAn3 include directory not set correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
80 #if __has_include(<range/v3/version.hpp>)
81 # define RANGE_V3_MINVERSION 1100
82 # define RANGE_V3_MAXVERSION 1199
84 # define SEQAN3_MSG "Your version: " SEQAN3_STR(RANGE_V3_VERSION) \
85 "; minimum version: " SEQAN3_STR(RANGE_V3_MINVERSION) \
86 "; expected maximum version: " SEQAN3_STR(RANGE_V3_MAXVERSION)
87 # include <range/v3/version.hpp>
88 # if RANGE_V3_VERSION < RANGE_V3_MINVERSION
89 # error Your range-v3 library is too old.
90 # pragma message(SEQAN3_MSG)
91 # elif RANGE_V3_VERSION > RANGE_V3_MAXVERSION
92 # pragma GCC warning "Your range-v3 library is possibly too new. Some features might not work correctly."
93 # pragma message(SEQAN3_MSG)
97 # error The range-v3 library was not included correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
101 #if __has_include(<sdsl/version.hpp>)
102 # include <sdsl/version.hpp>
103 static_assert(sdsl::sdsl_version_major == 3,
"Only version 3 of the SDSL is supported by SeqAn3.");
105 # error The sdsl library was not included correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
113 #ifndef SEQAN3_WITH_CEREAL
114 # if __has_include(<cereal/cereal.hpp>)
115 # define SEQAN3_WITH_CEREAL 1
117 # define SEQAN3_WITH_CEREAL 0
119 #elif SEQAN3_WITH_CEREAL != 0
120 # if ! __has_include(<cereal/cereal.hpp>)
121 # error Cereal was marked as required, but not found!
125 #if !SEQAN3_WITH_CEREAL
134 # define CEREAL_SERIALIZE_FUNCTION_NAME serialize
136 # define CEREAL_LOAD_FUNCTION_NAME load
138 # define CEREAL_SAVE_FUNCTION_NAME save
140 # define CEREAL_LOAD_MINIMAL_FUNCTION_NAME load_minimal
142 # define CEREAL_SAVE_MINIMAL_FUNCTION_NAME save_minimal
153 #ifndef SEQAN3_WITH_LEMON
154 # if __has_include(<lemon/config.h>)
155 # define SEQAN3_WITH_LEMON 1
157 # define SEQAN3_WITH_LEMON 0
159 #elif SEQAN3_WITH_LEMON != 0
160 # if !__has_include(<lemon/config.h>)
161 # error Lemon was marked as required, but not found!
164 #if SEQAN3_WITH_LEMON == 1
165 # define LEMON_HAVE_LONG_LONG 1
166 # define LEMON_CXX11 1
167 # if defined(__unix__) || defined(__APPLE__)
168 # define LEMON_USE_PTHREAD 1
169 # define LEMON_USE_WIN32_THREADS 0
170 # define LEMON_WIN32 0
172 # define LEMON_USE_PTHREAD 0
173 # define LEMON_USE_WIN32_THREADS 1
174 # define LEMON_WIN32 1
186 #ifndef SEQAN3_DOXYGEN_ONLY
187 # define SEQAN3_DOXYGEN_ONLY(x)
195 #ifndef SEQAN3_PRAGMA
196 # define SEQAN3_PRAGMA(non_string_literal) _Pragma(#non_string_literal)
200 #ifndef SEQAN3_REMOVE_DEPRECATED_310
201 # ifndef SEQAN3_DEPRECATED_310
202 # ifndef SEQAN3_DISABLE_DEPRECATED_WARNINGS
203 # define SEQAN3_DEPRECATED_310 [[deprecated("This will be removed in SeqAn-3.1.0; please see the documentation.")]]
205 # define SEQAN3_DEPRECATED_310
211 #ifndef SEQAN3_DEPRECATED_HEADER
212 # ifndef SEQAN3_DISABLE_DEPRECATED_WARNINGS
213 # define SEQAN3_DEPRECATED_HEADER(message) SEQAN3_PRAGMA(GCC warning message)
215 # define SEQAN3_DEPRECATED_HEADER(message)
229 #if defined(__GNUC__) && (__GNUC__ == 10 && __GNUC_MINOR__ <= 1)
230 # ifdef SEQAN3_DEPRECATED_310
231 # define SEQAN3_WORKAROUND_GCC_93983 0
232 # define SEQAN3_WORKAROUND_GCC_95371 0
233 # define SEQAN3_WORKAROUND_GCC_95578 0
235 # pragma GCC warning "Be aware that gcc 10.0 and 10.1 are known to have several bugs that might make SeqAn3 fail to compile. Please use gcc >= 10.2."
238 #ifndef SEQAN3_WORKAROUND_VIEW_PERFORMANCE
240 # define SEQAN3_WORKAROUND_VIEW_PERFORMANCE 1
244 #ifndef SEQAN3_WORKAROUND_ISSUE_286
245 # if defined(__GNUC__) && (__GNUC__ <= 9)
246 # define SEQAN3_WORKAROUND_ISSUE_286 1
248 # define SEQAN3_WORKAROUND_ISSUE_286 0
253 #ifndef SEQAN3_WORKAROUND_GCC_83328
254 # if defined(__GNUC__) && (__GNUC__ <= 8)
255 # define SEQAN3_WORKAROUND_GCC_83328 1
257 # define SEQAN3_WORKAROUND_GCC_83328 0
262 #ifndef SEQAN3_WORKAROUND_GCC_87113
263 # if defined(__GNUC_MINOR__) && ((__GNUC__ == 7) || ((__GNUC__ == 8) && (__GNUC_MINOR__ < 3)))
264 # define SEQAN3_WORKAROUND_GCC_87113 1
266 # define SEQAN3_WORKAROUND_GCC_87113 0
271 #ifndef SEQAN3_WORKAROUND_GCC_89953
272 # if defined(__GNUC_MINOR__) && (__GNUC__ == 9 && __GNUC_MINOR__ < 3)
273 # define SEQAN3_WORKAROUND_GCC_89953 1
275 # define SEQAN3_WORKAROUND_GCC_89953 0
280 #ifndef SEQAN3_WORKAROUND_GCC_90897
281 # if defined(__GNUC__) && (__GNUC__ == 8 && __GNUC_MINOR__ < 4)
282 # define SEQAN3_WORKAROUND_GCC_90897 1
284 # define SEQAN3_WORKAROUND_GCC_90897 0
289 #ifndef SEQAN3_WORKAROUND_GCC7_AND_8_CONCEPT_ISSUES
290 # if defined(__GNUC__) && ((__GNUC__ == 7) || (__GNUC__ == 8))
291 # define SEQAN3_WORKAROUND_GCC7_AND_8_CONCEPT_ISSUES 1
293 # define SEQAN3_WORKAROUND_GCC7_AND_8_CONCEPT_ISSUES 0
298 #ifndef SEQAN3_WORKAROUND_GCC_93467
299 # if defined(__GNUC__) && ((__GNUC__ <= 9) || (__GNUC__ == 10 && __GNUC_MINOR__ < 2))
300 # define SEQAN3_WORKAROUND_GCC_93467 1
302 # define SEQAN3_WORKAROUND_GCC_93467 0
308 #ifndef SEQAN3_WORKAROUND_GCC_94967
309 # if defined(__GNUC__) && (__GNUC__ <= 7)
310 # define SEQAN3_WORKAROUND_GCC_94967 1
312 # define SEQAN3_WORKAROUND_GCC_94967 0
317 #ifndef SEQAN3_WORKAROUND_GCC_96070
318 # if defined(__GNUC__) && (__GNUC__ == 10 && __GNUC_MINOR__ < 4)
319 # define SEQAN3_WORKAROUND_GCC_96070 1
321 # define SEQAN3_WORKAROUND_GCC_96070 0
326 #ifndef SEQAN3_WORKAROUND_GCC_99318
327 # if defined(__GNUC__) && (__GNUC__ == 10 && __GNUC_MINOR__ < 3)
328 # define SEQAN3_WORKAROUND_GCC_99318 1
330 # define SEQAN3_WORKAROUND_GCC_99318 0
336 #ifndef SEQAN3_WORKAROUND_GCC_100139
337 # if defined(__GNUC__)
338 # define SEQAN3_WORKAROUND_GCC_100139 1
340 # define SEQAN3_WORKAROUND_GCC_100139 0
354 #ifndef SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI
355 # if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0
356 # define SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI 1
358 # define SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI 0
362 #if SEQAN3_DOXYGEN_ONLY(1)0
364 #define SEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC
367 #if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0
368 # ifndef SEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC
369 # pragma GCC warning "We do not actively support compiler that have -D_GLIBCXX_USE_CXX11_ABI=0 set, and it might be that SeqAn does not compile due to this. It is known that all compiler of CentOS 7 / RHEL 7 set this flag by default (and that it cannot be overridden!). Note that these versions of the OSes are community-supported (see https://docs.seqan.de/seqan/3-master-user/about_api.html#platform_stability for more details). You can disable this warning by setting -DSEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC."
376 #ifndef SEQAN3_WORKAROUND_GCC_NON_TEMPLATE_REQUIRES
377 # if defined(__GNUC_MINOR__) && (__GNUC__ < 10)
378 # define SEQAN3_WORKAROUND_GCC_NON_TEMPLATE_REQUIRES 1
380 # define SEQAN3_WORKAROUND_GCC_NON_TEMPLATE_REQUIRES 0
386 #ifndef SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
387 # if defined(__GNUC__) && (__GNUC__ < 11)
388 # define SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT 1
390 # define SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT 0
395 #ifndef SEQAN3_WORKAROUND_GCC_INCOMPLETE_FILESYSTEM
396 # if defined(__GNUC__) && (__GNUC__ == 7)
397 # define SEQAN3_WORKAROUND_GCC_INCOMPLETE_FILESYSTEM 1
399 # define SEQAN3_WORKAROUND_GCC_INCOMPLETE_FILESYSTEM 0
410 #undef SEQAN3_STR_HELPER
Provides SeqAn version macros and global variables.