experimental.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. CMake Experimental Features Guide
  2. *********************************
  3. The following is a guide to CMake experimental features that are
  4. under development and not yet included in official documentation.
  5. See documentation on `CMake Development`_ for more information.
  6. .. _`CMake Development`: README.rst
  7. Features are gated behind ``CMAKE_EXPERIMENTAL_`` variables which must be set
  8. to specific values in order to enable their gated behaviors. Note that the
  9. specific values will change over time to reinforce their experimental nature.
  10. When used, a warning will be generated to indicate that an experimental
  11. feature is in use and that the affected behavior in the project is not part of
  12. CMake's stability guarantees.
  13. Export Package Dependencies
  14. ===========================
  15. In order to activate support for this experimental feature, set
  16. * variable ``CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_DEPENDENCIES`` to
  17. * value ``1942b4fa-b2c5-4546-9385-83f254070067``.
  18. This UUID may change in future versions of CMake. Be sure to use the value
  19. documented here by the source tree of the version of CMake with which you are
  20. experimenting.
  21. When activated, this experimental feature provides the following:
  22. * The ``install(EXPORT)`` and ``export(EXPORT)`` commands have experimental
  23. ``EXPORT_PACKAGE_DEPENDENCIES`` arguments to generate ``find_dependency``
  24. calls automatically.
  25. * Details of the calls may be configured using the ``export(SETUP)``
  26. command's ``PACKAGE_DEPENDENCY`` argument.
  27. * The package name associated with specific targets may be specified
  28. using the ``CMAKE_EXPORT_FIND_PACKAGE_NAME`` variable and/or
  29. ``EXPORT_FIND_PACKAGE_NAME`` target property.
  30. Export |CPS| Package Information
  31. ================================
  32. In order to activate support for this experimental feature, set
  33. * variable ``CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_INFO`` to
  34. * value ``b80be207-778e-46ba-8080-b23bba22639e``.
  35. This UUID may change in future versions of CMake. Be sure to use the value
  36. documented here by the source tree of the version of CMake with which you are
  37. experimenting.
  38. When activated, this experimental feature provides the following:
  39. * The experimental ``install(PACKAGE_INFO)`` command is available to export
  40. package information in the |CPS|_ format.
  41. C++ ``import std`` support
  42. ==========================
  43. In order to activate support for ``import std`` in C++23 and newer targets,
  44. set
  45. * variable ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` to
  46. * value ``0e5b6991-d74f-4b3d-a41c-cf096e0b2508``.
  47. This UUID may change in future versions of CMake. Be sure to use the value
  48. documented here by the source tree of the version of CMake with which you are
  49. experimenting. It must be set before the ``CXX`` toolchain is discovered by
  50. CMake, usually as part of a :command:`project` call.
  51. When activated, this experimental feature provides the following:
  52. * The :prop_tgt:`CXX_MODULE_STD` target property and its initializing variable
  53. :variable:`CMAKE_CXX_MODULE_STD`.
  54. * Targets with the property set to a true value and at least ``cxx_std_23``
  55. may use ``import std;`` in any scanned C++ source file.
  56. .. _CPS: https://cps-org.github.io/cps/
  57. .. |CPS| replace:: Common Package Specification