xmake.lua 947 B

123456789101112131415161718192021222324
  1. package("tuplet")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/codeinred/tuplet")
  4. set_description("A fast, simple tuple implementation that implements tuple as an aggregate")
  5. set_license("BSL-1.0")
  6. add_urls("https://github.com/codeinred/tuplet/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/codeinred/tuplet.git")
  8. add_versions("v2.1.1", "2df403ffeed38a9687a3f2a7d2a68419ba029f519244e9bcd30caa0e8ec2ead3")
  9. add_deps("cmake")
  10. on_install(function (package)
  11. import("package.tools.cmake").install(package, {"-DBUILD_TESTING=OFF"})
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <string>
  16. void test() {
  17. tuplet::tuple tup = {1, 2, std::string("Hello, world!")};
  18. }
  19. ]]}, {configs = {languages = "c++17"}, includes = "tuplet/tuple.hpp"}))
  20. end)