Browse Source

fix libtorch for old xmake

ruki 4 years ago
parent
commit
732926e46b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/l/libtorch/xmake.lua

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

@@ -20,7 +20,7 @@ package("libtorch")
     add_includedirs("include/torch/csrc/api/include")
     add_includedirs("include/torch/csrc/api/include")
 
 
     -- enable long paths for git submodule on windows
     -- enable long paths for git submodule on windows
-    if is_host("windows") then
+    if is_host("windows") and set_policy then
         set_policy("platform.longpaths", true)
         set_policy("platform.longpaths", true)
     end
     end