Xcode.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Xcode
  2. -----
  3. Generate Xcode project files.
  4. .. versionchanged:: 3.15
  5. This generator supports Xcode 5.0 and above.
  6. .. _`Xcode Build System Selection`:
  7. Toolset and Build System Selection
  8. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  9. By default Xcode is allowed to select its own default toolchain.
  10. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  11. via the :option:`cmake -T` option, to specify another toolset.
  12. .. versionadded:: 3.19
  13. This generator supports toolset specification using one of these forms:
  14. * ``toolset``
  15. * ``toolset[,key=value]*``
  16. * ``key=value[,key=value]*``
  17. The ``toolset`` specifies the toolset name. The selected toolset name
  18. is provided in the :variable:`CMAKE_XCODE_PLATFORM_TOOLSET` variable.
  19. The ``key=value`` pairs form a comma-separated list of options to
  20. specify generator-specific details of the toolset selection.
  21. Supported pairs are:
  22. ``buildsystem=<variant>``
  23. Specify the buildsystem variant to use.
  24. See the :variable:`CMAKE_XCODE_BUILD_SYSTEM` variable for allowed values.
  25. For example, to select the original build system under Xcode 12,
  26. run :manual:`cmake(1)` with the option ``-T buildsystem=1``.
  27. Swift Support
  28. ^^^^^^^^^^^^^
  29. .. versionadded:: 3.4
  30. When using the :generator:`Xcode` generator with Xcode 6.1 or higher,
  31. one may enable the ``Swift`` language with the :command:`enable_language`
  32. command or the :command:`project`.