xmake.lua 840 B

12345678910111213141516171819202122
  1. package("clove-unit")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/fdefelici/clove-unit")
  4. set_description("Single-Header Unit Testing framework for C (interoperable with C++) with test autodiscovery feature")
  5. set_license("MIT")
  6. add_urls("https://github.com/fdefelici/clove-unit/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/fdefelici/clove-unit.git")
  8. add_versions("v2.4.4", "25e611e1d4286c73d9cce7bbc99f83e00629551602351fec1edcbb669243e047")
  9. on_install(function (package)
  10. os.vcp("clove-unit.h", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_csnippets({test = [[
  14. CLOVE_TEST(test) {
  15. CLOVE_IS_TRUE(1);
  16. }
  17. ]]}, {includes = "clove-unit.h"}))
  18. end)