Visual Studio 15 2017.rst 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. Instance Selection
  13. ^^^^^^^^^^^^^^^^^^
  14. VS 2017 supports multiple installations on the same machine.
  15. The :variable:`CMAKE_GENERATOR_INSTANCE` variable may be set as a
  16. cache entry containing the absolute path to a Visual Studio instance.
  17. If the value is not specified explicitly by the user or a toolchain file,
  18. CMake queries the Visual Studio Installer to locate VS instances, chooses
  19. one, and sets the variable as a cache entry to hold the value persistently.
  20. When CMake first chooses an instance, if the ``VS150COMNTOOLS`` environment
  21. variable is set and points to the ``Common7/Tools`` directory within
  22. one of the instances, that instance will be used. Otherwise, if more
  23. than one instance is installed we do not define which one is chosen
  24. by default.
  25. Toolset Selection
  26. ^^^^^^^^^^^^^^^^^
  27. The ``v141`` toolset that comes with Visual Studio 15 2017 is selected by
  28. default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  29. via the :manual:`cmake(1)` ``-T`` option, to specify another toolset.
  30. .. include:: VS_TOOLSET_HOST_ARCH.txt