xmake.lua 976 B

123456789101112131415161718192021222324252627
  1. package("dbg-macro")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/sharkdp/dbg-macro")
  4. set_description("A dbg(…) macro for C++")
  5. set_license("MIT")
  6. add_urls("https://github.com/sharkdp/dbg-macro/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/sharkdp/dbg-macro.git")
  8. add_versions("v0.4.0", "e44a1206fbfd1d3dc8ad649f387df479d288b08c80cf2f1239ccb4e26148d781")
  9. add_versions("v0.5.0", "dac4907aadf39dbd9eac279a214c59ad30af6c0c3d585688242f73cb1a9ce243")
  10. on_install(function (package)
  11. os.cp("dbg.h", package:installdir("include"))
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. void test()
  16. {
  17. int a = 1;
  18. long b = 2;
  19. dbg(a);
  20. dbg(b);
  21. dbg(&a);
  22. }
  23. ]]}, {configs = {languages = "c++17"}, includes = { "dbg.h" } }))
  24. end)