Skip to content

Commit

Permalink
add win staticlibs build switch, for now always with MKL
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkingsugar committed Jan 4, 2019
1 parent 8391b12 commit 502194d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions torch/torch_cpp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,23 @@ when defined wasm:
{.passL: "-lc10 -lcaffe2".}

elif defined windows:
cpplibs(
atenPath & "/lib/cpuinfo.lib",
atenPath & "/lib/c10.lib",
atenPath & "/lib/caffe2.lib"
)
when not defined staticlibs:
cpplibs(
atenPath & "/lib/cpuinfo.lib",
atenPath & "/lib/c10.lib",
atenPath & "/lib/caffe2.lib"
)
else:
cpplibs(
atenPath & "/lib/cpuinfo.lib",
atenPath & "/lib/clog.lib",
atenPath & "/lib/c10.lib",
atenPath & "/lib/caffe2.lib",
atenPath & "/lib/mkl_core.lib",
atenPath & "/lib/mkl_intel_thread.lib",
atenPath & "/lib/mkl_intel_lp64.lib",
atenPath & "/lib/libiomp5md.lib",
)

cppdefines("NOMINMAX")

Expand Down

0 comments on commit 502194d

Please sign in to comment.