xmake.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. add_urls("https://github.com/seqan/seqan3/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/seqan/seqan3.git")
  8. add_versions("3.2.0", "80d41dd035407cfec83eb3a4466d0421adc27129af684290c0c4da31421e7276")
  9. add_configs("cereal", {description = "required for serialisation and CTD support", default = false, type = "boolean"})
  10. add_configs("zlib", {description = "required for *.gz and .bam file support", default = false, type = "boolean"})
  11. add_configs("bzip2", {description = "required for *.bz2 file support", default = false, type = "boolean"})
  12. if is_plat("windows") then
  13. add_cxxflags("/Zc:__cplusplus")
  14. elseif is_plat("linux") then
  15. add_syslinks("pthread")
  16. end
  17. add_deps("sdsl-lite")
  18. on_load(function (package)
  19. if package:config("cereal") then
  20. package:add("deps", "cereal >=1.3.1")
  21. end
  22. if package:config("zlib") then
  23. package:add("deps", "zlib >=1.2")
  24. package:add("defines", "SEQAN3_HAS_ZLIB=1")
  25. end
  26. if package:config("bzip2") then
  27. package:add("deps", "bzip2 >=1.0")
  28. package:add("defines", "SEQAN3_HAS_BZIP2=1")
  29. end
  30. end)
  31. on_install("linux", "macosx", "bsd", "android", "iphoneos", "cross", function (package)
  32. os.cp("include", package:installdir())
  33. end)
  34. on_test(function (package)
  35. assert(package:check_cxxsnippets({test = [[
  36. #include <seqan3/core/debug_stream.hpp>
  37. void test() {
  38. seqan3::debug_stream << "Hello World!\n";
  39. }
  40. ]]}, {configs = {languages = "c++20"}}))
  41. end)