Просмотр исходного кода

Help: Document VS generator toolset specification syntax

Brad King 8 лет назад
Родитель
Сommit
3df2506fb5
2 измененных файлов с 25 добавлено и 7 удалено
  1. 2 6
      Help/generator/VS_TOOLSET_HOST_ARCH.txt
  2. 23 1
      Help/variable/CMAKE_GENERATOR_TOOLSET.rst

+ 2 - 6
Help/generator/VS_TOOLSET_HOST_ARCH.txt

@@ -2,9 +2,5 @@ For each toolset that comes with this version of Visual Studio, there are
 variants that are themselves compiled for 32-bit (x86) and 64-bit (x64) hosts
 (independent of the architecture they target).  By default Visual Studio
 chooses the 32-bit variant even on a 64-bit host.  One may request use of the
-64-bit host tools by adding ``host=x64`` to the toolset specification:
-
-``host=x64``
-  Select the 64-bit variant of the default toolset.
-``<toolset>,host=x64``
-  Select the 64-bit variant of the ``<toolset>`` toolset.
+64-bit host tools by adding a ``host=x64`` option to the toolset specification.
+See the :variable:`CMAKE_GENERATOR_TOOLSET` variable for details.

+ 23 - 1
Help/variable/CMAKE_GENERATOR_TOOLSET.rst

@@ -24,5 +24,27 @@ See native build system documentation for allowed toolset names.
 Visual Studio Toolset Selection
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-On :ref:`Visual Studio Generators` the selected toolset name
+The :ref:`Visual Studio Generators` support toolset specification
+using one of these forms:
+
+* ``toolset``
+* ``toolset[,key=value]*``
+* ``key=value[,key=value]*``
+
+The ``toolset`` specifies the toolset name.  The selected toolset name
 is provided in the :variable:`CMAKE_VS_PLATFORM_TOOLSET` variable.
+
+The ``key=value`` pairs form a comma-separated list of options to
+specify generator-specific details of the toolset selection.
+Supported pairs are:
+
+``cuda=<version>``
+  Specify the CUDA toolkit version to use.  Supported by VS 2010
+  and above with the CUDA toolkit VS integration installed.
+  See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_CUDA` variable.
+
+``host=x64``
+  Request use of the native ``x64`` toolchain on ``x64`` hosts.
+  Supported by VS 2013 and above.
+  See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE`
+  variable.