1
0

cmake-configure-log.7.rst 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. .. cmake-manual-description: CMake Configure Log
  2. cmake-configure-log(7)
  3. **********************
  4. .. versionadded:: 3.26
  5. .. only:: html
  6. .. contents::
  7. Introduction
  8. ============
  9. CMake writes a running log, known as the *configure log*,
  10. of certain events that occur during the Configure step.
  11. The configure log does *not* contain a log of all output, errors,
  12. or messages printed while configuring a project. It is a log of
  13. detailed information about specific events, such as toolchain inspection
  14. by :command:`try_compile`, meant for use in debugging the configuration
  15. of a build tree.
  16. For human use, this version of CMake writes the configure log to the file:
  17. .. code-block:: cmake
  18. ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml
  19. However, the *location and name of the log file may change* in future
  20. versions of CMake. Tools that read the configure log should get its
  21. location using a :ref:`configureLog <file-api configureLog>` query to
  22. the :manual:`cmake-file-api(7)`.
  23. See the `Log Versioning`_ section below for details.
  24. Log Structure
  25. =============
  26. The configure log is designed to be both machine- and human-readable.
  27. The log file is a YAML document stream containing zero or more YAML
  28. documents separated by document markers. Each document begins
  29. with a ``---`` document marker line, contains a single YAML mapping
  30. that logs events from one CMake "configure" step, and, if the configure
  31. step finished normally, ends with a ``...`` document marker line:
  32. .. code-block:: yaml
  33. ---
  34. events:
  35. -
  36. kind: "try_compile-v1"
  37. # (other fields omitted)
  38. -
  39. kind: "try_compile-v1"
  40. # (other fields omitted)
  41. ...
  42. A new document is appended to the log every time CMake configures
  43. the build tree and logs new events.
  44. The keys of each document root mapping are:
  45. ``events``
  46. A YAML block sequence of nodes corresponding to events logged during
  47. one CMake "configure" step. Each event is a YAML node containing one
  48. of the `Event Kinds`_ documented below.
  49. Log Versioning
  50. --------------
  51. Each of the `Event Kinds`_ is versioned independently. The set of
  52. keys an event's log entry provides is specific to its major version.
  53. When an event is logged, the latest version of its event kind that is
  54. known to the running version of CMake is always written to the log.
  55. Tools reading the configure log must ignore event kinds and versions
  56. they do not understand:
  57. * A future version of CMake may introduce a new event kind or version.
  58. * If an existing build tree is re-configured with a different version of
  59. CMake, the log may contain different versions of the same event kind.
  60. * If :manual:`cmake-file-api(7)` queries request one or more
  61. :ref:`configureLog <file-api configureLog>` object versions,
  62. the log may contain multiple entries for the same event, each
  63. with a different version of its event kind.
  64. IDEs should write a :manual:`cmake-file-api(7)` query requesting a
  65. specific :ref:`configureLog <file-api configureLog>` object version,
  66. before running CMake, and then read the configure log only as described
  67. by the file-api reply.
  68. Text Block Encoding
  69. -------------------
  70. In order to make the log human-readable, text blocks are always
  71. represented using YAML literal block scalars (``|``).
  72. Since literal block scalars do not support escaping, backslashes
  73. and non-printable characters are encoded at the application layer:
  74. * ``\\`` encodes a backslash.
  75. * ``\xXX`` encodes a byte using two hexadecimal digits, ``XX``.
  76. .. _`configure-log event kinds`:
  77. Event Kinds
  78. ===========
  79. Every event kind is represented by a YAML mapping of the form:
  80. .. code-block:: yaml
  81. kind: "<kind>-v<major>"
  82. backtrace:
  83. - "<file>:<line> (<function>)"
  84. checks:
  85. - "Checking for something"
  86. #...event-specific keys...
  87. The keys common to all events are:
  88. ``kind``
  89. A string identifying the event kind and major version.
  90. ``backtrace``
  91. A YAML block sequence reporting the call stack of CMake source
  92. locations at which the event occurred, from most-recent to
  93. least-recent. Each node is a string specifying one location
  94. formatted as ``<file>:<line> (<function>)``.
  95. ``checks``
  96. An optional key that is present when the event occurred with
  97. at least one pending :command:`message(CHECK_START)`. Its value
  98. is a YAML block sequence reporting the stack of pending checks,
  99. from most-recent to least-recent. Each node is a string containing
  100. a pending check message.
  101. Additional mapping keys are specific to each (versioned) event kind,
  102. described below.
  103. .. _`message configure-log event`:
  104. Event Kind ``message``
  105. ----------------------
  106. The :command:`message(CONFIGURE_LOG)` command logs ``message`` events.
  107. There is only one ``message`` event major version, version 1.
  108. .. _`message-v1 event`:
  109. ``message-v1`` Event
  110. ^^^^^^^^^^^^^^^^^^^^
  111. A ``message-v1`` event is a YAML mapping:
  112. .. code-block:: yaml
  113. kind: "message-v1"
  114. backtrace:
  115. - "CMakeLists.txt:123 (message)"
  116. checks:
  117. - "Checking for something"
  118. message: |
  119. # ...
  120. The keys specific to ``message-v1`` mappings are:
  121. ``message``
  122. A YAML literal block scalar containing the message text,
  123. represented using our `Text Block Encoding`_.
  124. .. _`try_compile configure-log event`:
  125. Event Kind ``try_compile``
  126. --------------------------
  127. The :command:`try_compile` command logs ``try_compile`` events.
  128. There is only one ``try_compile`` event major version, version 1.
  129. .. _`try_compile-v1 event`:
  130. ``try_compile-v1`` Event
  131. ^^^^^^^^^^^^^^^^^^^^^^^^
  132. A ``try_compile-v1`` event is a YAML mapping:
  133. .. code-block:: yaml
  134. kind: "try_compile-v1"
  135. backtrace:
  136. - "CMakeLists.txt:123 (try_compile)"
  137. checks:
  138. - "Checking for something"
  139. description: "Explicit LOG_DESCRIPTION"
  140. directories:
  141. source: "/path/to/.../TryCompile-01234"
  142. binary: "/path/to/.../TryCompile-01234"
  143. cmakeVariables:
  144. SOME_VARIABLE: "Some Value"
  145. buildResult:
  146. variable: "COMPILE_RESULT"
  147. cached: true
  148. stdout: |
  149. # ...
  150. exitCode: 0
  151. The keys specific to ``try_compile-v1`` mappings are:
  152. ``description``
  153. An optional key that is present when the ``LOG_DESCRIPTION <text>`` option
  154. was used. Its value is a string containing the description ``<text>``.
  155. ``directories``
  156. A mapping describing the directories associated with the
  157. compilation attempt. It has the following keys:
  158. ``source``
  159. String specifying the source directory of the
  160. :command:`try_compile` project.
  161. ``binary``
  162. String specifying the binary directory of the
  163. :command:`try_compile` project.
  164. For non-project invocations, this is often the same as
  165. the source directory.
  166. ``cmakeVariables``
  167. An optional key that is present when CMake propagates variables
  168. into the test project, either automatically or due to the
  169. :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable.
  170. Its value is a mapping from variable names to their values.
  171. ``buildResult``
  172. A mapping describing the result of compiling the test code.
  173. It has the following keys:
  174. ``variable``
  175. A string specifying the name of the CMake variable
  176. storing the result of trying to build the test project.
  177. ``cached``
  178. A boolean indicating whether the above result ``variable``
  179. is stored in the CMake cache.
  180. ``stdout``
  181. A YAML literal block scalar containing the output from building
  182. the test project, represented using our `Text Block Encoding`_.
  183. This contains build output from both stdout and stderr.
  184. ``exitCode``
  185. An integer specifying the build tool exit code from trying
  186. to build the test project.
  187. .. _`try_run configure-log event`:
  188. Event Kind ``try_run``
  189. ----------------------
  190. The :command:`try_run` command logs ``try_run`` events.
  191. There is only one ``try_run`` event major version, version 1.
  192. .. _`try_run-v1 event`:
  193. ``try_run-v1`` Event
  194. ^^^^^^^^^^^^^^^^^^^^
  195. A ``try_run-v1`` event is a YAML mapping:
  196. .. code-block:: yaml
  197. kind: "try_run-v1"
  198. backtrace:
  199. - "CMakeLists.txt:456 (try_run)"
  200. checks:
  201. - "Checking for something"
  202. description: "Explicit LOG_DESCRIPTION"
  203. directories:
  204. source: "/path/to/.../TryCompile-56789"
  205. binary: "/path/to/.../TryCompile-56789"
  206. buildResult:
  207. variable: "COMPILE_RESULT"
  208. cached: true
  209. stdout: |
  210. # ...
  211. exitCode: 0
  212. runResult:
  213. variable: "RUN_RESULT"
  214. cached: true
  215. stdout: |
  216. # ...
  217. stderr: |
  218. # ...
  219. exitCode: 0
  220. The keys specific to ``try_run-v1`` mappings include those
  221. documented by the `try_compile-v1 event`_, plus:
  222. ``runResult``
  223. A mapping describing the result of running the test code.
  224. It has the following keys:
  225. ``variable``
  226. A string specifying the name of the CMake variable
  227. storing the result of trying to run the test executable.
  228. ``cached``
  229. A boolean indicating whether the above result ``variable``
  230. is stored in the CMake cache.
  231. ``stdout``
  232. An optional key that is present when the test project built successfully.
  233. Its value is a YAML literal block scalar containing output from running
  234. the test executable, represented using our `Text Block Encoding`_.
  235. If ``RUN_OUTPUT_VARIABLE`` was used, stdout and stderr are captured
  236. together, so this will contain both. Otherwise, this will contain
  237. only the stdout output.
  238. ``stderr``
  239. An optional key that is present when the test project built successfully
  240. and the ``RUN_OUTPUT_VARIABLE`` option was not used.
  241. Its value is a YAML literal block scalar containing output from running
  242. the test executable, represented using our `Text Block Encoding`_.
  243. If ``RUN_OUTPUT_VARIABLE`` was used, stdout and stderr are captured
  244. together in the ``stdout`` key, and this key will not be present.
  245. Otherwise, this will contain the stderr output.
  246. ``exitCode``
  247. An optional key that is present when the test project built successfully.
  248. Its value is an integer specifying the exit code, or a string containing
  249. an error message, from trying to run the test executable.
  250. .. _`find configure-log event`:
  251. Event Kind ``find``
  252. -------------------
  253. The :command:`find_file`, :command:`find_path`, :command:`find_library`, and
  254. :command:`find_program` commands log ``find`` events.
  255. There is only one ``find`` event major version, version 1.
  256. .. _`find-v1 event`:
  257. ``find-v1`` Event
  258. ^^^^^^^^^^^^^^^^^
  259. .. versionadded:: 4.1
  260. A ``find-v1`` event is a YAML mapping:
  261. .. code-block:: yaml
  262. kind: "find-v1"
  263. backtrace:
  264. - "CMakeLists.txt:456 (find_program)"
  265. mode: "program"
  266. variable: "PROGRAM_PATH"
  267. description: "Docstring for variable"
  268. settings:
  269. SearchFramework: "NEVER"
  270. SearchAppBundle: "NEVER"
  271. CMAKE_FIND_USE_CMAKE_PATH: true
  272. CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: true
  273. CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: true
  274. CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: true
  275. CMAKE_FIND_USE_INSTALL_PREFIX: true
  276. names:
  277. - "name1"
  278. - "name2"
  279. candidate_directories:
  280. - "/path/to/search"
  281. - "/other/path/to/search"
  282. - "/path/to/found"
  283. - "/further/path/to/search"
  284. searched_directories:
  285. - "/path/to/search"
  286. - "/other/path/to/search"
  287. found: "/path/to/found/program"
  288. The keys specific to ``find-v1`` mappings are:
  289. ``mode``
  290. A string describing the command using the search performed. One of ``file``,
  291. ``path``, ``program``, or ``library``.
  292. ``variable``
  293. The variable to which the search stored its result.
  294. ``description``
  295. The documentation string of the variable.
  296. ``settings``
  297. Search settings active for the search.
  298. ``SearchFramework``
  299. A string describing how framework search is performed. One of ``FIRST``,
  300. ``LAST``, ``ONLY``, or ``NEVER``. See :variable:`CMAKE_FIND_FRAMEWORK`.
  301. ``SearchAppBundle``
  302. A string describing how application bundle search is performed. One of
  303. ``FIRST``, ``LAST``, ``ONLY``, or ``NEVER``. See
  304. :variable:`CMAKE_FIND_APPBUNDLE`.
  305. ``CMAKE_FIND_USE_CMAKE_PATH``
  306. A boolean indicating whether or not CMake-specific cache variables are
  307. used when searching. See :variable:`CMAKE_FIND_USE_CMAKE_PATH`.
  308. ``CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH``
  309. A boolean indicating whether or not CMake-specific environment variables
  310. are used when searching. See
  311. :variable:`CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH`.
  312. ``CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH``
  313. A boolean indicating whether or not platform-specific environment
  314. variables are used when searching. See
  315. :variable:`CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`.
  316. ``CMAKE_FIND_USE_CMAKE_SYSTEM_PATH``
  317. A boolean indicating whether or not platform-specific CMake variables are
  318. used when searching. See :variable:`CMAKE_FIND_USE_CMAKE_SYSTEM_PATH`.
  319. ``CMAKE_FIND_USE_INSTALL_PREFIX``
  320. A boolean indicating whether or not the install prefix is used when
  321. searching. See :variable:`CMAKE_FIND_USE_INSTALL_PREFIX`.
  322. ``names``
  323. The names to look for the queries.
  324. ``candidate_directories``
  325. Candidate directories, in order, to look in during the search.
  326. ``searched_directories``
  327. Directories, in order, looked at during the search process.
  328. ``found``
  329. Either a string representing the found value or ``false`` if it was not
  330. found.
  331. ``search_context``
  332. A mapping of variable names to search paths specified by them (either a
  333. string or an array of strings depending on the variable). Environment
  334. variables are wrapped with ``ENV{`` and ``}``, otherwise CMake variables are
  335. used. Only variables with any paths specified are used.
  336. ``package_stack``
  337. An array of objects with paths which come from the stack of paths made
  338. available by :command:`find_package` calls.
  339. ``package_paths``
  340. The paths made available by :command:`find_package` commands in the call
  341. stack.
  342. .. _`find_package configure-log event`:
  343. Event Kind ``find_package``
  344. ---------------------------
  345. .. versionadded:: 4.1
  346. The :command:`find_package` command logs ``find_package`` events.
  347. There is only one ``find_package`` event major version, version 1.
  348. .. _`find_package-v1 event`:
  349. ``find_package-v1`` Event
  350. ^^^^^^^^^^^^^^^^^^^^^^^^^
  351. A ``find_package-v1`` event is a YAML mapping:
  352. .. code-block:: yaml
  353. kind: "find_package-v1"
  354. backtrace:
  355. - "CMakeLists.txt:456 (find_program)"
  356. name: "PackageName"
  357. components:
  358. -
  359. name: "Component"
  360. required: true
  361. found: true
  362. configs:
  363. -
  364. filename: PackageNameConfig.cmake
  365. kind: "cmake"
  366. -
  367. filename: packagename-config.cmake
  368. kind: "cmake"
  369. version_request:
  370. version: "1.0"
  371. version_complete: "1.0...1.5"
  372. min: "INCLUDE"
  373. max: "INCLUDE"
  374. exact: false
  375. settings:
  376. required: "optional"
  377. quiet: false
  378. global: false
  379. policy_scope: true
  380. bypass_provider: false
  381. hints:
  382. - "/hint/path"
  383. names:
  384. - "name1"
  385. - "name2"
  386. search_paths:
  387. - "/search/path"
  388. path_suffixes:
  389. - ""
  390. - "suffix"
  391. registry_view: "HOST"
  392. paths:
  393. CMAKE_FIND_USE_CMAKE_PATH: true
  394. CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: true
  395. CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: true
  396. CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: true
  397. CMAKE_FIND_USE_INSTALL_PREFIX: true
  398. CMAKE_FIND_USE_PACKAGE_ROOT_PATH: true
  399. CMAKE_FIND_USE_CMAKE_PACKAGE_REGISTRY: true
  400. CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY: true
  401. CMAKE_FIND_ROOT_PATH_MODE: "BOTH"
  402. candidates:
  403. -
  404. path: "/path/to/config/PackageName/PackageNameConfig.cmake"
  405. mode: "config"
  406. reason: "insufficient_version"
  407. -
  408. path: "/path/to/config/PackageName/packagename-config.cmake"
  409. mode: "config"
  410. reason: "no_exist"
  411. found:
  412. path: "/path/to/config/PackageName-2.5/PackageNameConfig.cmake"
  413. mode: "config"
  414. version: "2.5"
  415. The keys specific to ``find_package-v1`` mappings are:
  416. ``name``
  417. The name of the requested package.
  418. ``components``
  419. If present, an array of objects containing the fields:
  420. ``name``
  421. The name of the component.
  422. ``required``
  423. A boolean indicating whether the component is required or optional.
  424. ``found``
  425. A boolean indicating whether the component was found or not.
  426. ``configs``
  427. If present, an array of objects indicating the configuration files to search
  428. for.
  429. ``filename``
  430. The filename of the configuration file.
  431. ``kind``
  432. The kind of file. Either ``cmake`` or ``cps``.
  433. ``version_request``
  434. An object indicating the version constraints on the search.
  435. ``version``
  436. The minimum version required.
  437. ``version_complete``
  438. The user-provided version range.
  439. ``min``
  440. Whether to ``INCLUDE`` or ``EXCLUDE`` the lower bound on the version
  441. range.
  442. ``max``
  443. Whether to ``INCLUDE`` or ``EXCLUDE`` the upper bound on the version
  444. range.
  445. ``exact``
  446. A boolean indicating whether an ``EXACT`` version match was requested.
  447. ``settings``
  448. Search settings active for the search.
  449. ``required``
  450. The requirement request of the search. One of ``optional``,
  451. ``optional_explicit``, ``required_explicit``,
  452. ``required_from_package_variable``, or ``required_from_find_variable``.
  453. ``quiet``
  454. A boolean indicating whether the search is ``QUIET`` or not.
  455. ``global``
  456. A boolean indicating whether the ``GLOBAL`` keyword has been provided or
  457. not.
  458. ``policy_scope``
  459. A boolean indicating whether the ``NO_POLICY_SCOPE`` keyword has been
  460. provided or not.
  461. ``bypass_provider``
  462. A boolean indicating whether the ``BYPASS_PROVIDER`` keyword has been
  463. provided or not.
  464. ``hints``
  465. An array of paths provided as ``HINTS``.
  466. ``names``
  467. An array of package names to use when searching, provided by ``NAMES``.
  468. ``search_paths``
  469. An array of paths to search, provided by ``PATHS``.
  470. ``path_suffixes``
  471. An array of suffixes to use when searching, provided by ``PATH_SUFFIXES``.
  472. ``registry_view``
  473. The ``REGISTRY_VIEW`` requested for the search.
  474. ``paths``
  475. Path settings active for the search.
  476. ``CMAKE_FIND_USE_CMAKE_PATH``
  477. A boolean indicating whether or not CMake-specific cache variables are
  478. used when searching. See :variable:`CMAKE_FIND_USE_CMAKE_PATH`.
  479. ``CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH``
  480. A boolean indicating whether or not CMake-specific environment variables
  481. are used when searching. See
  482. :variable:`CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH`.
  483. ``CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH``
  484. A boolean indicating whether or not platform-specific environment
  485. variables are used when searching. See
  486. :variable:`CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`.
  487. ``CMAKE_FIND_USE_CMAKE_SYSTEM_PATH``
  488. A boolean indicating whether or not platform-specific CMake variables are
  489. used when searching. See :variable:`CMAKE_FIND_USE_CMAKE_SYSTEM_PATH`.
  490. ``CMAKE_FIND_USE_INSTALL_PREFIX``
  491. A boolean indicating whether or not the install prefix is used when
  492. searching. See :variable:`CMAKE_FIND_USE_INSTALL_PREFIX`.
  493. ``CMAKE_FIND_USE_CMAKE_PACKAGE_REGISTRY``
  494. A boolean indicating whether or not to search the CMake package registry
  495. for the package. See :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY`.
  496. ``CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY``
  497. A boolean indicating whether or not to search the system CMake package
  498. registry for the package. See
  499. :variable:`CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY`.
  500. ``CMAKE_FIND_ROOT_PATH_MODE``
  501. A string indicating the root path mode in effect as selected by the
  502. ``CMAKE_FIND_ROOT_PATH_BOTH``, ``ONLY_CMAKE_FIND_ROOT_PATH``, and
  503. ``NO_CMAKE_FIND_ROOT_PATH`` arguments.
  504. ``candidates``
  505. An array of rejected candidate paths. Each element contains the following
  506. keys:
  507. ``path``
  508. The path to the considered file. In the case of a dependency provider, the
  509. value is in the form of ``dependency_provider::<COMMAND_NAME>``.
  510. ``mode``
  511. The mode which found the file. One of ``module``, ``cps``, ``cmake``, or
  512. ``provider``.
  513. ``reason``
  514. The reason the path was rejected. One of ``insufficient_version``,
  515. ``no_exist``, ``ignored``, ``no_config_file``, or ``not_found``.
  516. ``message``
  517. If present, a string describing why the package is considered as not
  518. found.
  519. ``found``
  520. If the package has been found, information on the found file. If it is not
  521. found, this is ``null``. Keys available:
  522. ``path``
  523. The path to the module or configuration that found the package. In the
  524. case of a dependency provider, the value is in the form of
  525. ``dependency_provider::<COMMAND_NAME>``.
  526. ``mode``
  527. The mode that considered the path. One of ``module``, ``cps``, ``cmake``,
  528. or ``provider``.
  529. ``version``
  530. The reported version of the package.
  531. ``search_context``
  532. A mapping of variable names to search paths specified by them (either a
  533. string or an array of strings depending on the variable). Environment
  534. variables are wrapped with ``ENV{`` and ``}``, otherwise CMake variables are
  535. used. Only variables with any paths specified are used.
  536. ``package_stack``
  537. An array of objects with paths which come from the stack of paths made
  538. available by :command:`find_package` calls.
  539. ``package_paths``
  540. The paths made available by :command:`find_package` commands in the call
  541. stack.