diff options
author | Brad King <brad.king@kitware.com> | 2019-01-15 18:23:29 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-15 18:23:38 (GMT) |
commit | 41b0c0dc739c34550b8e9054b9a88405afb6518d (patch) | |
tree | e105225815d76cd1f996416bbafdeeb6f918dc23 /Help | |
parent | 67422bf579e5c274794f131f008bec4ec1e7d4b9 (diff) | |
parent | 57e48f16f2c3b73fb27057267c8092a41005bb75 (diff) | |
download | CMake-41b0c0dc739c34550b8e9054b9a88405afb6518d.zip CMake-41b0c0dc739c34550b8e9054b9a88405afb6518d.tar.gz CMake-41b0c0dc739c34550b8e9054b9a88405afb6518d.tar.bz2 |
Merge topic 'vs2019'
57e48f16f2 VS: Add Visual Studio 16 2019 generator
bdef729646 VS: Parameterize VS 2017 generator to support future versions
68d316e0cf VS: Rename VS 2017 generator sources to be version-independent
d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2789
Diffstat (limited to 'Help')
-rw-r--r-- | Help/generator/Visual Studio 16 2019.rst | 49 | ||||
-rw-r--r-- | Help/manual/cmake-generators.7.rst | 1 | ||||
-rw-r--r-- | Help/release/dev/vs2019.rst | 13 | ||||
-rw-r--r-- | Help/variable/MSVC_VERSION.rst | 1 |
4 files changed, 64 insertions, 0 deletions
diff --git a/Help/generator/Visual Studio 16 2019.rst b/Help/generator/Visual Studio 16 2019.rst new file mode 100644 index 0000000..6f2bc56 --- /dev/null +++ b/Help/generator/Visual Studio 16 2019.rst @@ -0,0 +1,49 @@ +Visual Studio 16 2019 +--------------------- + +Generates Visual Studio 16 (VS 2019) project files. + +Project Types +^^^^^^^^^^^^^ + +Only Visual C++ and C# projects may be generated. Other types of +projects (JavaScript, Powershell, Python, etc.) are not supported. + +Instance Selection +^^^^^^^^^^^^^^^^^^ + +VS 2019 supports multiple installations on the same machine. +The :variable:`CMAKE_GENERATOR_INSTANCE` variable may be set as a +cache entry containing the absolute path to a Visual Studio instance. +If the value is not specified explicitly by the user or a toolchain file, +CMake queries the Visual Studio Installer to locate VS instances, chooses +one, and sets the variable as a cache entry to hold the value persistently. + +When CMake first chooses an instance, if the ``VS160COMNTOOLS`` environment +variable is set and points to the ``Common7/Tools`` directory within +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 +by default. + +Platform Selection +^^^^^^^^^^^^^^^^^^ + +The default target platform name (architecture) is that of the host. + +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 16 2019" -A Win32`` +* ``cmake -G "Visual Studio 16 2019" -A x64`` +* ``cmake -G "Visual Studio 16 2019" -A ARM`` +* ``cmake -G "Visual Studio 16 2019" -A ARM64`` + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v142`` toolset that comes with Visual Studio 16 2019 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst index 1de10c4..41f7652 100644 --- a/Help/manual/cmake-generators.7.rst +++ b/Help/manual/cmake-generators.7.rst @@ -87,6 +87,7 @@ Visual Studio Generators /generator/Visual Studio 12 2013 /generator/Visual Studio 14 2015 /generator/Visual Studio 15 2017 + /generator/Visual Studio 16 2019 Other Generators ^^^^^^^^^^^^^^^^ diff --git a/Help/release/dev/vs2019.rst b/Help/release/dev/vs2019.rst new file mode 100644 index 0000000..1ffdeec --- /dev/null +++ b/Help/release/dev/vs2019.rst @@ -0,0 +1,13 @@ +vs2019 +------ + +* The :generator:`Visual Studio 16 2019` generator was added. This is + experimental and based on "Visual Studio 2019 Preview 1.1" because this + version of VS has not been released. + + The VS 2019 generator differs from generators for earlier versions + in that it does not provide variants that specify the target platform + in the generator name. Instead :variable:`CMAKE_GENERATOR_PLATFORM` + must be used, e.g. through the ``-A`` command-line option. Furthermore, + the default target platform (architecture) is now based on the *host* + platform. diff --git a/Help/variable/MSVC_VERSION.rst b/Help/variable/MSVC_VERSION.rst index 4ef43d8..45df37f 100644 --- a/Help/variable/MSVC_VERSION.rst +++ b/Help/variable/MSVC_VERSION.rst @@ -18,6 +18,7 @@ Known version numbers are:: 1800 = VS 12.0 (v120 toolset) 1900 = VS 14.0 (v140 toolset) 1910-1919 = VS 15.0 (v141 toolset) + 1920-1929 = VS 16.0 (v142 toolset) See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` and :variable:`MSVC_TOOLSET_VERSION` variable. |