New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python][R][docs][ci] better compatibility with Visual Studio 2019 #2083
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure the other maintainers know more about CMake than me, but did my best to read the diff and the provided links, and all makes sense to me! Thank you.
Here is a couple of links and quotes for anyone who sees
means that we may safely use this option.
|
I don't know much about Windows. |
@Laurae2 Link to MSVC Redistributable 2019 has been added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK on Windows with VS 2019 here.
@StrikerRUS It seems there are no differences in the generated codes, from this https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line?view=vs-2019. |
@guolinke Yeah, you're absolutely right! It's all about compiler performance (speed, ability to compile huge projects, etc.). The code itself should be identical. I agree, let's leave 32bit compilers for now. |
OK, I think it's ready to merge. |
This PR is related to #1956.
VS 2019 has been released recently and the latest CMake 3.14.1 supports it. Therefore we can reorder generators (and Platform Toolsets) to try to build LightGBM with VS 2019 firstly.
Due to that CMake dropped the possibility to specify architecture inside generator name (
Win64
), we can set it via-A
option, which was presented in CMake since 3.1 and we require >=3.8 for Windows (it's shorter and better than settingCMAKE_GENERATOR_PLATFORM
directly and allows to handle all generators in the same way).I'm doubt about only one thing: whether we need to specify
-T host=
option or not. Its default behavior differs in VS 2019 compared to all other versions:2019:
2017:
This option controls the following:
Refer to https://gitlab.kitware.com/cmake/cmake/issues/17451#note_341418
Remaining things:
add a link to MSVC Redistributable 2019 here; it's still unavailable from MS support siteDone!;add a bullet for matching Boost binaries with VS 2019 here; latest 1.70.0b1 doesn't contain 14.2 version.UPD: ... But 1.70 does: https://sourceforge.net/projects/boost/files/boost-binaries/1.70.0/.