xmake.lua 825 B

12345678910111213141516171819202122232425
  1. package("bvh")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/madmann91/bvh")
  4. set_description("A modern C++ BVH construction and traversal library")
  5. set_license("MIT")
  6. add_urls("https://github.com/madmann91/bvh.git")
  7. add_versions("2023.6.30", "578b1e8035743d0a97fcac802de81622c54f28e3")
  8. on_install(function (package)
  9. if not package:is_plat("cross") then
  10. package:add("cxxflags", "-march=native")
  11. end
  12. os.cp("src/bvh", package:installdir("include"))
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. #include <bvh/v2/thread_pool.h>
  17. void test() {
  18. bvh::v2::ThreadPool thread_pool;
  19. }
  20. ]]}, {configs = {languages = "c++20"}}))
  21. end)