xmake.lua 1.2 KB

1234567891011121314151617181920212223242526272829
  1. package("sparse-map")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/Tessil/sparse-map")
  4. set_description("C++ implementation of a memory efficient hash map and hash set")
  5. set_license("MIT")
  6. add_urls("https://github.com/Tessil/sparse-map/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/Tessil/sparse-map.git")
  8. add_versions("v0.7.0", "b603a24f596f95a06ec1d437f4cb928c2647cf9bc73b751ac6fb82deb7863d98")
  9. add_versions("v0.6.2", "7020c21e8752e59d72e37456cd80000e18671c803890a3e55ae36b295eba99f6")
  10. on_install("windows|x86", "windows|x64", "linux", "macosx", "bsd", "mingw", "msys", "android", "iphoneos", "cross", function (package)
  11. os.cp("include/*", package:installdir("include"))
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include "tsl/sparse_map.h"
  16. void test() {
  17. tsl::sparse_map<int, int> map = {{1, 1}, {2, 1}, {3, 1}};
  18. for(auto it = map.begin(); it != map.end(); ++it) {
  19. it.value() = 2;
  20. }
  21. }
  22. ]]}, {configs = {languages = "cxx11"}}))
  23. end)