Visual Studio 15 2017.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Visual Studio 15 2017
  2. ---------------------
  3. Generates Visual Studio 15 (VS 2017) project files.
  4. The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
  5. to specify a target platform name (architecture).
  6. For compatibility with CMake versions prior to 3.1, one may specify
  7. a target platform name optionally at the end of this generator name:
  8. ``Visual Studio 15 2017 Win64``
  9. Specify target platform ``x64``.
  10. ``Visual Studio 15 2017 ARM``
  11. Specify target platform ``ARM``.
  12. Project Types
  13. ^^^^^^^^^^^^^
  14. Only Visual C++ and C# projects may be generated. Other types of
  15. projects (JavaScript, Powershell, Python, etc.) are not supported.
  16. Instance Selection
  17. ^^^^^^^^^^^^^^^^^^
  18. VS 2017 supports multiple installations on the same machine.
  19. The :variable:`CMAKE_GENERATOR_INSTANCE` variable may be set as a
  20. cache entry containing the absolute path to a Visual Studio instance.
  21. If the value is not specified explicitly by the user or a toolchain file,
  22. CMake queries the Visual Studio Installer to locate VS instances, chooses
  23. one, and sets the variable as a cache entry to hold the value persistently.
  24. When CMake first chooses an instance, if the ``VS150COMNTOOLS`` environment
  25. variable is set and points to the ``Common7/Tools`` directory within
  26. one of the instances, that instance will be used. Otherwise, if more
  27. than one instance is installed we do not define which one is chosen
  28. by default.
  29. Toolset Selection
  30. ^^^^^^^^^^^^^^^^^
  31. The ``v141`` toolset that comes with Visual Studio 15 2017 is selected by
  32. default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  33. via the :manual:`cmake(1)` ``-T`` option, to specify another toolset.
  34. .. include:: VS_TOOLSET_HOST_ARCH.txt