Support building binary on windows machines

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/13059

Reviewed By: llyfacebook

Differential Revision: D10560147

Pulled By: sf-wind

fbshipit-source-id: c8f38b30c9acdf6ae494e56a5876fd4493696e5d
This commit is contained in:
Fei Sun 2018-10-24 12:21:36 -07:00 committed by Facebook Github Bot
parent 8355219e68
commit fcf801f061

View File

@ -10,6 +10,10 @@ setlocal
SET ORIGINAL_DIR=%cd%
SET CAFFE2_ROOT=%~dp0%..
if NOT DEFINED BUILD_BINARY (
set BUILD_BINARY=OFF
)
if NOT DEFINED CAFFE2_STATIC_LINK_CUDA (
set CAFFE2_STATIC_LINK_CUDA=OFF
)
@ -60,6 +64,7 @@ cd %CAFFE2_ROOT%\build
cmake .. ^
-G%CMAKE_GENERATOR% ^
-DBUILD_TEST=OFF ^
-DBUILD_BINARY=%BUILD_BINARY% ^
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
-DCAFFE2_STATIC_LINK_CUDA=%CAFFE2_STATIC_LINK_CUDA% ^
-DUSE_CUDA=%USE_CUDA% ^