xmake.lua 1.0 KB

123456789101112131415161718192021222324
  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.6", "ecdbd6c4b11bc1eb6e0e5022104f053cb5d1f1ef95e04499a6e29e21289e5063")
  9. add_versions("v2.4.5", "e4db72612adf00d7c7c9512cb9990768f5f3e62a72039929b78ba17d5a6f4308")
  10. add_versions("v2.4.4", "25e611e1d4286c73d9cce7bbc99f83e00629551602351fec1edcbb669243e047")
  11. on_install(function (package)
  12. os.vcp("clove-unit.h", package:installdir("include"))
  13. end)
  14. on_test(function (package)
  15. assert(package:check_csnippets({test = [[
  16. CLOVE_TEST(test) {
  17. CLOVE_IS_TRUE(1);
  18. }
  19. ]]}, {includes = "clove-unit.h"}))
  20. end)