xmake.lua 915 B

1234567891011121314151617181920212223242526
  1. package("tf_workstealingqueue")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/taskflow/work-stealing-queue")
  4. set_description("A fast work-stealing queue template in C++")
  5. set_license("MIT")
  6. add_urls("https://github.com/taskflow/work-stealing-queue.git")
  7. add_versions("2022.07.20", "378e297749374300bf9bc0229096285447993877")
  8. on_install(function (package)
  9. os.cp("wsq.hpp", package:installdir("include"))
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. static void test() {
  14. WorkStealingQueue<int> queue;
  15. queue.push(0);
  16. queue.push(1);
  17. std::optional<int> item1 = queue.pop();
  18. std::optional<int> item2 = queue.steal();
  19. }
  20. ]]}, {configs = {languages = "c++17"}, includes = {"wsq.hpp"}}))
  21. end)