CMAKE_PROJECT_TOP_LEVEL_INCLUDES.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. CMAKE_PROJECT_TOP_LEVEL_INCLUDES
  2. --------------------------------
  3. .. versionadded:: 3.24
  4. :ref:`Semicolon-separated list <CMake Language Lists>` of CMake language
  5. files to include as part of the very first :command:`project` call.
  6. The files will be included immediately after the toolchain file has been read
  7. (if one is specified) and platform variables have been set, but before any
  8. languages have been enabled. Therefore, language-specific variables,
  9. including things like :variable:`CMAKE_<LANG>_COMPILER`, might not be set.
  10. See :ref:`Code Injection` for a more detailed discussion of files potentially
  11. included during a :command:`project` call.
  12. .. versionadded:: 3.29
  13. This variable can also now refer to module names to be found in
  14. :variable:`CMAKE_MODULE_PATH` or builtin to CMake.
  15. This variable is intended for specifying files that perform one-time setup
  16. for the build. It provides an injection point for things like configuring
  17. package managers, adding logic the user shares between projects (e.g. defining
  18. their own custom build types), and so on. It is primarily for users to add
  19. things specific to their environment, but not for specifying the toolchain
  20. details (use :variable:`CMAKE_TOOLCHAIN_FILE` for that).
  21. By default, this variable is empty. It is intended to be set by the user.
  22. See also:
  23. * :variable:`CMAKE_PROJECT_INCLUDE`
  24. * :variable:`CMAKE_PROJECT_INCLUDE_BEFORE`
  25. * :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`
  26. * :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE`
  27. * :prop_gbl:`PROPAGATE_TOP_LEVEL_INCLUDES_TO_TRY_COMPILE`