소스 검색

fix libtorch on windows (#3187)

Hoildkv 1 년 전
부모
커밋
6a92031e49
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/l/libtorch/xmake.lua

+ 2 - 1
packages/l/libtorch/xmake.lua

@@ -25,7 +25,8 @@ package("libtorch")
     add_configs("python",   {description = "Build python interface.", default = false, type = "boolean"})
     add_configs("openmp",   {description = "Use OpenMP for parallel code.", default = true, type = "boolean"})
     add_configs("cuda",     {description = "Enable CUDA support.", default = false, type = "boolean"})
-    add_configs("ninja",    {description = "Use ninja as build tool.", default = false, type = "boolean"})
+    -- https://github.com/pytorch/pytorch/issues/24186 only ninja is supported on windows
+    add_configs("ninja",    {description = "Use ninja as build tool.", default = is_plat("windows"), type = "boolean"})
     add_configs("blas",     {description = "Set BLAS vendor.", default = "openblas", type = "string", values = {"mkl", "openblas", "eigen"}})
     add_configs("pybind11", {description = "Use pybind11 from xrepo.", default = false, type = "boolean"})
     add_configs("protobuf-cpp", {description = "Use protobuf from xrepo.", default = false, type = "boolean"})