xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728
  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.6.2", "7020c21e8752e59d72e37456cd80000e18671c803890a3e55ae36b295eba99f6")
  9. on_install("windows|x86", "windows|x64", "linux", "macosx", "bsd", "mingw", "msys", "android", "iphoneos", "cross", function (package)
  10. os.cp("include/*", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #include "tsl/sparse_map.h"
  15. void test() {
  16. tsl::sparse_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 = "cxx11"}}))
  22. end)