From the Boost mailing list I understand that VS2017 has the following version numbers that we would probably be most interested in:
Visual Studio 15.0
cl; C/C++ Compiler 19.10
Platform Toolset: v141
The following macros are defined in the Visual Studio 2017 IDE:
CrtSDKReferenceVersion 14.0
MSBuildToolsVersion 15.0
PlatformToolsetVersion 141
VCToolsVersion 14.10.25017
VisualStudioVersion 15.0
During compilation the following variables are #define
'd:
_MSC_VER 1910
_MSC_FULL_VER 191025017
cl.exe
is contained within an MSVC folder with the VC tools version. The complete x64
folder path is
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64
cl /Bv
from the command line lists:
Compiler Passes:
cl.exe: Version 19.10.25017.0
c1.dll: Version 19.10.25017.0
c1xx.dll: Version 19.10.25017.0
c2.dll: Version 19.10.25017.0
link.exe: Version 14.10.25017.0
mspdb140.dll: Version 14.10.25017.0
1033\clui.dll: Version 19.10.25017.0
Notice mspdb140.dll
and link.exe
are listed with version 14.10.25017.0.
And here it seems that msvc : 14.1
should be used as the toolset for boost. And here is another answer where some comments talk about boost's compiler naming.
When I compile I get the libraries names with v141 e.g.: boost_atomic-vc141-mt-1_64.lib
But in CMake the _Boost_GUESS_COMPILER_PREFIX
function has the following:
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
set(_boost_COMPILER "-vc150")
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
set(_boost_COMPILER "-vc140")
So which version should be used? vc141
or vc150
? Does
v141
implyvc141
, or doesv141
implyvc150
?