CMAKE_GENERATOR_TOOLSET.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. CMAKE_GENERATOR_TOOLSET
  2. -----------------------
  3. Native build system toolset specification provided by user.
  4. Some CMake generators support a toolset specification to tell the
  5. native build system how to choose a compiler. If the user specifies
  6. a toolset (e.g. via the :manual:`cmake(1)` ``-T`` option) the value
  7. will be available in this variable.
  8. The value of this variable should never be modified by project code.
  9. A toolchain file specified by the :variable:`CMAKE_TOOLCHAIN_FILE`
  10. variable may initialize ``CMAKE_GENERATOR_TOOLSET``. Once a given
  11. build tree has been initialized with a particular value for this
  12. variable, changing the value has undefined behavior.
  13. Toolset specification is supported only on specific generators:
  14. * :ref:`Visual Studio Generators` for VS 2010 and above
  15. * The :generator:`Xcode` generator for Xcode 3.0 and above
  16. See native build system documentation for allowed toolset names.
  17. Visual Studio Toolset Selection
  18. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  19. The :ref:`Visual Studio Generators` support toolset specification
  20. using one of these forms:
  21. * ``toolset``
  22. * ``toolset[,key=value]*``
  23. * ``key=value[,key=value]*``
  24. The ``toolset`` specifies the toolset name. The selected toolset name
  25. is provided in the :variable:`CMAKE_VS_PLATFORM_TOOLSET` variable.
  26. The ``key=value`` pairs form a comma-separated list of options to
  27. specify generator-specific details of the toolset selection.
  28. Supported pairs are:
  29. ``cuda=<version>``
  30. Specify the CUDA toolkit version to use. Supported by VS 2010
  31. and above with the CUDA toolkit VS integration installed.
  32. See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_CUDA` variable.
  33. ``host=x64``
  34. Request use of the native ``x64`` toolchain on ``x64`` hosts.
  35. Supported by VS 2013 and above.
  36. See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE`
  37. variable.