Quellcode durchsuchen

Help: Suggest using -A to specify platform for VS generators

We already suggest `-T` for the toolset.  Create a dedicated section for
platform selection and suggest `-A`.  Provide examples.
Brad King vor 7 Jahren
Ursprung
Commit
15e211df80

+ 21 - 12
Help/generator/Visual Studio 10 2010.rst

@@ -3,18 +3,6 @@ Visual Studio 10 2010
 
 
 Generates Visual Studio 10 (VS 2010) project files.
 Generates Visual Studio 10 (VS 2010) project files.
 
 
-The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
-to specify a target platform name (architecture).
-
-For compatibility with CMake versions prior to 3.1, one may specify
-a target platform name optionally at the end of this generator name:
-
-``Visual Studio 10 2010 Win64``
-  Specify target platform ``x64``.
-
-``Visual Studio 10 2010 IA64``
-  Specify target platform ``Itanium``.
-
 For compatibility with CMake versions prior to 3.0, one may specify this
 For compatibility with CMake versions prior to 3.0, one may specify this
 generator using the name ``Visual Studio 10`` without the year component.
 generator using the name ``Visual Studio 10`` without the year component.
 
 
@@ -24,6 +12,27 @@ Project Types
 Only Visual C++ and C# projects may be generated.  Other types of
 Only Visual C++ and C# projects may be generated.  Other types of
 projects (Database, Website, etc.) are not supported.
 projects (Database, Website, etc.) are not supported.
 
 
+Platform Selection
+^^^^^^^^^^^^^^^^^^
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
+via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
+name (architecture).  For example:
+
+* ``cmake -G "Visual Studio 10 2010" -A Win32``
+* ``cmake -G "Visual Studio 10 2010" -A x64``
+* ``cmake -G "Visual Studio 10 2010" -A Itanium``
+
+For compatibility with CMake versions prior to 3.1, one may specify
+a target platform name optionally at the end of the generator name.
+This is supported only for:
+
+``Visual Studio 10 2010 Win64``
+  Specify target platform ``x64``.
+
+``Visual Studio 10 2010 IA64``
+  Specify target platform ``Itanium``.
+
 Toolset Selection
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^
 
 

+ 23 - 12
Help/generator/Visual Studio 11 2012.rst

@@ -3,11 +3,31 @@ Visual Studio 11 2012
 
 
 Generates Visual Studio 11 (VS 2012) project files.
 Generates Visual Studio 11 (VS 2012) project files.
 
 
-The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
-to specify a target platform name (architecture).
+For compatibility with CMake versions prior to 3.0, one may specify this
+generator using the name "Visual Studio 11" without the year component.
+
+Project Types
+^^^^^^^^^^^^^
+
+Only Visual C++ and C# projects may be generated.  Other types of
+projects (JavaScript, Database, Website, etc.) are not supported.
+
+Platform Selection
+^^^^^^^^^^^^^^^^^^
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
+via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
+name (architecture).  For example:
+
+* ``cmake -G "Visual Studio 11 2012" -A Win32``
+* ``cmake -G "Visual Studio 11 2012" -A x64``
+* ``cmake -G "Visual Studio 11 2012" -A ARM``
+* ``cmake -G "Visual Studio 11 2012" -A <WinCE-SDK>``
+  (Specify a target platform matching a Windows CE SDK name.)
 
 
 For compatibility with CMake versions prior to 3.1, one may specify
 For compatibility with CMake versions prior to 3.1, one may specify
-a target platform name optionally at the end of this generator name:
+a target platform name optionally at the end of the generator name.
+This is supported only for:
 
 
 ``Visual Studio 11 2012 Win64``
 ``Visual Studio 11 2012 Win64``
   Specify target platform ``x64``.
   Specify target platform ``x64``.
@@ -18,15 +38,6 @@ a target platform name optionally at the end of this generator name:
 ``Visual Studio 11 2012 <WinCE-SDK>``
 ``Visual Studio 11 2012 <WinCE-SDK>``
   Specify target platform matching a Windows CE SDK name.
   Specify target platform matching a Windows CE SDK name.
 
 
-For compatibility with CMake versions prior to 3.0, one may specify this
-generator using the name "Visual Studio 11" without the year component.
-
-Project Types
-^^^^^^^^^^^^^
-
-Only Visual C++ and C# projects may be generated.  Other types of
-projects (JavaScript, Database, Website, etc.) are not supported.
-
 Toolset Selection
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^
 
 

+ 21 - 12
Help/generator/Visual Studio 12 2013.rst

@@ -3,18 +3,6 @@ Visual Studio 12 2013
 
 
 Generates Visual Studio 12 (VS 2013) project files.
 Generates Visual Studio 12 (VS 2013) project files.
 
 
-The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
-to specify a target platform name (architecture).
-
-For compatibility with CMake versions prior to 3.1, one may specify
-a target platform name optionally at the end of this generator name:
-
-``Visual Studio 12 2013 Win64``
-  Specify target platform ``x64``.
-
-``Visual Studio 12 2013 ARM``
-  Specify target platform ``ARM``.
-
 For compatibility with CMake versions prior to 3.0, one may specify this
 For compatibility with CMake versions prior to 3.0, one may specify this
 generator using the name "Visual Studio 12" without the year component.
 generator using the name "Visual Studio 12" without the year component.
 
 
@@ -24,6 +12,27 @@ Project Types
 Only Visual C++ and C# projects may be generated.  Other types of
 Only Visual C++ and C# projects may be generated.  Other types of
 projects (JavaScript, Powershell, Python, etc.) are not supported.
 projects (JavaScript, Powershell, Python, etc.) are not supported.
 
 
