xmake.lua 881 B

1234567891011121314151617181920212223242526
  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. on_install(function (package)
  10. os.cp("dbg.h", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test()
  15. {
  16. int a = 1;
  17. long b = 2;
  18. dbg(a);
  19. dbg(b);
  20. dbg(&a);
  21. }
  22. ]]}, {configs = {languages = "c++17"}, includes = { "dbg.h" } }))
  23. end)