Skip to content

Commit

Permalink
changed minimum version of VS to 2015 (#1027)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored and chivee committed Nov 1, 2017
1 parent 4adebd0 commit b3c20f7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ if(WIN32 AND MINGW)
endif()

if(MSVC)
if(MSVC_VERSION LESS 1800)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a newer msvc.")
if(MSVC_VERSION LESS 1900)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a newer MSVC.")
endif()

SET(variables
Expand Down
1 change: 0 additions & 1 deletion R-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

* 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)

Once you have all this setup, you can use `lgb.dl` from `lgbdl` package to install LightGBM from repository.
Expand Down
2 changes: 1 addition & 1 deletion R-package/src/install.libs.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (!use_precompile) {
} else {
try_vs <- 0
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){
vs_def <- paste0(" -G \"", vs, "\"")
tmp_cmake_cmd <- paste0(cmake_cmd, vs_def)
Expand Down
12 changes: 5 additions & 7 deletions docs/Installation-Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Visual Studio (or MSBuild)
With GUI
********

1. Install `Visual Studio`_.
1. Install `Visual Studio`_ (2015 or newer).

2. Download `zip archive`_ and unzip it.

Expand All @@ -31,7 +31,7 @@ The exe file will be in ``LightGBM-master/windows/x64/Release`` folder.
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:

Expand Down Expand Up @@ -129,7 +129,7 @@ With GUI

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.

Expand All @@ -146,7 +146,7 @@ From Command Line

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:

Expand Down Expand Up @@ -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.

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.

Expand All @@ -250,8 +250,6 @@ Following procedure is for the MSVC (Microsoft Visual C++) build.

**Note**: match your Visual C++ version:

Visual Studio 2013 -> ``msvc-12.0-64.exe``,

Visual Studio 2015 -> ``msvc-14.0-64.exe``,

Visual Studio 2017 -> ``msvc-14.1-64.exe``.
Expand Down
2 changes: 1 addition & 1 deletion python-package/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
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:

Expand Down
4 changes: 2 additions & 2 deletions python-package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def compile_cpp(use_mingw=False, use_gpu=False):
lib_path = "../compile/windows/x64/DLL/lib_lightgbm.dll"
if not use_gpu:
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:
status = silent_call(["MSBuild", "../compile/windows/LightGBM.sln",
"/p:Configuration=DLL",
Expand All @@ -111,7 +111,7 @@ def compile_cpp(use_mingw=False, use_gpu=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", "Visual Studio 12 2013 Win64")
vs_versions = ("Visual Studio 15 2017 Win64", "Visual Studio 14 2015 Win64")
for vs in vs_versions:
logger.info("Starting to compile with %s." % vs)
status = silent_call(cmake_cmd + ["-G", vs])
Expand Down

0 comments on commit b3c20f7

Please sign in to comment.