VS: Add option to select the version of the toolset used by VS 2017

Add new `version=` parameter in the toolset setting to select the
version.  Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the
version, if one is set (blank indicates default).

Fixes: #17549
This commit is contained in:
Basil Fierz
2018-05-19 13:23:21 +02:00
committed by Brad King
parent a543a233a2
commit 5f13168419
22 changed files with 191 additions and 0 deletions

View File

@@ -48,3 +48,8 @@ Supported pairs are:
Supported by VS 2013 and above.
See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE`
variable.
``version=<version>``
Specify the toolset version to use. Supported by VS 2017
and above with the specified toolset installed.
See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_VERSION` variable.

View File

@@ -0,0 +1,11 @@
CMAKE_VS_PLATFORM_TOOLSET_VERSION
---------------------------------
Visual Studio Platform Toolset version.
The :ref:`Visual Studio Generators` for VS 2017 and above allow to
select minor versions of the same toolset. The toolset version number
may be specified by a field in :variable:`CMAKE_GENERATOR_TOOLSET` of
the form ``version=14.11``. If none is specified CMake will choose a default
toolset. The value may be empty if no minor version was selected and the
default is used.