|
| 1 | +package("seqan3") |
| 2 | + set_kind("library", {headeronly = true}) |
| 3 | + set_homepage("https://www.seqan.de") |
| 4 | + set_description("The modern C++ library for sequence analysis. Contains version 3 of the library and API docs.") |
| 5 | + set_license("BSD-3-Clause") |
| 6 | + |
| 7 | + add_urls("https://github.com/seqan/seqan3/archive/refs/tags/$(version).tar.gz", |
| 8 | + "https://github.com/seqan/seqan3.git") |
| 9 | + |
| 10 | + add_versions("3.2.0", "80d41dd035407cfec83eb3a4466d0421adc27129af684290c0c4da31421e7276") |
| 11 | + |
| 12 | + add_configs("cereal", {description = "required for serialisation and CTD support", default = false, type = "boolean"}) |
| 13 | + add_configs("zlib", {description = "required for *.gz and .bam file support", default = false, type = "boolean"}) |
| 14 | + add_configs("bzip2", {description = "required for *.bz2 file support", default = false, type = "boolean"}) |
| 15 | + |
| 16 | + if is_plat("windows") then |
| 17 | + add_cxxflags("/Zc:__cplusplus") |
| 18 | + elseif is_plat("linux") then |
| 19 | + add_syslinks("pthread") |
| 20 | + end |
| 21 | + |
| 22 | + add_deps("sdsl-lite") |
| 23 | + |
| 24 | + on_load(function (package) |
| 25 | + if package:config("cereal") then |
| 26 | + package:add("deps", "cereal >=1.3.1") |
| 27 | + end |
| 28 | + if package:config("zlib") then |
| 29 | + package:add("deps", "zlib >=1.2") |
| 30 | + package:add("defines", "SEQAN3_HAS_ZLIB=1") |
| 31 | + end |
| 32 | + if package:config("bzip2") then |
| 33 | + package:add("deps", "bzip2 >=1.0") |
| 34 | + package:add("defines", "SEQAN3_HAS_BZIP2=1") |
| 35 | + end |
| 36 | + end) |
| 37 | + |
| 38 | + on_install("linux", "macosx", "bsd", "android", "iphoneos", "cross", function (package) |
| 39 | + os.cp("include", package:installdir()) |
| 40 | + end) |
| 41 | + |
| 42 | + on_test(function (package) |
| 43 | + assert(package:check_cxxsnippets({test = [[ |
| 44 | + #include <seqan3/core/debug_stream.hpp> |
| 45 | + void test() { |
| 46 | + seqan3::debug_stream << "Hello World!\n"; |
| 47 | + } |
| 48 | + ]]}, {configs = {languages = "c++20"}})) |
| 49 | + end) |
0 commit comments