xmake.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. package("cgraph")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("http://www.chunel.cn")
  4. set_description("A common used C++ DAG framework")
  5. set_license("MIT")
  6. add_urls("https://github.com/ChunelFeng/CGraph/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/ChunelFeng/CGraph.git")
  8. add_versions("v2.6.0", "1b055ee86f0340f2c35b4ed40c4a3b4cc05081b115b0fb634d778671018648f2")
  9. add_versions("v2.5.4", "fd5a53dc0d7e3fc11050ccc13fac987196ad42184a4e244b9d5e5d698b1cb101")
  10. if is_plat("windows") then
  11. add_cxxflags("/source-charset:utf-8")
  12. end
  13. on_install(function (package)
  14. os.vcp("src/*", package:installdir("include"))
  15. end)
  16. on_test(function (package)
  17. assert(package:check_cxxsnippets({test = [[
  18. #include <CGraph.h>
  19. class MyNode1 : public CGraph::GNode {
  20. public:
  21. CStatus run() override {
  22. CGRAPH_SLEEP_SECOND(1)
  23. return CStatus();
  24. }
  25. };
  26. void test() {}
  27. ]]}, {configs = {languages = "c++11"}}))
  28. end)