xmake.lua 910 B

123456789101112131415161718192021
  1. package("sparsepp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/greg7mdp/sparsepp")
  4. set_description("A fast, memory efficient hash map for C++")
  5. add_urls("https://github.com/greg7mdp/sparsepp/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/greg7mdp/sparsepp.git")
  7. add_versions("1.22", "5516c814fe56c692aaa36f49e696f4a6292f04b5ae79f4ab7bd121e2cc48b917")
  8. on_install("linux", "macosx", "bsd", "windows", "android", "iphoneos", "cross", "mingw", function (package)
  9. os.cp("sparsepp/*.h", package:installdir("include/sparsepp"))
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. void test() {
  14. spp::sparse_hash_set<int> test;
  15. test.clear();
  16. }
  17. ]]}, {configs = {languages = "c++11"}, includes = {"sparsepp/spp.h"}}))
  18. end)