2
0

xmake.lua 1.0 KB

12345678910111213141516171819202122232425
  1. package("stdexec")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/NVIDIA/stdexec")
  4. set_description("`std::execution`, the proposed C++ framework for asynchronous and parallel programming. ")
  5. add_urls("https://github.com/NVIDIA/stdexec.git")
  6. add_versions("2024.03.08", "b3ba13a7b8c206371207196e08844fb7bc745438")
  7. if is_plat("windows") then
  8. add_cxxflags("/Zc:__cplusplus")
  9. end
  10. add_deps("cmake")
  11. on_install("linux", "macosx", "mingw", function (package)
  12. local configs = {"-DSTDEXEC_BUILD_EXAMPLES=OFF", "-DSTDEXEC_BUILD_TESTS=OFF"}
  13. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
  14. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  15. import("package.tools.cmake").install(package, configs)
  16. end)
  17. on_test(function (package)
  18. assert(package:has_cxxincludes("exec/static_thread_pool.hpp", {configs = {languages = "c++20"}}))
  19. end)