xmake.lua 1.1 KB

123456789101112131415161718192021222324252627282930
  1. package("trompeloeil")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/rollbear/trompeloeil")
  4. set_description("A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0")
  5. set_license("BSL-1.0")
  6. add_urls("https://github.com/rollbear/trompeloeil/archive/refs/tags/$(version).tar.gz")
  7. add_versions("v47", "4a1d79260c1e49e065efe0817c8b9646098ba27eed1802b0c3ba7d959e4e5e84")
  8. add_versions("v43", "86a0afa2e97347202a0a883ab43da78c1d4bfff0d6cb93205cfc433d0d9eb9eb")
  9. on_install(function (package)
  10. os.cp("include", package:installdir())
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. class Interface
  15. {
  16. public:
  17. virtual bool foo(int, std::string& s) = 0;
  18. };
  19. class Mock : public Interface
  20. {
  21. public:
  22. MAKE_MOCK2(foo, bool(int, std::string&),override);
  23. };
  24. ]]}, {configs = {languages = "c++14"}, includes = { "trompeloeil.hpp" }}))
  25. end)