xmake.lua 1.0 KB

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