Add support for CMake switches for VS 2019 (#20752)

Summary:
Appending `arch` to the generator name is not supported for VS starting from VS 2019.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20752

Differential Revision: D15436740

Pulled By: ezyang

fbshipit-source-id: 20057aae8f708d82619927bf2cb87dd1bc2df312
This commit is contained in:
peter
2019-05-21 12:22:41 -07:00
committed by Facebook Github Bot
parent 47dc65fe76
commit bb20956e3c

View File

@ -137,11 +137,10 @@ def run_cmake(version,
if USE_NINJA:
cmake_args.append('-GNinja')
elif IS_WINDOWS:
cmake_args.append('-GVisual Studio 15 2017')
if IS_64BIT:
cmake_args.append('-GVisual Studio 15 2017 Win64')
cmake_args.append('-Ax64')
cmake_args.append('-Thost=x64')
else:
cmake_args.append('-GVisual Studio 15 2017')
try:
import numpy as np
NUMPY_INCLUDE_DIR = np.get_include()