xmake.lua 931 B

12345678910111213141516171819202122232425
  1. package("tl_expected")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/TartanLlama/expected")
  4. set_description("C++11/14/17 std::expected with functional-style extensions")
  5. set_license("CC0")
  6. set_urls("https://github.com/TartanLlama/expected/archive/$(version).zip",
  7. "https://github.com/TartanLlama/expected.git")
  8. add_versions("v1.0.0", "c1733556cbd3b532a02b68e2fbc2091b5bc2cccc279e4f6c6bd83877aabd4b02")
  9. add_versions("v1.1.0", "4b2a347cf5450e99f7624247f7d78f86f3adb5e6acd33ce307094e9507615b78")
  10. on_install(function (package)
  11. os.cp("include/tl", package:installdir("include"))
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. void test() {
  16. tl::expected<int, int> e1 = 42;
  17. }
  18. ]]}, {configs = {languages = "c++11"}, includes = {"tl/expected.hpp"}}))
  19. end)