Visual Studio 15 2017.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. For compatibility with CMake versions prior to 3.1, one may specify
  26. a target platform name optionally at the end of the generator name.
  27. This is supported only for:
  28. ``Visual Studio 15 2017 Win64``
  29. Specify target platform ``x64``.
  30. ``Visual Studio 15 2017 ARM``
  31. Specify target platform ``ARM``.
  32. Toolset Selection
  33. ^^^^^^^^^^^^^^^^^
  34. The ``v141`` toolset that comes with Visual Studio 15 2017 is selected by
  35. default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  36. via the :option:`cmake -T` option, to specify another toolset.
  37. .. |VS_TOOLSET_HOST_ARCH_DEFAULT| replace::
  38. By default this generator uses the 32-bit variant even on a 64-bit host.
  39. .. include:: VS_TOOLSET_HOST_ARCH_LEGACY.txt