xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package("xor_singleheader")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/FastFilter/xor_singleheader")
  4. set_description("Header-only binary fuse and xor filter library.")
  5. set_license("Apache-2.0")
  6. add_urls("https://github.com/FastFilter/xor_singleheader/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/FastFilter/xor_singleheader.git")
  8. add_versions("v2.1.0", "8bd366d0e966e5659b35131669cfff31c7beccf74b9c258ea189b45e6592a9d8")
  9. if is_plat("linux", "bsd") then
  10. add_syslinks("m")
  11. end
  12. add_deps("cmake")
  13. on_install(function (package)
  14. local configs = {
  15. "-DBUILD_TESTING=OFF"
  16. }
  17. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  18. io.replace("CMakeLists.txt", "add_subdirectory(benchmarks)", "", {plain = true})
  19. import("package.tools.cmake").install(package, configs)
  20. end)
  21. on_test(function (package)
  22. assert(package:has_cfuncs("binary_fuse_cmpfunc", {includes = "binaryfusefilter.h"}))
  23. end)