xmake.lua 960 B

12345678910111213141516171819202122232425
  1. package("robin-map")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/Tessil/robin-map")
  4. set_description("A C++ implementation of a fast hash map and hash set using robin hood hashing")
  5. set_license("MIT")
  6. add_urls("https://github.com/Tessil/robin-map/archive/refs/tags/$(version).tar.gz")
  7. add_versions("v0.6.3", "e6654c8c2598f63eb0b1d52ff8bdf39cfcc91d81dd5d05274a6dca91241cd72f")
  8. add_deps("cmake")
  9. on_install(function (package)
  10. import("package.tools.cmake").install(package)
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test() {
  15. tsl::robin_map<int, int> map = {{1, 1}, {2, 1}, {3, 1}};
  16. for (auto it = map.begin(); it != map.end(); ++it) {
  17. it.value() = 2;
  18. }
  19. }
  20. ]]}, {configs = {languages = "c++11"}, includes = "tsl/robin_map.h"}))
  21. end)