xmake.lua 1.1 KB

123456789101112131415161718192021222324252627282930
  1. package("hopscotch-map")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/Tessil/hopscotch-map")
  4. set_description("A C++ implementation of a fast hash map and hash set using hopscotch hashing")
  5. set_urls("https://github.com/Tessil/hopscotch-map/archive/$(version).zip",
  6. "https://github.com/Tessil/hopscotch-map.git")
  7. add_versions("v2.3.1", "0a77f4835379e74bb7a1c043f3b3c498272acca1c70b03dd5a0444fddf28b316")
  8. add_versions("v2.3.0", "56ce4ff67215656065ee1a08948533baf9447c4440196ea5133c024856006938")
  9. on_install(function (package)
  10. os.cp("include/tsl", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test()
  15. {
  16. tsl::hopscotch_map<int, int> map;
  17. map[1] = 3;
  18. map[2] = 4;
  19. tsl::hopscotch_set<int> set;
  20. set.insert({1, 9, 0});
  21. set.insert({2, -1, 9});
  22. }
  23. ]]}, {configs = {languages = "c++11"}, includes = { "tsl/hopscotch_map.h", "tsl/hopscotch_set.h"} }))
  24. end)