Unverified Commit c306c7b9 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[python][R][docs] added possibility to install with Visual Studio 2019 Preview (#1956)

parent f9a1465d
......@@ -53,7 +53,7 @@ if (!use_precompile) {
} else {
try_vs <- 0
local_vs_def <- ""
vs_versions <- c("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64")
vs_versions <- c("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64", "Visual Studio 16 2019")
for(vs in vs_versions){
vs_def <- paste0(" -G \"", vs, "\"")
tmp_cmake_cmd <- paste0(cmake_cmd, vs_def)
......
......@@ -16,7 +16,7 @@ Preparation
Install from `PyPI <https://pypi.org/project/lightgbm>`_ Using ``pip``
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
For **Windows** users, `VC runtime <https://go.microsoft.com/fwlink/?LinkId=746572>`_ is needed if **Visual Studio** (2015 or 2017) is not installed.
For **Windows** users, `VC runtime <https://go.microsoft.com/fwlink/?LinkId=746572>`_ is needed if **Visual Studio** (2015 or newer) is not installed.
For **Linux** users, **glibc** >= 2.14 is required.
......
......@@ -148,7 +148,7 @@ def compile_cpp(use_mingw=False, use_gpu=False, use_mpi=False, nomp=False,
lib_path = os.path.join(CURRENT_DIR, "compile", "windows", "x64", "DLL", "lib_lightgbm.dll")
if not any((use_gpu, use_mpi, use_hdfs)):
logger.info("Starting to compile with MSBuild from existing solution file.")
platform_toolsets = ("v141", "v140")
platform_toolsets = ("v141", "v140", "v142")
for pt in platform_toolsets:
status = silent_call(["MSBuild",
os.path.join(CURRENT_DIR, "compile", "windows", "LightGBM.sln"),
......@@ -162,7 +162,7 @@ def compile_cpp(use_mingw=False, use_gpu=False, use_mpi=False, nomp=False,
if status != 0 or not os.path.exists(lib_path):
logger.warning("Compilation with MSBuild from existing solution file failed.")
if status != 0 or not os.path.exists(lib_path):
vs_versions = ("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64")
vs_versions = ("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64", "Visual Studio 16 2019")
for vs in vs_versions:
logger.info("Starting to compile with %s." % vs)
status = silent_call(cmake_cmd + ["-G", vs])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment