changed minimum version of VS to 2015 (#1027)

This commit is contained in:
Nikita Titov 2017-11-01 08:55:58 +03:00 коммит произвёл Qiwei Ye
Родитель 4adebd0eaf
Коммит b3c20f7aba
6 изменённых файлов: 11 добавлений и 14 удалений

Просмотреть файл

@ -75,8 +75,8 @@ if(WIN32 AND MINGW)
endif() endif()
if(MSVC) if(MSVC)
if(MSVC_VERSION LESS 1800) if(MSVC_VERSION LESS 1900)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a newer msvc.") message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a newer MSVC.")
endif() endif()
SET(variables SET(variables

Просмотреть файл

@ -92,7 +92,6 @@ You will need:
In addition, if you are using a Visual Studio precompiled DLL, assuming you do not have Visual Studio installed (if you have it installed, ignore the warnings below): In addition, if you are using a Visual Studio precompiled DLL, assuming you do not have Visual Studio installed (if you have it installed, ignore the warnings below):
* Visual Studio 2013 precompiled DLL: download and install Visual Studio Runtime for [2013](https://support.microsoft.com/en-us/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package) (you will get an error about MSVCP120.dll missing otherwise)
* Visual Studio 2015/2017 precompiled DLL: download and install Visual Studio Runtime for [2015](https://www.microsoft.com/en-us/download/details.aspx?id=52685)/[2017](https://go.microsoft.com/fwlink/?LinkId=746572) (you will get an error about MSVCP140.dll missing otherwise) * Visual Studio 2015/2017 precompiled DLL: download and install Visual Studio Runtime for [2015](https://www.microsoft.com/en-us/download/details.aspx?id=52685)/[2017](https://go.microsoft.com/fwlink/?LinkId=746572) (you will get an error about MSVCP140.dll missing otherwise)
Once you have all this setup, you can use `lgb.dl` from `lgbdl` package to install LightGBM from repository. Once you have all this setup, you can use `lgb.dl` from `lgbdl` package to install LightGBM from repository.

Просмотреть файл

@ -57,7 +57,7 @@ if (!use_precompile) {
} else { } else {
try_vs <- 0 try_vs <- 0
local_vs_def <- "" local_vs_def <- ""
vs_versions <- c("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64", "Visual Studio 12 2013 Win64") vs_versions <- c("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64")
for(vs in vs_versions){ for(vs in vs_versions){
vs_def <- paste0(" -G \"", vs, "\"") vs_def <- paste0(" -G \"", vs, "\"")
tmp_cmake_cmd <- paste0(cmake_cmd, vs_def) tmp_cmake_cmd <- paste0(cmake_cmd, vs_def)

Просмотреть файл

@ -16,7 +16,7 @@ Visual Studio (or MSBuild)
With GUI With GUI
******** ********
1. Install `Visual Studio`_. 1. Install `Visual Studio`_ (2015 or newer).
2. Download `zip archive`_ and unzip it. 2. Download `zip archive`_ and unzip it.
@ -31,7 +31,7 @@ The exe file will be in ``LightGBM-master/windows/x64/Release`` folder.
From Command Line From Command Line
***************** *****************
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `MSBuild`_ (**MSBuild** is not needed if **Visual Studio** is installed). 1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `MSBuild`_ (**MSBuild** is not needed if **Visual Studio** (2015 or newer) is installed).
2. Run the following commands: 2. Run the following commands:
@ -129,7 +129,7 @@ With GUI
1. You need to install `MS MPI`_ first. Both ``msmpisdk.msi`` and ``MSMpiSetup.exe`` are needed. 1. You need to install `MS MPI`_ first. Both ``msmpisdk.msi`` and ``MSMpiSetup.exe`` are needed.
2. Install `Visual Studio`_. 2. Install `Visual Studio`_ (2015 or newer).
3. Download `zip archive`_ and unzip it. 3. Download `zip archive`_ and unzip it.
@ -146,7 +146,7 @@ From Command Line
1. You need to install `MS MPI`_ first. Both ``msmpisdk.msi`` and ``MSMpiSetup.exe`` are needed. 1. You need to install `MS MPI`_ first. Both ``msmpisdk.msi`` and ``MSMpiSetup.exe`` are needed.
2. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `MSBuild`_ (MSBuild is not needed if **Visual Studio** is installed). 2. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `MSBuild`_ (MSBuild is not needed if **Visual Studio** (2015 or newer) is installed).
3. Run the following commands: 3. Run the following commands:
@ -236,7 +236,7 @@ If you use **MinGW**, the build procedure are similar to the build in Linux. Ref
Following procedure is for the MSVC (Microsoft Visual C++) build. Following procedure is for the MSVC (Microsoft Visual C++) build.
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `MSBuild`_ (MSBuild is not needed if **Visual Studio** is installed). 1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `MSBuild`_ (MSBuild is not needed if **Visual Studio** (2015 or newer) is installed).
2. Install **OpenCL** for Windows. The installation depends on the brand (NVIDIA, AMD, Intel) of your GPU card. 2. Install **OpenCL** for Windows. The installation depends on the brand (NVIDIA, AMD, Intel) of your GPU card.
@ -250,8 +250,6 @@ Following procedure is for the MSVC (Microsoft Visual C++) build.
**Note**: match your Visual C++ version: **Note**: match your Visual C++ version:
Visual Studio 2013 -> ``msvc-12.0-64.exe``,
Visual Studio 2015 -> ``msvc-14.0-64.exe``, Visual Studio 2015 -> ``msvc-14.0-64.exe``,
Visual Studio 2017 -> ``msvc-14.1-64.exe``. Visual Studio 2017 -> ``msvc-14.1-64.exe``.

Просмотреть файл

@ -17,7 +17,7 @@ Note: 32-bit Python is not supported. Please install 64-bit version.
Install from `PyPI <https://pypi.python.org/pypi/lightgbm>`_ Using ``pip`` Install from `PyPI <https://pypi.python.org/pypi/lightgbm>`_ Using ``pip``
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
For Windows users, `VC runtime <https://go.microsoft.com/fwlink/?LinkId=746572>`_ is needed if Visual Studio (2013, 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 2017) is not installed.
Install `wheel <http://pythonwheels.com>`_ via ``pip install wheel`` first. After that download the wheel file and install from it: Install `wheel <http://pythonwheels.com>`_ via ``pip install wheel`` first. After that download the wheel file and install from it:

Просмотреть файл

@ -98,7 +98,7 @@ def compile_cpp(use_mingw=False, use_gpu=False):
lib_path = "../compile/windows/x64/DLL/lib_lightgbm.dll" lib_path = "../compile/windows/x64/DLL/lib_lightgbm.dll"
if not use_gpu: if not use_gpu:
logger.info("Starting to compile with MSBuild from existing solution file.") logger.info("Starting to compile with MSBuild from existing solution file.")
platform_toolsets = ("v141", "v140", "v120") platform_toolsets = ("v141", "v140")
for pt in platform_toolsets: for pt in platform_toolsets:
status = silent_call(["MSBuild", "../compile/windows/LightGBM.sln", status = silent_call(["MSBuild", "../compile/windows/LightGBM.sln",
"/p:Configuration=DLL", "/p:Configuration=DLL",
@ -111,7 +111,7 @@ def compile_cpp(use_mingw=False, use_gpu=False):
if status != 0 or not os.path.exists(lib_path): if status != 0 or not os.path.exists(lib_path):
logger.warning("Compilation with MSBuild from existing solution file failed.") logger.warning("Compilation with MSBuild from existing solution file failed.")
if status != 0 or not os.path.exists(lib_path): if status != 0 or not os.path.exists(lib_path):
vs_versions = ("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64", "Visual Studio 12 2013 Win64") vs_versions = ("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64")
for vs in vs_versions: for vs in vs_versions:
logger.info("Starting to compile with %s." % vs) logger.info("Starting to compile with %s." % vs)
status = silent_call(cmake_cmd + ["-G", vs]) status = silent_call(cmake_cmd + ["-G", vs])