xmake.lua 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package("bandit")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://banditcpp.github.io/bandit/")
  4. set_description("Human-friendly unit testing for C++11")
  5. add_urls("https://github.com/banditcpp/bandit.git", {submodules = false})
  6. add_versions("2023.08.05", "f297efd8aecc6e9ce8f84e33264898bf77f9cb73")
  7. add_patches("2023.08.05", "patches/2023.08.05/debundle-snowhouse.patch", "66d5f6beb2a2f099b7e22ed6b7993f70ee01630e0df10f149c4d0e792b3a42a0")
  8. add_deps("snowhouse")
  9. on_install(function (package)
  10. os.cp("bandit", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #include <bandit/bandit.h>
  15. using namespace bandit;
  16. go_bandit([](){
  17. AssertThat(123, snowhouse::Equals(123));
  18. });
  19. void test() {
  20. int argc;
  21. char* argv[2];
  22. bandit::run(argc, argv);
  23. }
  24. ]]}, {configs = {languages = "c++11"}}))
  25. end)