summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorWill Feng <yf225@cornell.edu>2017-12-15 04:14:43 -0500
committerAdam Paszke <adam.paszke@gmail.com>2017-12-15 10:14:43 +0100
commitdb446d69ca1f1d20af033df4f437e13d3dc9db88 (patch)
tree4653d3560d9067d0fcfba1d67e1580b1f83105c9 /setup.py
parent595c6dea71e5aff4f190e528cdb62721f7adc48d (diff)
downloadpytorch-db446d69ca1f1d20af033df4f437e13d3dc9db88.tar.gz
pytorch-db446d69ca1f1d20af033df4f437e13d3dc9db88.tar.bz2
pytorch-db446d69ca1f1d20af033df4f437e13d3dc9db88.zip
Fix issues with Windows 7 & 10 CPU build (#4065)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index afbc8931e4..fedbad5403 100644
--- a/setup.py
+++ b/setup.py
@@ -117,12 +117,13 @@ def build_libs(libs):
build_libs_cmd = ['bash', 'torch/lib/build_libs.sh']
my_env = os.environ.copy()
my_env["PYTORCH_PYTHON"] = sys.executable
- if WITH_NINJA:
- my_env["CMAKE_GENERATOR"] = '-GNinja'
- my_env["CMAKE_INSTALL"] = 'ninja install'
- else:
- my_env['CMAKE_GENERATOR'] = ''
- my_env['CMAKE_INSTALL'] = 'make install'
+ if not IS_WINDOWS:
+ if WITH_NINJA:
+ my_env["CMAKE_GENERATOR"] = '-GNinja'
+ my_env["CMAKE_INSTALL"] = 'ninja install'
+ else:
+ my_env['CMAKE_GENERATOR'] = ''
+ my_env['CMAKE_INSTALL'] = 'make install'
if WITH_SYSTEM_NCCL:
my_env["NCCL_ROOT_DIR"] = NCCL_ROOT_DIR
if WITH_CUDA: