diff options
author | Will Feng <yf225@cornell.edu> | 2017-12-15 04:14:43 -0500 |
---|---|---|
committer | Adam Paszke <adam.paszke@gmail.com> | 2017-12-15 10:14:43 +0100 |
commit | db446d69ca1f1d20af033df4f437e13d3dc9db88 (patch) | |
tree | 4653d3560d9067d0fcfba1d67e1580b1f83105c9 /setup.py | |
parent | 595c6dea71e5aff4f190e528cdb62721f7adc48d (diff) | |
download | pytorch-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.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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: |