xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031
  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_license("MIT")
  6. set_urls("https://github.com/Tessil/hopscotch-map/archive/$(version).zip",
  7. "https://github.com/Tessil/hopscotch-map.git")
  8. add_versions("v2.3.1", "0a77f4835379e74bb7a1c043f3b3c498272acca1c70b03dd5a0444fddf28b316")
  9. add_versions("v2.3.0", "56ce4ff67215656065ee1a08948533baf9447c4440196ea5133c024856006938")
  10. on_install(function (package)
  11. os.cp("include/tsl", package:installdir("include"))
  12. os.cp("tsl-hopscotch-map.natvis", package:installdir("include", "tsl"))
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. void test()
  17. {
  18. tsl::hopscotch_map<int, int> map;
  19. map[1] = 3;
  20. map[2] = 4;
  21. tsl::hopscotch_set<int> set;
  22. set.insert({1, 9, 0});
  23. set.insert({2, -1, 9});
  24. }
  25. ]]}, {configs = {languages = "c++11"}, includes = { "tsl/hopscotch_map.h", "tsl/hopscotch_set.h"} }))
  26. end)