xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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.1", "0024854adfa836d424ff38782c926173f2d869af205c39a031cf0dc13c418c84")
  9. add_versions("v2.6.0", "1b055ee86f0340f2c35b4ed40c4a3b4cc05081b115b0fb634d778671018648f2")
  10. add_versions("v2.5.4", "fd5a53dc0d7e3fc11050ccc13fac987196ad42184a4e244b9d5e5d698b1cb101")
  11. if is_plat("windows") then
  12. add_cxxflags("/source-charset:utf-8")
  13. end
  14. on_install(function (package)
  15. os.vcp("src/*", package:installdir("include"))
  16. end)
  17. on_test(function (package)
  18. assert(package:check_cxxsnippets({test = [[
  19. #include <CGraph.h>
  20. class MyNode1 : public CGraph::GNode {
  21. public:
  22. CStatus run() override {
  23. CGRAPH_SLEEP_SECOND(1)
  24. return CStatus();
  25. }
  26. };
  27. void test() {}
  28. ]]}, {configs = {languages = "c++11"}}))
  29. end)