Visual Studio 15 2017.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Visual Studio 15 2017
  2. ---------------------
  3. .. versionadded:: 3.7.1
  4. Generates Visual Studio 15 (VS 2017) project files.
  5. Project Types
  6. ^^^^^^^^^^^^^
  7. Only Visual C++ and C# projects may be generated (and Fortran with
  8. Intel compiler integration). Other types of projects (JavaScript,
  9. Powershell, Python, etc.) are not supported.
  10. Instance Selection
  11. ^^^^^^^^^^^^^^^^^^
  12. .. versionadded:: 3.11
  13. VS 2017 supports multiple installations on the same machine. The
  14. :variable:`CMAKE_GENERATOR_INSTANCE` variable may be used to select one.
  15. Platform Selection
  16. ^^^^^^^^^^^^^^^^^^
  17. The default target platform name (architecture) is ``Win32``.
  18. The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
  19. via the :option:`cmake -A` option, to specify a target platform
  20. name (architecture). For example:
  21. * ``cmake -G "Visual Studio 15 2017" -A Win32``
  22. * ``cmake -G "Visual Studio 15 2017" -A x64``
  23. * ``cmake -G "Visual Studio 15 2017" -A ARM``
  24. * ``cmake -G "Visual Studio 15 2017" -A ARM64``
  25. .. versionchanged:: 4.0
  26. Previously, for compatibility with CMake versions prior to 3.1,
  27. one could specify a target platform name optionally at the
  28. end of the generator name. This has been removed.
  29. This was supported only for:
  30. ``Visual Studio 15 2017 Win64``
  31. Specify target platform ``x64``.
  32. ``Visual Studio 15 2017 ARM``
  33. Specify target platform ``ARM``.
  34. Toolset Selection
  35. ^^^^^^^^^^^^^^^^^
  36. The ``v141`` toolset that comes with Visual Studio 15 2017 is selected by
  37. default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  38. via the :option:`cmake -T` option, to specify another toolset.
  39. .. |VS_TOOLSET_HOST_ARCH_DEFAULT| replace::
  40. By default this generator uses the 32-bit variant even on a 64-bit host.
  41. .. include:: include/VS_TOOLSET_HOST_ARCH_LEGACY.rst