From c750b28220ebe3cacb087935871c7750758fc225 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 13 Mar 2017 09:56:45 -0400 Subject: Help: Move generator platform support details to variable docs Move the details about support for generator platform specification to the `CMAKE_GENERATOR_PLATFORM` variable documentation. This is a more suitable place because it is shared by all means to set this variable, not just the `cmake -A` option. --- Help/manual/OPTIONS_BUILD.txt | 8 +------- Help/variable/CMAKE_GENERATOR_PLATFORM.rst | 9 ++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 9b3f717..1dc2a74 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -66,13 +66,7 @@ Some CMake generators support a platform name to be given to the native build system to choose a compiler or SDK. See the - :variable:`CMAKE_GENERATOR_PLATFORM` variable. - This is supported only on specific generators: - - * For :ref:`Visual Studio Generators` with VS 2005 and above this - specifies the target architecture. - - See native build system documentation for allowed platform names. + :variable:`CMAKE_GENERATOR_PLATFORM` variable for details. ``-Wno-dev`` Suppress developer warnings. diff --git a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst index a5c284a..161ef20 100644 --- a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst +++ b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst @@ -1,7 +1,7 @@ CMAKE_GENERATOR_PLATFORM ------------------------ -Generator-specific target platform name specified by user. +Generator-specific target platform specification provided by user. Some CMake generators support a target platform name to be given to the native build system to choose a compiler toolchain. @@ -13,3 +13,10 @@ A toolchain file specified by the :variable:`CMAKE_TOOLCHAIN_FILE` variable may initialize ``CMAKE_GENERATOR_PLATFORM``. Once a given build tree has been initialized with a particular value for this variable, changing the value has undefined behavior. + +Platform specification is supported only on specific generators: + +* For :ref:`Visual Studio Generators` with VS 2005 and above this + specifies the target architecture. + +See native build system documentation for allowed platform names. -- cgit v0.12 From 7df38939f9cc21d955c2daf5b6dc2cf70bbfca74 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 13 Mar 2017 09:58:42 -0400 Subject: Help: Move generator toolset support details to variable docs Move the details about support for generator toolset specification to the `CMAKE_GENERATOR_TOOLSET` variable documentation. This is a more suitable place because it is shared by all means to set this variable, not just the `cmake -T` option. --- Help/manual/OPTIONS_BUILD.txt | 16 +++++----------- Help/variable/CMAKE_GENERATOR_TOOLSET.rst | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 1dc2a74..e8b87c9 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -48,18 +48,12 @@ build system. Possible generator names are specified in the :manual:`cmake-generators(7)` manual. -``-T `` - Specify toolset name if supported by generator. +``-T `` + Toolset specification for the generator, if supported. - Some CMake generators support a toolset name to be given to the - native build system to choose a compiler. - See the :variable:`CMAKE_GENERATOR_TOOLSET` variable. - This is supported only on specific generators: - - * :ref:`Visual Studio Generators` for VS 2010 and above - * The :generator:`Xcode` generator for Xcode 3.0 and above - - See native build system documentation for allowed toolset names. + Some CMake generators support a toolset specification to tell + the native build system how to choose a compiler. See the + :variable:`CMAKE_GENERATOR_TOOLSET` variable for details. ``-A `` Specify platform name if supported by generator. diff --git a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst index 89abe54..6a24197 100644 --- a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst +++ b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst @@ -1,15 +1,22 @@ CMAKE_GENERATOR_TOOLSET ----------------------- -Native build system toolset name specified by user. +Native build system toolset specification provided by user. -Some CMake generators support a toolset name to be given to the native -build system to choose a compiler. If the user specifies a toolset -name (e.g. via the :manual:`cmake(1)` ``-T`` option) the value will be -available in this variable. +Some CMake generators support a toolset specification to tell the +native build system how to choose a compiler. If the user specifies +a toolset (e.g. via the :manual:`cmake(1)` ``-T`` option) the value +will be available in this variable. The value of this variable should never be modified by project code. A toolchain file specified by the :variable:`CMAKE_TOOLCHAIN_FILE` variable may initialize ``CMAKE_GENERATOR_TOOLSET``. Once a given build tree has been initialized with a particular value for this variable, changing the value has undefined behavior. + +Toolset specification is supported only on specific generators: + +* :ref:`Visual Studio Generators` for VS 2010 and above +* The :generator:`Xcode` generator for Xcode 3.0 and above + +See native build system documentation for allowed toolset names. -- cgit v0.12 From 35c5cddcc51b8e2e6caaebc969ce3d7ae810dee3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 13 Mar 2017 10:03:17 -0400 Subject: Help: Cross-reference generator platform variables --- Help/variable/CMAKE_GENERATOR_PLATFORM.rst | 6 ++++++ Help/variable/CMAKE_VS_PLATFORM_NAME.rst | 1 + 2 files changed, 7 insertions(+) diff --git a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst index 161ef20..50412ff 100644 --- a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst +++ b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst @@ -20,3 +20,9 @@ Platform specification is supported only on specific generators: specifies the target architecture. See native build system documentation for allowed platform names. + +Visual Studio Platform Selection +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +On :ref:`Visual Studio Generators` the selected platform name +is provided in the :variable:`CMAKE_VS_PLATFORM_NAME` variable. diff --git a/Help/variable/CMAKE_VS_PLATFORM_NAME.rst b/Help/variable/CMAKE_VS_PLATFORM_NAME.rst index c6f8d41..a532743 100644 --- a/Help/variable/CMAKE_VS_PLATFORM_NAME.rst +++ b/Help/variable/CMAKE_VS_PLATFORM_NAME.rst @@ -5,3 +5,4 @@ Visual Studio target platform name. VS 8 and above allow project files to specify a target platform. CMake provides the name of the chosen platform in this variable. +See the :variable:`CMAKE_GENERATOR_PLATFORM` variable for details. -- cgit v0.12 From 60546b4829ecaa34da88c9a0993b38b967d25925 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 13 Mar 2017 10:03:30 -0400 Subject: Help: Cross-reference generator toolset variables --- Help/variable/CMAKE_GENERATOR_TOOLSET.rst | 6 ++++++ Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst index 6a24197..68e4eb1 100644 --- a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst +++ b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst @@ -20,3 +20,9 @@ Toolset specification is supported only on specific generators: * The :generator:`Xcode` generator for Xcode 3.0 and above See native build system documentation for allowed toolset names. + +Visual Studio Toolset Selection +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +On :ref:`Visual Studio Generators` the selected toolset name +is provided in the :variable:`CMAKE_VS_PLATFORM_TOOLSET` variable. diff --git a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst index 144a41d..ed2d3f3 100644 --- a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst +++ b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst @@ -8,3 +8,5 @@ compiler toolchains. CMake may specify a toolset explicitly, such as ``v110`` for VS 11 or ``Windows7.1SDK`` for 64-bit support in VS 10 Express. CMake provides the name of the chosen toolset in this variable. + +See the :variable:`CMAKE_GENERATOR_TOOLSET` variable for details. -- cgit v0.12 From 3df2506fb549d57802ba2c7d99724210970791de Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 13 Mar 2017 10:07:13 -0400 Subject: Help: Document VS generator toolset specification syntax --- Help/generator/VS_TOOLSET_HOST_ARCH.txt | 8 ++------ Help/variable/CMAKE_GENERATOR_TOOLSET.rst | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Help/generator/VS_TOOLSET_HOST_ARCH.txt b/Help/generator/VS_TOOLSET_HOST_ARCH.txt index 58e9223..5d13e77 100644 --- a/Help/generator/VS_TOOLSET_HOST_ARCH.txt +++ b/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. -``,host=x64`` - Select the 64-bit variant of the ```` toolset. +64-bit host tools by adding a ``host=x64`` option to the toolset specification. +See the :variable:`CMAKE_GENERATOR_TOOLSET` variable for details. diff --git a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst index 68e4eb1..11c37d7 100644 --- a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst +++ b/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=`` + 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. -- cgit v0.12