xmake.lua 1.0 KB

1234567891011121314151617181920212223242526
  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("v1.2.1", "2b54d2c1de2f73bea5c51d5dcbd64813a08caf1bfddcfdeee40ab74e9599e8e3")
  8. add_versions("v0.6.3", "e6654c8c2598f63eb0b1d52ff8bdf39cfcc91d81dd5d05274a6dca91241cd72f")
  9. add_deps("cmake")
  10. on_install(function (package)
  11. import("package.tools.cmake").install(package)
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. void test() {
  16. tsl::robin_map<int, int> map = {{1, 1}, {2, 1}, {3, 1}};
  17. for (auto it = map.begin(); it != map.end(); ++it) {
  18. it.value() = 2;
  19. }
  20. }
  21. ]]}, {configs = {languages = "c++11"}, includes = "tsl/robin_map.h"}))
  22. end)