+Platform Selection
+^^^^^^^^^^^^^^^^^^
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
+via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
+name (architecture).  For example:
+
+* ``cmake -G "Visual Studio 12 2013" -A Win32``
+* ``cmake -G "Visual Studio 12 2013" -A x64``
+* ``cmake -G "Visual Studio 12 2013" -A ARM``
+
+For compatibility with CMake versions prior to 3.1, one may specify
+a target platform name optionally at the end of the generator name.
+This is supported only for:
+
+``Visual Studio 12 2013 Win64``
+  Specify target platform ``x64``.
+
+``Visual Studio 12 2013 ARM``
+  Specify target platform ``ARM``.
+
 Toolset Selection
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^
 
 

+ 18 - 9
Help/generator/Visual Studio 14 2015.rst

@@ -3,11 +3,26 @@ Visual Studio 14 2015
 
 
 Generates Visual Studio 14 (VS 2015) project files.
 Generates Visual Studio 14 (VS 2015) project files.
 
 
-The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
-to specify a target platform name (architecture).
+Project Types
+^^^^^^^^^^^^^
+
+Only Visual C++ and C# projects may be generated.  Other types of
+projects (JavaScript, Powershell, Python, etc.) are not supported.
+
+Platform Selection
+^^^^^^^^^^^^^^^^^^
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
+via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
+name (architecture).  For example:
+
+* ``cmake -G "Visual Studio 14 2015" -A Win32``
+* ``cmake -G "Visual Studio 14 2015" -A x64``
+* ``cmake -G "Visual Studio 14 2015" -A ARM``
 
 
 For compatibility with CMake versions prior to 3.1, one may specify
 For compatibility with CMake versions prior to 3.1, one may specify
-a target platform name optionally at the end of this generator name:
+a target platform name optionally at the end of the generator name.
+This is supported only for:
 
 
 ``Visual Studio 14 2015 Win64``
 ``Visual Studio 14 2015 Win64``
   Specify target platform ``x64``.
   Specify target platform ``x64``.
@@ -15,12 +30,6 @@ a target platform name optionally at the end of this generator name:
 ``Visual Studio 14 2015 ARM``
 ``Visual Studio 14 2015 ARM``
   Specify target platform ``ARM``.
   Specify target platform ``ARM``.
 
 
-Project Types
-^^^^^^^^^^^^^
-
-Only Visual C++ and C# projects may be generated.  Other types of
-projects (JavaScript, Powershell, Python, etc.) are not supported.
-
 Toolset Selection
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^
 
 

+ 22 - 12
Help/generator/Visual Studio 15 2017.rst

@@ -3,18 +3,6 @@ Visual Studio 15 2017
 
 
 Generates Visual Studio 15 (VS 2017) project files.
 Generates Visual Studio 15 (VS 2017) project files.
 
 
-The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
-to specify a target platform name (architecture).
-
-For compatibility with CMake versions prior to 3.1, one may specify
-a target platform name optionally at the end of this generator name:
-
-``Visual Studio 15 2017 Win64``
-  Specify target platform ``x64``.
-
-``Visual Studio 15 2017 ARM``
-  Specify target platform ``ARM``.
-
 Project Types
 Project Types
 ^^^^^^^^^^^^^
 ^^^^^^^^^^^^^
 
 
@@ -37,6 +25,28 @@ one of the instances, that instance will be used.  Otherwise, if more
 than one instance is installed we do not define which one is chosen
 than one instance is installed we do not define which one is chosen
 by default.
 by default.
 
 
+Platform Selection
+^^^^^^^^^^^^^^^^^^
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
+via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
+name (architecture).  For example:
+
+* ``cmake -G "Visual Studio 15 2017" -A Win32``
+* ``cmake -G "Visual Studio 15 2017" -A x64``
+* ``cmake -G "Visual Studio 15 2017" -A ARM``
+* ``cmake -G "Visual Studio 15 2017" -A ARM64``
+
+For compatibility with CMake versions prior to 3.1, one may specify
+a target platform name optionally at the end of the generator name.
+This is supported only for:
+
+``Visual Studio 15 2017 Win64``
+  Specify target platform ``x64``.
+
+``Visual Studio 15 2017 ARM``
+  Specify target platform ``ARM``.
+
 Toolset Selection
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^
 
 

+ 14 - 3
Help/generator/Visual Studio 9 2008.rst

@@ -3,11 +3,22 @@ Visual Studio 9 2008
 
 
 Generates Visual Studio 9 2008 project files.
 Generates Visual Studio 9 2008 project files.
 
 
-The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
-to specify a target platform name.
+Platform Selection
+^^^^^^^^^^^^^^^^^^
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
+via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
+name (architecture).  For example:
+
+* ``cmake -G "Visual Studio 9 2008" -A Win32``
+* ``cmake -G "Visual Studio 9 2008" -A x64``
+* ``cmake -G "Visual Studio 9 2008" -A Itanium``
+* ``cmake -G "Visual Studio 9 2008" -A <WinCE-SDK>``
+  (Specify a target platform matching a Windows CE SDK name.)
 
 
 For compatibility with CMake versions prior to 3.1, one may specify
 For compatibility with CMake versions prior to 3.1, one may specify
-a target platform name optionally at the end of this generator name:
+a target platform name optionally at the end of the generator name.
+This is supported only for:
 
 
 ``Visual Studio 9 2008 Win64``
 ``Visual Studio 9 2008 Win64``
   Specify target platform ``x64``.
   Specify target platform ``x64``.