xmake.lua 1.1 KB

12345678910111213141516171819202122232425
  1. package("robin-hood-hashing")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/martinus/robin-hood-hashing")
  4. set_description("Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20")
  5. set_license("MIT")
  6. add_urls("https://github.com/martinus/robin-hood-hashing/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/martinus/robin-hood-hashing.git")
  8. add_versions("3.11.3", "dcf2b7fa9ef9dd0c67102d94c28e8df3effbe1845e0ed1f31f4772ca5e857fc4")
  9. add_versions("3.11.5", "7aa183252527ded7f46186c1e2f4efe7d6139a3b7c0869c1b6051bd7260587ed")
  10. add_deps("cmake")
  11. on_install(function (package)
  12. import("package.tools.cmake").install(package, {"-DRH_STANDALONE_PROJECT=OFF"})
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. void test() {
  17. robin_hood::unordered_flat_map<int, int> map;
  18. map[123] = 333;
  19. }
  20. ]]}, {configs = {languages = "c++14"}, includes = "robin_hood.h"}))
  21. end)