cmake-file-api.7.rst 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924
  1. .. cmake-manual-description: CMake File-Based API
  2. cmake-file-api(7)
  3. *****************
  4. .. only:: html
  5. .. contents::
  6. Introduction
  7. ============
  8. CMake provides a file-based API that clients may use to get semantic
  9. information about the buildsystems CMake generates. Clients may use
  10. the API by writing query files to a specific location in a build tree
  11. to request zero or more `Object Kinds`_. When CMake generates the
  12. buildsystem in that build tree it will read the query files and write
  13. reply files for the client to read.
  14. The file-based API uses a ``<build>/.cmake/api/`` directory at the top
  15. of a build tree. The API is versioned to support changes to the layout
  16. of files within the API directory. API file layout versioning is
  17. orthogonal to the versioning of `Object Kinds`_ used in replies.
  18. This version of CMake supports only one API version, `API v1`_.
  19. .. versionadded:: 3.27
  20. Projects may also submit queries for the current run using the
  21. :command:`cmake_file_api` command.
  22. .. _`file-api v1`:
  23. API v1
  24. ======
  25. API v1 is housed in the ``<build>/.cmake/api/v1/`` directory.
  26. It has the following subdirectories:
  27. ``query/``
  28. Holds query files written by clients.
  29. These may be `v1 Shared Stateless Query Files`_,
  30. `v1 Client Stateless Query Files`_, or `v1 Client Stateful Query Files`_.
  31. ``reply/``
  32. Holds reply files written by CMake when it runs to generate a build system.
  33. Clients may read reply files only when referenced by a reply index:
  34. ``index-*.json``
  35. A `v1 Reply Index File`_ written when CMake generates a build system.
  36. ``error-*.json``
  37. .. versionadded:: 4.1
  38. A `v1 Reply Error Index`_ written when CMake fails to generate a build
  39. system due to an error.
  40. Clients may look for and read a reply index at any time.
  41. Clients may optionally create the ``reply/`` directory at any time
  42. and monitor it for the appearance of a new reply index.
  43. CMake owns all reply files. Clients must never remove them.
  44. .. versionadded:: 3.31
  45. Users can add query files to ``api/v1/query`` inside the
  46. :envvar:`CMAKE_CONFIG_DIR` to create user-wide queries for all CMake projects.
  47. v1 Shared Stateless Query Files
  48. -------------------------------
  49. Shared stateless query files allow clients to share requests for
  50. major versions of the `Object Kinds`_ and get all requested versions
  51. recognized by the CMake that runs.
  52. Clients may create shared requests by creating empty files in the
  53. ``v1/query/`` directory. The form is::
  54. <build>/.cmake/api/v1/query/<kind>-v<major>
  55. where ``<kind>`` is one of the `Object Kinds`_, ``-v`` is literal,
  56. and ``<major>`` is the major version number.
  57. Files of this form are stateless shared queries not owned by any specific
  58. client. Once created they should not be removed without external client
  59. coordination or human intervention.
  60. v1 Client Stateless Query Files
  61. -------------------------------
  62. Client stateless query files allow clients to create owned requests for
  63. major versions of the `Object Kinds`_ and get all requested versions
  64. recognized by the CMake that runs.
  65. Clients may create owned requests by creating empty files in
  66. client-specific query subdirectories. The form is::
  67. <build>/.cmake/api/v1/query/client-<client>/<kind>-v<major>
  68. where ``client-`` is literal, ``<client>`` is a string uniquely
  69. identifying the client, ``<kind>`` is one of the `Object Kinds`_,
  70. ``-v`` is literal, and ``<major>`` is the major version number.
  71. Each client must choose a unique ``<client>`` identifier via its
  72. own means.
  73. Files of this form are stateless queries owned by the client ``<client>``.
  74. The owning client may remove them at any time.
  75. v1 Client Stateful Query Files
  76. ------------------------------
  77. Stateful query files allow clients to request a list of versions of
  78. each of the `Object Kinds`_ and get only the most recent version
  79. recognized by the CMake that runs.
  80. Clients may create owned stateful queries by creating ``query.json``
  81. files in client-specific query subdirectories. The form is::
  82. <build>/.cmake/api/v1/query/client-<client>/query.json
  83. where ``client-`` is literal, ``<client>`` is a string uniquely
  84. identifying the client, and ``query.json`` is literal. Each client
  85. must choose a unique ``<client>`` identifier via its own means.
  86. ``query.json`` files are stateful queries owned by the client ``<client>``.
  87. The owning client may update or remove them at any time. When a
  88. given client installation is updated it may then update the stateful
  89. query it writes to build trees to request newer object versions.
  90. This can be used to avoid asking CMake to generate multiple object
  91. versions unnecessarily.
  92. .. versionadded:: 4.1
  93. The ``query.json`` file is described in machine-readable form by
  94. :download:`this JSON schema </manual/file_api/schema_stateful_query.json>`.
  95. A ``query.json`` file must contain a JSON object:
  96. .. code-block:: json
  97. {
  98. "requests": [
  99. { "kind": "<kind>" , "version": 1 },
  100. { "kind": "<kind>" , "version": { "major": 1, "minor": 2 } },
  101. { "kind": "<kind>" , "version": [2, 1] },
  102. { "kind": "<kind>" , "version": [2, { "major": 1, "minor": 2 }] },
  103. { "kind": "<kind>" , "version": 1, "client": {} },
  104. { "kind": "..." }
  105. ],
  106. "client": {}
  107. }
  108. The members are:
  109. ``requests``
  110. A JSON array containing zero or more requests. Each request is
  111. a JSON object with members:
  112. ``kind``
  113. Specifies one of the `Object Kinds`_ to be included in the reply.
  114. ``version``
  115. Indicates the version(s) of the object kind that the client
  116. understands. Versions have major and minor components following
  117. semantic version conventions. The value must be
  118. * a JSON integer specifying a (non-negative) major version number, or
  119. * a JSON object containing ``major`` and (optionally) ``minor``
  120. members specifying non-negative integer version components, or
  121. * a JSON array whose elements are each one of the above.
  122. ``client``
  123. Optional member reserved for use by the client. This value is
  124. preserved in the reply written for the client in the
  125. `v1 Reply Index File`_ but is otherwise ignored. Clients may use
  126. this to pass custom information with a request through to its reply.
  127. For each requested object kind CMake will choose the *first* version
  128. that it recognizes for that kind among those listed in the request.
  129. The response will use the selected *major* version with the highest
  130. *minor* version known to the running CMake for that major version.
  131. Therefore clients should list all supported major versions in
  132. preferred order along with the minimal minor version required
  133. for each major version.
  134. ``client``
  135. Optional member reserved for use by the client. This value is
  136. preserved in the reply written for the client in the
  137. `v1 Reply Index File`_ but is otherwise ignored. Clients may use
  138. this to pass custom information with a query through to its reply.
  139. Other ``query.json`` top-level members are reserved for future use.
  140. If present they are ignored for forward compatibility.
  141. v1 Reply Index File
  142. -------------------
  143. CMake writes an ``index-*.json`` file to the ``v1/reply/`` directory
  144. when it successfully generates a build system. Clients must read the
  145. reply index file first and may read other `v1 Reply Files`_ only by
  146. following references. The form of the reply index file name is::
  147. <build>/.cmake/api/v1/reply/index-<unspecified>.json
  148. where ``index-`` is literal and ``<unspecified>`` is an unspecified
  149. name selected by CMake. Whenever a new index file is generated it
  150. is given a new name and any old one is deleted. During the short
  151. time between these steps there may be multiple index files present;
  152. the one with the largest name in lexicographic order is the current
  153. index file.
  154. .. versionadded:: 4.1
  155. The reply index file is described in machine-readable form by
  156. :download:`this JSON schema </manual/file_api/schema_index.json>`.
  157. The reply index file contains a JSON object:
  158. .. code-block:: json
  159. {
  160. "cmake": {
  161. "version": {
  162. "major": 3, "minor": 14, "patch": 0, "suffix": "",
  163. "string": "3.14.0", "isDirty": false
  164. },
  165. "paths": {
  166. "cmake": "/prefix/bin/cmake",
  167. "ctest": "/prefix/bin/ctest",
  168. "cpack": "/prefix/bin/cpack",
  169. "root": "/prefix/share/cmake-3.14"
  170. },
  171. "generator": {
  172. "multiConfig": false,
  173. "name": "Unix Makefiles"
  174. }
  175. },
  176. "objects": [
  177. { "kind": "<kind>",
  178. "version": { "major": 1, "minor": 0 },
  179. "jsonFile": "<file>" },
  180. { "...": "..." }
  181. ],
  182. "reply": {
  183. "<kind>-v<major>": { "kind": "<kind>",
  184. "version": { "major": 1, "minor": 0 },
  185. "jsonFile": "<file>" },
  186. "<unknown>": { "error": "unknown query file" },
  187. "...": {},
  188. "client-<client>": {
  189. "<kind>-v<major>": { "kind": "<kind>",
  190. "version": { "major": 1, "minor": 0 },
  191. "jsonFile": "<file>" },
  192. "<unknown>": { "error": "unknown query file" },
  193. "...": {},
  194. "query.json": {
  195. "requests": [ {}, {}, {} ],
  196. "responses": [
  197. { "kind": "<kind>",
  198. "version": { "major": 1, "minor": 0 },
  199. "jsonFile": "<file>" },
  200. { "error": "unknown query file" },
  201. { "...": {} }
  202. ],
  203. "client": {}
  204. }
  205. }
  206. }
  207. }
  208. The members are:
  209. ``cmake``
  210. A JSON object containing information about the instance of CMake that
  211. generated the reply. It contains members:
  212. ``version``
  213. A JSON object specifying the version of CMake with members:
  214. ``major``, ``minor``, ``patch``
  215. Integer values specifying the major, minor, and patch version components.
  216. ``suffix``
  217. A string specifying the version suffix, if any, e.g. ``g0abc3``.
  218. ``string``
  219. A string specifying the full version in the format
  220. ``<major>.<minor>.<patch>[-<suffix>]``.
  221. ``isDirty``
  222. A boolean indicating whether the version was built from a version
  223. controlled source tree with local modifications.
  224. ``paths``
  225. A JSON object specifying paths to things that come with CMake.
  226. It has members for :program:`cmake`, :program:`ctest`, and :program:`cpack`
  227. whose values are JSON strings specifying the absolute path to each tool,
  228. represented with forward slashes. It also has a ``root`` member for
  229. the absolute path to the directory containing CMake resources like the
  230. ``Modules/`` directory (see :variable:`CMAKE_ROOT`).
  231. ``generator``
  232. A JSON object describing the CMake generator used for the build.
  233. It has members:
  234. ``multiConfig``
  235. A boolean specifying whether the generator supports multiple output
  236. configurations.
  237. ``name``
  238. A string specifying the name of the generator.
  239. ``platform``
  240. If the generator supports :variable:`CMAKE_GENERATOR_PLATFORM`,
  241. this is a string specifying the generator platform name.
  242. ``objects``
  243. A JSON array listing all versions of all `Object Kinds`_ generated
  244. as part of the reply. Each array entry is a
  245. `v1 Reply File Reference`_.
  246. ``reply``
  247. A JSON object mirroring the content of the ``query/`` directory
  248. that CMake loaded to produce the reply. The members are of the form
  249. ``<kind>-v<major>``
  250. A member of this form appears for each of the
  251. `v1 Shared Stateless Query Files`_ that CMake recognized as a
  252. request for object kind ``<kind>`` with major version ``<major>``.
  253. The value is
  254. * a `v1 Reply File Reference`_ to the corresponding reply file for
  255. that object kind and version, or
  256. * in a `v1 Reply Error Index`_, a JSON object with a single ``error``
  257. member containing a string with an error message.
  258. ``<unknown>``
  259. A member of this form appears for each of the
  260. `v1 Shared Stateless Query Files`_ that CMake did not recognize.
  261. The value is a JSON object with a single ``error`` member
  262. containing a string with an error message indicating that the
  263. query file is unknown.
  264. ``client-<client>``
  265. A member of this form appears for each client-owned directory
  266. holding `v1 Client Stateless Query Files`_.
  267. The value is a JSON object mirroring the content of the
  268. ``query/client-<client>/`` directory. The members are of the form:
  269. ``<kind>-v<major>``
  270. A member of this form appears for each of the
  271. `v1 Client Stateless Query Files`_ that CMake recognized as a
  272. request for object kind ``<kind>`` with major version ``<major>``.
  273. The value is
  274. * a `v1 Reply File Reference`_ to the corresponding reply file for
  275. that object kind and version, or
  276. * in a `v1 Reply Error Index`_, a JSON object with a single ``error``
  277. member containing a string with an error message.
  278. ``<unknown>``
  279. A member of this form appears for each of the
  280. `v1 Client Stateless Query Files`_ that CMake did not recognize.
  281. The value is a JSON object with a single ``error`` member
  282. containing a string with an error message indicating that the
  283. query file is unknown.
  284. ``query.json``
  285. This member appears for clients using
  286. `v1 Client Stateful Query Files`_.
  287. If the ``query.json`` file failed to read or parse as a JSON object,
  288. this member is a JSON object with a single ``error`` member
  289. containing a string with an error message. Otherwise, this member
  290. is a JSON object mirroring the content of the ``query.json`` file.
  291. The members are:
  292. ``client``
  293. A copy of the ``query.json`` file ``client`` member, if it exists.
  294. ``requests``
  295. A copy of the ``query.json`` file ``requests`` member, if it exists.
  296. ``responses``
  297. If the ``query.json`` file ``requests`` member is missing or invalid,
  298. this member is a JSON object with a single ``error`` member
  299. containing a string with an error message. Otherwise, this member
  300. contains a JSON array with a response for each entry of the
  301. ``requests`` array, in the same order. Each response is
  302. * a `v1 Reply File Reference`_ to the corresponding reply file for
  303. the requested object kind and selected version, or
  304. * a JSON object with a single ``error`` member containing a string
  305. with an error message.
  306. After reading the reply index file, clients may read the other
  307. `v1 Reply Files`_ it references.
  308. v1 Reply File Reference
  309. ^^^^^^^^^^^^^^^^^^^^^^^
  310. The reply index file represents each reference to another reply file
  311. using a JSON object with members:
  312. ``kind``
  313. A string specifying one of the `Object Kinds`_.
  314. ``version``
  315. A JSON object with members ``major`` and ``minor`` specifying
  316. integer version components of the object kind.
  317. ``jsonFile``
  318. A JSON string specifying a path relative to the reply index file
  319. to another JSON file containing the object.
  320. .. _`file-api reply error index`:
  321. v1 Reply Error Index
  322. ^^^^^^^^^^^^^^^^^^^^
  323. .. versionadded:: 4.1
  324. CMake writes an ``error-*.json`` file to the ``v1/reply/`` directory
  325. when it fails to generate a build system. This reply error index
  326. follows the same naming pattern, syntax, and semantics of a
  327. `v1 Reply Index File`_, with the following exceptions:
  328. * The ``index-`` prefix is replaced by an ``error-`` prefix.
  329. * When a new error index is generated, old index files are *not*
  330. deleted. If a `v1 Reply Index File`_ exists, it indexes replies
  331. from the most recent successful run. If multiple ``index-*.json``
  332. and/or ``error-*.json`` files are present, the one with the largest
  333. name in lexicographic order, excluding the ``index-`` or ``error-``
  334. prefix, is the current index.
  335. * Only a subset of `Object Kinds`_ are provided:
  336. `configureLog <file-api configureLog_>`_
  337. .. versionadded:: 4.1
  338. Index entries for other object kinds contain an ``error`` message
  339. instead of a `v1 Reply File Reference`_.
  340. v1 Reply Files
  341. --------------
  342. Reply files containing specific `Object Kinds`_ are written by CMake.
  343. The names of these files are unspecified and must not be interpreted
  344. by clients. Clients must first read the `v1 Reply Index File`_ and
  345. follow references to the names of the desired response objects.
  346. Reply files (including the index file) will never be replaced by
  347. files of the same name but different content. This allows a client
  348. to read the files concurrently with a running CMake that may generate
  349. a new reply. However, after generating a new reply CMake will attempt
  350. to remove reply files from previous runs that it did not just write.
  351. If a client attempts to read a reply file referenced by the index but
  352. finds the file missing, that means a concurrent CMake has generated
  353. a new reply. The client may simply start again by reading the new
  354. reply index file.
  355. .. _`file-api object kinds`:
  356. Object Kinds
  357. ============
  358. The CMake file-based API reports semantic information about the build
  359. system using the following kinds of JSON objects. Each kind of object
  360. is versioned independently using semantic versioning with major and
  361. minor components. Every kind of object has the form:
  362. .. code-block:: json
  363. {
  364. "kind": "<kind>",
  365. "version": { "major": 1, "minor": 0 },
  366. "...": {}
  367. }
  368. The ``kind`` member is a string specifying the object kind name.
  369. The ``version`` member is a JSON object with ``major`` and ``minor``
  370. members specifying integer components of the object kind's version.
  371. Additional top-level members are specific to each object kind.
  372. Object Kind "codemodel"
  373. -----------------------
  374. The ``codemodel`` object kind describes the build system structure as
  375. modeled by CMake.
  376. There is only one ``codemodel`` object major version, version 2.
  377. Version 1 does not exist to avoid confusion with that from
  378. :manual:`cmake-server(7)` mode.
  379. .. versionadded:: 4.1
  380. The ``codemodel`` object kind reply is described in machine-readable form
  381. by :download:`this JSON schema </manual/file_api/schema_codemodel.json>`.
  382. "codemodel" version 2
  383. ^^^^^^^^^^^^^^^^^^^^^
  384. ``codemodel`` object version 2 is a JSON object:
  385. .. code-block:: json
  386. {
  387. "kind": "codemodel",
  388. "version": { "major": 2, "minor": 8 },
  389. "paths": {
  390. "source": "/path/to/top-level-source-dir",
  391. "build": "/path/to/top-level-build-dir"
  392. },
  393. "configurations": [
  394. {
  395. "name": "Debug",
  396. "directories": [
  397. {
  398. "source": ".",
  399. "build": ".",
  400. "childIndexes": [ 1 ],
  401. "projectIndex": 0,
  402. "targetIndexes": [ 0 ],
  403. "hasInstallRule": true,
  404. "minimumCMakeVersion": {
  405. "string": "3.14"
  406. },
  407. "jsonFile": "<file>"
  408. },
  409. {
  410. "source": "sub",
  411. "build": "sub",
  412. "parentIndex": 0,
  413. "projectIndex": 0,
  414. "targetIndexes": [ 1 ],
  415. "minimumCMakeVersion": {
  416. "string": "3.14"
  417. },
  418. "jsonFile": "<file>"
  419. }
  420. ],
  421. "projects": [
  422. {
  423. "name": "MyProject",
  424. "directoryIndexes": [ 0, 1 ],
  425. "targetIndexes": [ 0, 1 ]
  426. }
  427. ],
  428. "targets": [
  429. {
  430. "name": "MyExecutable",
  431. "directoryIndex": 0,
  432. "projectIndex": 0,
  433. "jsonFile": "<file>"
  434. },
  435. {
  436. "name": "MyLibrary",
  437. "directoryIndex": 1,
  438. "projectIndex": 0,
  439. "jsonFile": "<file>"
  440. }
  441. ]
  442. }
  443. ]
  444. }
  445. The members specific to ``codemodel`` objects are:
  446. ``paths``
  447. A JSON object containing members:
  448. ``source``
  449. A string specifying the absolute path to the top-level source directory,
  450. represented with forward slashes.
  451. ``build``
  452. A string specifying the absolute path to the top-level build directory,
  453. represented with forward slashes.
  454. ``configurations``
  455. A JSON array of entries corresponding to available build configurations.
  456. On single-configuration generators there is one entry for the value
  457. of the :variable:`CMAKE_BUILD_TYPE` variable. For multi-configuration
  458. generators there is an entry for each configuration listed in the
  459. :variable:`CMAKE_CONFIGURATION_TYPES` variable.
  460. Each entry is a JSON object containing members:
  461. ``name``
  462. A string specifying the name of the configuration, e.g. ``Debug``.
  463. ``directories``
  464. A JSON array of entries each corresponding to a build system directory
  465. whose source directory contains a ``CMakeLists.txt`` file. The first
  466. entry corresponds to the top-level directory. Each entry is a
  467. JSON object containing members:
  468. ``source``
  469. A string specifying the path to the source directory, represented
  470. with forward slashes. If the directory is inside the top-level
  471. source directory then the path is specified relative to that
  472. directory (with ``.`` for the top-level source directory itself).
  473. Otherwise the path is absolute.
  474. ``build``
  475. A string specifying the path to the build directory, represented
  476. with forward slashes. If the directory is inside the top-level
  477. build directory then the path is specified relative to that
  478. directory (with ``.`` for the top-level build directory itself).
  479. Otherwise the path is absolute.
  480. ``parentIndex``
  481. Optional member that is present when the directory is not top-level.
  482. The value is an unsigned integer 0-based index of another entry in
  483. the main ``directories`` array that corresponds to the parent
  484. directory that added this directory as a subdirectory.
  485. ``childIndexes``
  486. Optional member that is present when the directory has subdirectories.
  487. The value is a JSON array of entries corresponding to child directories
  488. created by the :command:`add_subdirectory` or :command:`subdirs`
  489. command. Each entry is an unsigned integer 0-based index of another
  490. entry in the main ``directories`` array.
  491. ``projectIndex``
  492. An unsigned integer 0-based index into the main ``projects`` array
  493. indicating the build system project to which the this directory belongs.
  494. ``targetIndexes``
  495. Optional member that is present when the directory itself has targets,
  496. excluding those belonging to subdirectories. The value is a JSON
  497. array of entries corresponding to the targets. Each entry is an
  498. unsigned integer 0-based index into the main ``targets`` array.
  499. ``minimumCMakeVersion``
  500. Optional member present when a minimum required version of CMake is
  501. known for the directory. This is the ``<min>`` version given to the
  502. most local call to the :command:`cmake_minimum_required(VERSION)`
  503. command in the directory itself or one of its ancestors.
  504. The value is a JSON object with one member:
  505. ``string``
  506. A string specifying the minimum required version in the format::
  507. <major>.<minor>[.<patch>[.<tweak>]][<suffix>]
  508. Each component is an unsigned integer and the suffix may be an
  509. arbitrary string.
  510. ``hasInstallRule``
  511. Optional member that is present with boolean value ``true`` when
  512. the directory or one of its subdirectories contains any
  513. :command:`install` rules, i.e. whether a ``make install``
  514. or equivalent rule is available.
  515. ``jsonFile``
  516. A JSON string specifying a path relative to the codemodel file
  517. to another JSON file containing a
  518. `"codemodel" version 2 "directory" object`_.
  519. This field was added in codemodel version 2.3.
  520. ``projects``
  521. A JSON array of entries corresponding to the top-level project
  522. and sub-projects defined in the build system. Each (sub-)project
  523. corresponds to a source directory whose ``CMakeLists.txt`` file
  524. calls the :command:`project` command with a project name different
  525. from its parent directory. The first entry corresponds to the
  526. top-level project.
  527. Each entry is a JSON object containing members:
  528. ``name``
  529. A string specifying the name given to the :command:`project` command.
  530. ``parentIndex``
  531. Optional member that is present when the project is not top-level.
  532. The value is an unsigned integer 0-based index of another entry in
  533. the main ``projects`` array that corresponds to the parent project
  534. that added this project as a sub-project.
  535. ``childIndexes``
  536. Optional member that is present when the project has sub-projects.
  537. The value is a JSON array of entries corresponding to the sub-projects.
  538. Each entry is an unsigned integer 0-based index of another
  539. entry in the main ``projects`` array.
  540. ``directoryIndexes``
  541. A JSON array of entries corresponding to build system directories
  542. that are part of the project. The first entry corresponds to the
  543. top-level directory of the project. Each entry is an unsigned
  544. integer 0-based index into the main ``directories`` array.
  545. ``targetIndexes``
  546. Optional member that is present when the project itself has targets,
  547. excluding those belonging to sub-projects. The value is a JSON
  548. array of entries corresponding to the targets. Each entry is an
  549. unsigned integer 0-based index into the main ``targets`` array.
  550. ``targets``
  551. A JSON array of entries corresponding to the build system targets.
  552. Such targets are created by calls to :command:`add_executable`,
  553. :command:`add_library`, and :command:`add_custom_target`, excluding
  554. imported targets and interface libraries (which do not generate any
  555. build rules). Each entry is a JSON object containing members:
  556. ``name``
  557. A string specifying the target name.
  558. ``id``
  559. A string uniquely identifying the target. This matches the ``id``
  560. field in the file referenced by ``jsonFile``.
  561. ``directoryIndex``
  562. An unsigned integer 0-based index into the main ``directories`` array
  563. indicating the build system directory in which the target is defined.
  564. ``projectIndex``
  565. An unsigned integer 0-based index into the main ``projects`` array
  566. indicating the build system project in which the target is defined.
  567. ``jsonFile``
  568. A JSON string specifying a path relative to the codemodel file
  569. to another JSON file containing a
  570. `"codemodel" version 2 "target" object`_.
  571. "codemodel" version 2 "directory" object
  572. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  573. .. versionadded:: 4.1
  574. The ``directory`` object reply is described in machine-readable form by
  575. :download:`this JSON schema </manual/file_api/schema_directory.json>`.
  576. A codemodel "directory" object is referenced by a `"codemodel" version 2`_
  577. object's ``directories`` array. Each "directory" object is a JSON object
  578. with members:
  579. ``codemodelVersion``
  580. This specifies the codemodel version this file is part of. It will match
  581. the ``version`` field of the codemodel object kind that references this file.
  582. It is a JSON object with the following members:
  583. ``major``
  584. The codemodel major version.
  585. ``minor``
  586. The codemodel minor version.
  587. This field was added in codemodel version 2.9.
  588. ``paths``
  589. A JSON object containing members:
  590. ``source``
  591. A string specifying the path to the source directory, represented
  592. with forward slashes. If the directory is inside the top-level
  593. source directory then the path is specified relative to that
  594. directory (with ``.`` for the top-level source directory itself).
  595. Otherwise the path is absolute.
  596. ``build``
  597. A string specifying the path to the build directory, represented
  598. with forward slashes. If the directory is inside the top-level
  599. build directory then the path is specified relative to that
  600. directory (with ``.`` for the top-level build directory itself).
  601. Otherwise the path is absolute.
  602. ``installers``
  603. A JSON array of entries corresponding to :command:`install` rules.
  604. Each entry is a JSON object containing members:
  605. ``component``
  606. A string specifying the component selected by the corresponding
  607. :command:`install` command invocation.
  608. ``destination``
  609. Optional member that is present for specific ``type`` values below.
  610. The value is a string specifying the install destination path.
  611. The path may be absolute or relative to the install prefix.
  612. ``paths``
  613. Optional member that is present for specific ``type`` values below.
  614. The value is a JSON array of entries corresponding to the paths
  615. (files or directories) to be installed. Each entry is one of:
  616. * A string specifying the path from which a file or directory
  617. is to be installed. The portion of the path not preceded by
  618. a ``/`` also specifies the path (name) to which the file
  619. or directory is to be installed under the destination.
  620. * A JSON object with members:
  621. ``from``
  622. A string specifying the path from which a file or directory
  623. is to be installed.
  624. ``to``
  625. A string specifying the path to which the file or directory
  626. is to be installed under the destination.
  627. In both cases the paths are represented with forward slashes. If
  628. the "from" path is inside the top-level directory documented by the
  629. corresponding ``type`` value, then the path is specified relative
  630. to that directory. Otherwise the path is absolute.
  631. ``type``
  632. A string specifying the type of installation rule. The value is one
  633. of the following, with some variants providing additional members:
  634. ``file``
  635. An :command:`install(FILES)` or :command:`install(PROGRAMS)` call.
  636. The ``destination`` and ``paths`` members are populated, with paths
  637. under the top-level *source* directory expressed relative to it.
  638. The ``isOptional`` member may exist.
  639. This type has no additional members.
  640. ``directory``
  641. An :command:`install(DIRECTORY)` call.
  642. The ``destination`` and ``paths`` members are populated, with paths
  643. under the top-level *source* directory expressed relative to it.
  644. The ``isOptional`` member may exist.
  645. This type has no additional members.
  646. ``target``
  647. An :command:`install(TARGETS)` call.
  648. The ``destination`` and ``paths`` members are populated, with paths
  649. under the top-level *build* directory expressed relative to it.
  650. The ``isOptional`` member may exist.
  651. This type has additional members ``targetId``, ``targetIndex``,
  652. ``targetIsImportLibrary``, and ``targetInstallNamelink``.
  653. ``export``
  654. An :command:`install(EXPORT)` call.
  655. The ``destination`` and ``paths`` members are populated, with paths
  656. under the top-level *build* directory expressed relative to it.
  657. The ``paths`` entries refer to files generated automatically by
  658. CMake for installation, and their actual values are considered
  659. private implementation details.
  660. This type has additional members ``exportName`` and ``exportTargets``.
  661. ``script``
  662. An :command:`install(SCRIPT)` call.
  663. This type has additional member ``scriptFile``.
  664. ``code``
  665. An :command:`install(CODE)` call.
  666. This type has no additional members.
  667. ``importedRuntimeArtifacts``
  668. An :command:`install(IMPORTED_RUNTIME_ARTIFACTS)` call.
  669. The ``destination`` member is populated. The ``isOptional`` member may
  670. exist. This type has no additional members.
  671. ``runtimeDependencySet``
  672. An :command:`install(RUNTIME_DEPENDENCY_SET)` call or an
  673. :command:`install(TARGETS)` call with ``RUNTIME_DEPENDENCIES``. The
  674. ``destination`` member is populated. This type has additional members
  675. ``runtimeDependencySetName`` and ``runtimeDependencySetType``.
  676. ``fileSet``
  677. An :command:`install(TARGETS)` call with ``FILE_SET``.
  678. The ``destination`` and ``paths`` members are populated.
  679. The ``isOptional`` member may exist.
  680. This type has additional members ``fileSetName``, ``fileSetType``,
  681. ``fileSetDirectories``, and ``fileSetTarget``.
  682. This type was added in codemodel version 2.4.
  683. ``cxxModuleBmi``
  684. An :command:`install(TARGETS)` call with ``CXX_MODULES_BMI``.
  685. The ``destination`` member is populated and the ``isOptional`` member
  686. may exist. This type has an additional ``cxxModuleBmiTarget`` member.
  687. This type was added in codemodel version 2.5.
  688. ``isExcludeFromAll``
  689. Optional member that is present with boolean value ``true`` when
  690. :command:`install` is called with the ``EXCLUDE_FROM_ALL`` option.
  691. ``isForAllComponents``
  692. Optional member that is present with boolean value ``true`` when
  693. :command:`install(SCRIPT|CODE)` is called with the
  694. ``ALL_COMPONENTS`` option.
  695. ``isOptional``
  696. Optional member that is present with boolean value ``true`` when
  697. :command:`install` is called with the ``OPTIONAL`` option.
  698. This is allowed when ``type`` is ``file``, ``directory``, or ``target``.
  699. ``targetId``
  700. Optional member that is present when ``type`` is ``target``.
  701. The value is a string uniquely identifying the target to be installed.
  702. This matches the ``id`` member of the target in the main
  703. "codemodel" object's ``targets`` array.
  704. ``targetIndex``
  705. Optional member that is present when ``type`` is ``target``.
  706. The value is an unsigned integer 0-based index into the main "codemodel"
  707. object's ``targets`` array for the target to be installed.
  708. ``targetIsImportLibrary``
  709. Optional member that is present when ``type`` is ``target`` and
  710. the installer is for a Windows DLL import library file or for an
  711. AIX linker import file. If present, it has boolean value ``true``.
  712. ``targetInstallNamelink``
  713. Optional member that is present when ``type`` is ``target`` and
  714. the installer corresponds to a target that may use symbolic links
  715. to implement the :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION`
  716. target properties.
  717. The value is a string indicating how the installer is supposed to
  718. handle the symlinks: ``skip`` means the installer should skip the
  719. symlinks and install only the real file, and ``only`` means the
  720. installer should install only the symlinks and not the real file.
  721. In all cases the ``paths`` member lists what it actually installs.
  722. ``exportName``
  723. Optional member that is present when ``type`` is ``export``.
  724. The value is a string specifying the name of the export.
  725. ``exportTargets``
  726. Optional member that is present when ``type`` is ``export``.
  727. The value is a JSON array of entries corresponding to the targets
  728. included in the export. Each entry is a JSON object with members:
  729. ``id``
  730. A string uniquely identifying the target. This matches
  731. the ``id`` member of the target in the main "codemodel"
  732. object's ``targets`` array.
  733. ``index``
  734. An unsigned integer 0-based index into the main "codemodel"
  735. object's ``targets`` array for the target.
  736. ``runtimeDependencySetName``
  737. Optional member that is present when ``type`` is ``runtimeDependencySet``
  738. and the installer was created by an
  739. :command:`install(RUNTIME_DEPENDENCY_SET)` call. The value is a string
  740. specifying the name of the runtime dependency set that was installed.
  741. ``runtimeDependencySetType``
  742. Optional member that is present when ``type`` is ``runtimeDependencySet``.
  743. The value is a string with one of the following values:
  744. ``library``
  745. Indicates that this installer installs dependencies that are not macOS
  746. frameworks.
  747. ``framework``
  748. Indicates that this installer installs dependencies that are macOS
  749. frameworks.
  750. ``fileSetName``
  751. Optional member that is present when ``type`` is ``fileSet``. The value is
  752. a string with the name of the file set.
  753. This field was added in codemodel version 2.4.
  754. ``fileSetType``
  755. Optional member that is present when ``type`` is ``fileSet``. The value is
  756. a string with the type of the file set.
  757. This field was added in codemodel version 2.4.
  758. ``fileSetDirectories``
  759. Optional member that is present when ``type`` is ``fileSet``. The value
  760. is a list of strings with the file set's base directories (determined by
  761. genex-evaluation of :prop_tgt:`HEADER_DIRS` or
  762. :prop_tgt:`HEADER_DIRS_<NAME>`).
  763. This field was added in codemodel version 2.4.
  764. ``fileSetTarget``
  765. Optional member that is present when ``type`` is ``fileSet``. The value
  766. is a JSON object with members:
  767. ``id``
  768. A string uniquely identifying the target. This matches
  769. the ``id`` member of the target in the main "codemodel"
  770. object's ``targets`` array.
  771. ``index``
  772. An unsigned integer 0-based index into the main "codemodel"
  773. object's ``targets`` array for the target.
  774. This field was added in codemodel version 2.4.
  775. ``cxxModuleBmiTarget``
  776. Optional member that is present when ``type`` is ``cxxModuleBmi``.
  777. The value is a JSON object with members:
  778. ``id``
  779. A string uniquely identifying the target. This matches
  780. the ``id`` member of the target in the main "codemodel"
  781. object's ``targets`` array.
  782. ``index``
  783. An unsigned integer 0-based index into the main "codemodel"
  784. object's ``targets`` array for the target.
  785. This field was added in codemodel version 2.5.
  786. ``scriptFile``
  787. Optional member that is present when ``type`` is ``script``.
  788. The value is a string specifying the path to the script file on disk,
  789. represented with forward slashes. If the file is inside the top-level
  790. source directory then the path is specified relative to that directory.
  791. Otherwise the path is absolute.
  792. ``backtrace``
  793. Optional member that is present when a CMake language backtrace to
  794. the :command:`install` or other command invocation that added this
  795. installer is available. The value is an unsigned integer 0-based
  796. index into the ``backtraceGraph`` member's ``nodes`` array.
  797. ``backtraceGraph``
  798. A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
  799. from ``backtrace`` members elsewhere in this "directory" object.
  800. "codemodel" version 2 "target" object
  801. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  802. .. versionadded:: 4.1
  803. The ``target`` object reply is described in machine-readable form by
  804. :download:`this JSON schema </manual/file_api/schema_target.json>`.
  805. A codemodel "target" object is referenced by a `"codemodel" version 2`_
  806. object's ``targets`` array. Each "target" object is a JSON object
  807. with members:
  808. ``codemodelVersion``
  809. This specifies the codemodel version this file is part of. It will match
  810. the ``version`` field of the codemodel object kind that references this file.
  811. It is a JSON object with the following members:
  812. ``major``
  813. The codemodel major version.
  814. ``minor``
  815. The codemodel minor version.
  816. This field was added in codemodel version 2.9.
  817. ``name``
  818. A string specifying the logical name of the target.
  819. ``id``
  820. A string uniquely identifying the target. The format is unspecified
  821. and should not be interpreted by clients.
  822. ``type``
  823. A string specifying the type of the target. The value is one of
  824. ``EXECUTABLE``, ``STATIC_LIBRARY``, ``SHARED_LIBRARY``,
  825. ``MODULE_LIBRARY``, ``OBJECT_LIBRARY``, ``INTERFACE_LIBRARY``,
  826. or ``UTILITY``.
  827. ``backtrace``
  828. Optional member that is present when a CMake language backtrace to
  829. the command in the source code that created the target is available.
  830. The value is an unsigned integer 0-based index into the
  831. ``backtraceGraph`` member's ``nodes`` array.
  832. ``folder``
  833. Optional member that is present when the :prop_tgt:`FOLDER` target
  834. property is set. The value is a JSON object with one member:
  835. ``name``
  836. A string specifying the name of the target folder.
  837. ``paths``
  838. A JSON object containing members:
  839. ``source``
  840. A string specifying the path to the target's source directory,
  841. represented with forward slashes. If the directory is inside the
  842. top-level source directory then the path is specified relative to
  843. that directory (with ``.`` for the top-level source directory itself).
  844. Otherwise the path is absolute.
  845. ``build``
  846. A string specifying the path to the target's build directory,
  847. represented with forward slashes. If the directory is inside the
  848. top-level build directory then the path is specified relative to
  849. that directory (with ``.`` for the top-level build directory itself).
  850. Otherwise the path is absolute.
  851. ``nameOnDisk``
  852. Optional member that is present for executable and library targets
  853. that are linked or archived into a single primary artifact.
  854. The value is a string specifying the file name of that artifact on disk.
  855. ``artifacts``
  856. Optional member that is present for executable and library targets
  857. that produce artifacts on disk meant for consumption by dependents.
  858. The value is a JSON array of entries corresponding to the artifacts.
  859. Each entry is a JSON object containing one member:
  860. ``path``
  861. A string specifying the path to the file on disk, represented with
  862. forward slashes. If the file is inside the top-level build directory
  863. then the path is specified relative to that directory.
  864. Otherwise the path is absolute.
  865. ``isGeneratorProvided``
  866. Optional member that is present with boolean value ``true`` if the
  867. target is provided by CMake's build system generator rather than by
  868. a command in the source code.
  869. ``install``
  870. Optional member that is present when the target has an :command:`install`
  871. rule. The value is a JSON object with members:
  872. ``prefix``
  873. A JSON object specifying the installation prefix. It has one member:
  874. ``path``
  875. A string specifying the value of :variable:`CMAKE_INSTALL_PREFIX`.
  876. ``destinations``
  877. A JSON array of entries specifying an install destination path.
  878. Each entry is a JSON object with members:
  879. ``path``
  880. A string specifying the install destination path. The path may
  881. be absolute or relative to the install prefix.
  882. ``backtrace``
  883. Optional member that is present when a CMake language backtrace to
  884. the :command:`install` command invocation that specified this
  885. destination is available. The value is an unsigned integer 0-based
  886. index into the ``backtraceGraph`` member's ``nodes`` array.
  887. ``launchers``
  888. Optional member that is present on executable targets that have
  889. at least one launcher specified by the project. The value is a
  890. JSON array of entries corresponding to the specified launchers.
  891. Each entry is a JSON object with members:
  892. ``command``
  893. A string specifying the path to the launcher on disk, represented
  894. with forward slashes. If the file is inside the top-level source
  895. directory then the path is specified relative to that directory.
  896. ``arguments``
  897. Optional member that is present when the launcher command has
  898. arguments preceding the executable to be launched. The value
  899. is a JSON array of strings representing the arguments.
  900. ``type``
  901. A string specifying the type of launcher. The value is one of
  902. the following:
  903. ``emulator``
  904. An emulator for the target platform when cross-compiling.
  905. See the :prop_tgt:`CROSSCOMPILING_EMULATOR` target property.
  906. ``test``
  907. A start program for the execution of tests.
  908. See the :prop_tgt:`TEST_LAUNCHER` target property.
  909. This field was added in codemodel version 2.7.
  910. ``link``
  911. Optional member that is present for executables and shared library
  912. targets that link into a runtime binary. The value is a JSON object
  913. with members describing the link step:
  914. ``language``
  915. A string specifying the language (e.g. ``C``, ``CXX``, ``Fortran``)
  916. of the toolchain is used to invoke the linker.
  917. ``commandFragments``
  918. Optional member that is present when fragments of the link command
  919. line invocation are available. The value is a JSON array of entries
  920. specifying ordered fragments. Each entry is a JSON object with members:
  921. ``fragment``
  922. A string specifying a fragment of the link command line invocation.
  923. The value is encoded in the build system's native shell format.
  924. ``role``
  925. A string specifying the role of the fragment's content:
  926. * ``flags``: link flags.
  927. * ``libraries``: link library file paths or flags.
  928. * ``libraryPath``: library search path flags.
  929. * ``frameworkPath``: macOS framework search path flags.
  930. ``backtrace``
  931. Optional member that is present when a CMake language backtrace to
  932. the :command:`target_link_libraries`, :command:`target_link_options`,
  933. or other command invocation that added this link fragment is available.
  934. The value is an unsigned integer 0-based index into the ``backtraceGraph``
  935. member's ``nodes`` array.
  936. ``lto``
  937. Optional member that is present with boolean value ``true``
  938. when link-time optimization (a.k.a. interprocedural optimization
  939. or link-time code generation) is enabled.
  940. ``sysroot``
  941. Optional member that is present when the :variable:`CMAKE_SYSROOT_LINK`
  942. or :variable:`CMAKE_SYSROOT` variable is defined. The value is a
  943. JSON object with one member:
  944. ``path``
  945. A string specifying the absolute path to the sysroot, represented
  946. with forward slashes.
  947. ``archive``
  948. Optional member that is present for static library targets. The value
  949. is a JSON object with members describing the archive step:
  950. ``commandFragments``
  951. Optional member that is present when fragments of the archiver command
  952. line invocation are available. The value is a JSON array of entries
  953. specifying the fragments. Each entry is a JSON object with members:
  954. ``fragment``
  955. A string specifying a fragment of the archiver command line invocation.
  956. The value is encoded in the build system's native shell format.
  957. ``role``
  958. A string specifying the role of the fragment's content:
  959. * ``flags``: archiver flags.
  960. ``lto``
  961. Optional member that is present with boolean value ``true``
  962. when link-time optimization (a.k.a. interprocedural optimization
  963. or link-time code generation) is enabled.
  964. ``debugger``
  965. Optional member that is present when the target has one of the
  966. following fields set.
  967. The value is a JSON object of entries corresponding to
  968. debugger specific values set.
  969. This field was added in codemodel version 2.8.
  970. ``workingDirectory``
  971. Optional member that is present when the
  972. :prop_tgt:`DEBUGGER_WORKING_DIRECTORY` target property is set.
  973. The member will also be present in :ref:`Visual Studio Generators`
  974. when :prop_tgt:`VS_DEBUGGER_WORKING_DIRECTORY` is set.
  975. This field was added in codemodel version 2.8.
  976. ``dependencies``
  977. Optional member that is present when the target depends on other targets.
  978. The value is a JSON array of entries corresponding to the dependencies.
  979. Each entry is a JSON object with members:
  980. ``id``
  981. A string uniquely identifying the target on which this target depends.
  982. This matches the main ``id`` member of the other target.
  983. ``backtrace``
  984. Optional member that is present when a CMake language backtrace to
  985. the :command:`add_dependencies`, :command:`target_link_libraries`,
  986. or other command invocation that created this dependency is
  987. available. The value is an unsigned integer 0-based index into
  988. the ``backtraceGraph`` member's ``nodes`` array.
  989. ``fileSets``
  990. An optional member that is present when a target defines one or more
  991. file sets. The value is a JSON array of entries corresponding to the
  992. target's file sets. Each entry is a JSON object with members:
  993. ``name``
  994. A string specifying the name of the file set.
  995. ``type``
  996. A string specifying the type of the file set. See
  997. :command:`target_sources` supported file set types.
  998. ``visibility``
  999. A string specifying the visibility of the file set; one of ``PUBLIC``,
  1000. ``PRIVATE``, or ``INTERFACE``.
  1001. ``baseDirectories``
  1002. A JSON array of strings, each specifying a base directory containing
  1003. sources in the file set. If the directory is inside the top-level source
  1004. directory then the path is specified relative to that directory.
  1005. Otherwise the path is absolute.
  1006. This field was added in codemodel version 2.5.
  1007. ``sources``
  1008. A JSON array of entries corresponding to the target's source files.
  1009. Each entry is a JSON object with members:
  1010. ``path``
  1011. A string specifying the path to the source file on disk, represented
  1012. with forward slashes. If the file is inside the top-level source
  1013. directory then the path is specified relative to that directory.
  1014. Otherwise the path is absolute.
  1015. ``compileGroupIndex``
  1016. Optional member that is present when the source is compiled.
  1017. The value is an unsigned integer 0-based index into the
  1018. ``compileGroups`` array.
  1019. ``sourceGroupIndex``
  1020. Optional member that is present when the source is part of a source
  1021. group either via the :command:`source_group` command or by default.
  1022. The value is an unsigned integer 0-based index into the
  1023. ``sourceGroups`` array.
  1024. ``isGenerated``
  1025. Optional member that is present with boolean value ``true`` if
  1026. the source is :prop_sf:`GENERATED`.
  1027. ``fileSetIndex``
  1028. Optional member that is present when the source is part of a file set.
  1029. The value is an unsigned integer 0-based index into the ``fileSets``
  1030. array.
  1031. This field was added in codemodel version 2.5.
  1032. ``backtrace``
  1033. Optional member that is present when a CMake language backtrace to
  1034. the :command:`target_sources`, :command:`add_executable`,
  1035. :command:`add_library`, :command:`add_custom_target`, or other
  1036. command invocation that added this source to the target is
  1037. available. The value is an unsigned integer 0-based index into
  1038. the ``backtraceGraph`` member's ``nodes`` array.
  1039. ``sourceGroups``
  1040. Optional member that is present when sources are grouped together by
  1041. the :command:`source_group` command or by default. The value is a
  1042. JSON array of entries corresponding to the groups. Each entry is
  1043. a JSON object with members:
  1044. ``name``
  1045. A string specifying the name of the source group.
  1046. ``sourceIndexes``
  1047. A JSON array listing the sources belonging to the group.
  1048. Each entry is an unsigned integer 0-based index into the
  1049. main ``sources`` array for the target.
  1050. ``compileGroups``
  1051. Optional member that is present when the target has sources that compile.
  1052. The value is a JSON array of entries corresponding to groups of sources
  1053. that all compile with the same settings. Each entry is a JSON object
  1054. with members:
  1055. ``sourceIndexes``
  1056. A JSON array listing the sources belonging to the group.
  1057. Each entry is an unsigned integer 0-based index into the
  1058. main ``sources`` array for the target.
  1059. ``language``
  1060. A string specifying the language (e.g. ``C``, ``CXX``, ``Fortran``)
  1061. of the toolchain is used to compile the source file.
  1062. ``languageStandard``
  1063. Optional member that is present when the language standard is set
  1064. explicitly (e.g. via :prop_tgt:`CXX_STANDARD`) or implicitly by
  1065. compile features. Each entry is a JSON object with two members:
  1066. ``backtraces``
  1067. Optional member that is present when a CMake language backtrace to
  1068. the ``<LANG>_STANDARD`` setting is available. If the language
  1069. standard was set implicitly by compile features those are used as
  1070. the backtrace(s). It's possible for multiple compile features to
  1071. require the same language standard so there could be multiple
  1072. backtraces. The value is a JSON array with each entry being an
  1073. unsigned integer 0-based index into the ``backtraceGraph``
  1074. member's ``nodes`` array.
  1075. ``standard``
  1076. String representing the language standard.
  1077. This field was added in codemodel version 2.2.
  1078. ``compileCommandFragments``
  1079. Optional member that is present when fragments of the compiler command
  1080. line invocation are available. The value is a JSON array of entries
  1081. specifying ordered fragments. Each entry is a JSON object with
  1082. one member:
  1083. ``fragment``
  1084. A string specifying a fragment of the compile command line invocation.
  1085. The value is encoded in the build system's native shell format.
  1086. ``backtrace``
  1087. Optional member that is present when a CMake language backtrace to
  1088. the command invocation that added this fragment is available.
  1089. The value is an unsigned integer 0-based index into the
  1090. ``backtraceGraph`` member's ``nodes`` array.
  1091. ``includes``
  1092. Optional member that is present when there are include directories.
  1093. The value is a JSON array with an entry for each directory. Each
  1094. entry is a JSON object with members:
  1095. ``path``
  1096. A string specifying the path to the include directory,
  1097. represented with forward slashes.
  1098. ``isSystem``
  1099. Optional member that is present with boolean value ``true`` if
  1100. the include directory is marked as a system include directory.
  1101. ``backtrace``
  1102. Optional member that is present when a CMake language backtrace to
  1103. the :command:`target_include_directories` or other command invocation
  1104. that added this include directory is available. The value is
  1105. an unsigned integer 0-based index into the ``backtraceGraph``
  1106. member's ``nodes`` array.
  1107. ``frameworks``
  1108. Optional member that is present when, on Apple platforms, there are
  1109. frameworks. The value is a JSON array with an entry for each directory.
  1110. Each entry is a JSON object with members:
  1111. ``path``
  1112. A string specifying the path to the framework directory,
  1113. represented with forward slashes.
  1114. ``isSystem``
  1115. Optional member that is present with boolean value ``true`` if
  1116. the framework is marked as a system one.
  1117. ``backtrace``
  1118. Optional member that is present when a CMake language backtrace to
  1119. the :command:`target_link_libraries` or other command invocation
  1120. that added this framework is available. The value is
  1121. an unsigned integer 0-based index into the ``backtraceGraph``
  1122. member's ``nodes`` array.
  1123. This field was added in codemodel version 2.6.
  1124. ``precompileHeaders``
  1125. Optional member that is present when :command:`target_precompile_headers`
  1126. or other command invocations set :prop_tgt:`PRECOMPILE_HEADERS` on the
  1127. target. The value is a JSON array with an entry for each header. Each
  1128. entry is a JSON object with members:
  1129. ``header``
  1130. Full path to the precompile header file.
  1131. ``backtrace``
  1132. Optional member that is present when a CMake language backtrace to
  1133. the :command:`target_precompile_headers` or other command invocation
  1134. that added this precompiled header is available. The value is an
  1135. unsigned integer 0-based index into the ``backtraceGraph`` member's
  1136. ``nodes`` array.
  1137. This field was added in codemodel version 2.1.
  1138. ``defines``
  1139. Optional member that is present when there are preprocessor definitions.
  1140. The value is a JSON array with an entry for each definition. Each
  1141. entry is a JSON object with members:
  1142. ``define``
  1143. A string specifying the preprocessor definition in the format
  1144. ``<name>[=<value>]``, e.g. ``DEF`` or ``DEF=1``.
  1145. ``backtrace``
  1146. Optional member that is present when a CMake language backtrace to
  1147. the :command:`target_compile_definitions` or other command invocation
  1148. that added this preprocessor definition is available. The value is
  1149. an unsigned integer 0-based index into the ``backtraceGraph``
  1150. member's ``nodes`` array.
  1151. ``sysroot``
  1152. Optional member that is present when the
  1153. :variable:`CMAKE_SYSROOT_COMPILE` or :variable:`CMAKE_SYSROOT`
  1154. variable is defined. The value is a JSON object with one member:
  1155. ``path``
  1156. A string specifying the absolute path to the sysroot, represented
  1157. with forward slashes.
  1158. ``backtraceGraph``
  1159. A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
  1160. from ``backtrace`` members elsewhere in this "target" object.
  1161. "codemodel" version 2 "backtrace graph"
  1162. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1163. The ``backtraceGraph`` member of a `"codemodel" version 2 "directory" object`_,
  1164. or `"codemodel" version 2 "target" object`_ is a JSON object describing a
  1165. graph of backtraces. Its nodes are referenced from ``backtrace`` members
  1166. elsewhere in the containing object. The backtrace graph object members are:
  1167. ``nodes``
  1168. A JSON array listing nodes in the backtrace graph. Each entry
  1169. is a JSON object with members:
  1170. ``file``
  1171. An unsigned integer 0-based index into the backtrace ``files`` array.
  1172. ``line``
  1173. An optional member present when the node represents a line within
  1174. the file. The value is an unsigned integer 1-based line number.
  1175. ``command``
  1176. An optional member present when the node represents a command
  1177. invocation within the file. The value is an unsigned integer
  1178. 0-based index into the backtrace ``commands`` array.
  1179. ``parent``
  1180. An optional member present when the node is not the bottom of
  1181. the call stack. The value is an unsigned integer 0-based index
  1182. of another entry in the backtrace ``nodes`` array.
  1183. ``commands``
  1184. A JSON array listing command names referenced by backtrace nodes.
  1185. Each entry is a string specifying a command name.
  1186. ``files``
  1187. A JSON array listing CMake language files referenced by backtrace nodes.
  1188. Each entry is a string specifying the path to a file, represented
  1189. with forward slashes. If the file is inside the top-level source
  1190. directory then the path is specified relative to that directory.
  1191. Otherwise the path is absolute.
  1192. .. _`file-api configureLog`:
  1193. Object Kind "configureLog"
  1194. --------------------------
  1195. .. versionadded:: 3.26
  1196. The ``configureLog`` object kind describes the location and contents of
  1197. a :manual:`cmake-configure-log(7)` file.
  1198. There is only one ``configureLog`` object major version, version 1.
  1199. .. versionadded:: 4.1
  1200. The ``configureLog`` object kind reply is described in machine-readable form
  1201. by :download:`this JSON schema </manual/file_api/schema_configureLog.json>`.
  1202. "configureLog" version 1
  1203. ^^^^^^^^^^^^^^^^^^^^^^^^
  1204. ``configureLog`` object version 1 is a JSON object:
  1205. .. code-block:: json
  1206. {
  1207. "kind": "configureLog",
  1208. "version": { "major": 1, "minor": 0 },
  1209. "path": "/path/to/top-level-build-dir/CMakeFiles/CMakeConfigureLog.yaml",
  1210. "eventKindNames": [ "try_compile-v1", "try_run-v1" ]
  1211. }
  1212. The members specific to ``configureLog`` objects are:
  1213. ``path``
  1214. A string specifying the path to the configure log file.
  1215. Clients must read the log file from this path, which may be
  1216. different than the path documented by :manual:`cmake-configure-log(7)`.
  1217. The log file may not exist if no events are logged.
  1218. ``eventKindNames``
  1219. A JSON array whose entries are each a JSON string naming one
  1220. of the :manual:`cmake-configure-log(7)` versioned event kinds.
  1221. At most one version of each configure log event kind will be listed.
  1222. Although the configure log may contain other (versioned) event kinds,
  1223. clients must ignore those that are not listed in this field.
  1224. Object Kind "cache"
  1225. -------------------
  1226. The ``cache`` object kind lists cache entries. These are the
  1227. :ref:`CMake Language Variables` stored in the persistent cache
  1228. (``CMakeCache.txt``) for the build tree.
  1229. There is only one ``cache`` object major version, version 2.
  1230. Version 1 does not exist to avoid confusion with that from
  1231. :manual:`cmake-server(7)` mode.
  1232. .. versionadded:: 4.1
  1233. The ``cache`` object kind reply is described in machine-readable form by
  1234. :download:`this JSON schema </manual/file_api/schema_cache.json>`.
  1235. "cache" version 2
  1236. ^^^^^^^^^^^^^^^^^
  1237. ``cache`` object version 2 is a JSON object:
  1238. .. code-block:: json
  1239. {
  1240. "kind": "cache",
  1241. "version": { "major": 2, "minor": 0 },
  1242. "entries": [
  1243. {
  1244. "name": "BUILD_SHARED_LIBS",
  1245. "value": "ON",
  1246. "type": "BOOL",
  1247. "properties": [
  1248. {
  1249. "name": "HELPSTRING",
  1250. "value": "Build shared libraries"
  1251. }
  1252. ]
  1253. },
  1254. {
  1255. "name": "CMAKE_GENERATOR",
  1256. "value": "Unix Makefiles",
  1257. "type": "INTERNAL",
  1258. "properties": [
  1259. {
  1260. "name": "HELPSTRING",
  1261. "value": "Name of generator."
  1262. }
  1263. ]
  1264. }
  1265. ]
  1266. }
  1267. The members specific to ``cache`` objects are:
  1268. ``entries``
  1269. A JSON array whose entries are each a JSON object specifying a
  1270. cache entry. The members of each entry are:
  1271. ``name``
  1272. A string specifying the name of the entry.
  1273. ``value``
  1274. A string specifying the value of the entry.
  1275. ``type``
  1276. A string specifying the type of the entry used by
  1277. :manual:`cmake-gui(1)` to choose a widget for editing.
  1278. ``properties``
  1279. A JSON array of entries specifying associated
  1280. :ref:`cache entry properties <Cache Entry Properties>`.
  1281. Each entry is a JSON object containing members:
  1282. ``name``
  1283. A string specifying the name of the cache entry property.
  1284. ``value``
  1285. A string specifying the value of the cache entry property.
  1286. Object Kind "cmakeFiles"
  1287. ------------------------
  1288. The ``cmakeFiles`` object kind lists files used by CMake while
  1289. configuring and generating the build system. These include the
  1290. ``CMakeLists.txt`` files as well as included ``.cmake`` files.
  1291. There is only one ``cmakeFiles`` object major version, version 1.
  1292. .. versionadded:: 4.1
  1293. The ``cmakeFiles`` object kind reply is described in machine-readable form
  1294. by :download:`this JSON schema </manual/file_api/schema_cmakeFiles.json>`.
  1295. "cmakeFiles" version 1
  1296. ^^^^^^^^^^^^^^^^^^^^^^
  1297. ``cmakeFiles`` object version 1 is a JSON object:
  1298. .. code-block:: json
  1299. {
  1300. "kind": "cmakeFiles",
  1301. "version": { "major": 1, "minor": 1 },
  1302. "paths": {
  1303. "build": "/path/to/top-level-build-dir",
  1304. "source": "/path/to/top-level-source-dir"
  1305. },
  1306. "inputs": [
  1307. {
  1308. "path": "CMakeLists.txt"
  1309. },
  1310. {
  1311. "isGenerated": true,
  1312. "path": "/path/to/top-level-build-dir/.../CMakeSystem.cmake"
  1313. },
  1314. {
  1315. "isExternal": true,
  1316. "path": "/path/to/external/third-party/module.cmake"
  1317. },
  1318. {
  1319. "isCMake": true,
  1320. "isExternal": true,
  1321. "path": "/path/to/cmake/Modules/CMakeGenericSystem.cmake"
  1322. }
  1323. ],
  1324. "globsDependent": [
  1325. {
  1326. "expression": "src/*.cxx",
  1327. "recurse": true,
  1328. "files": [
  1329. "src/foo.cxx",
  1330. "src/bar.cxx"
  1331. ]
  1332. }
  1333. ]
  1334. }
  1335. The members specific to ``cmakeFiles`` objects are:
  1336. ``paths``
  1337. A JSON object containing members:
  1338. ``source``
  1339. A string specifying the absolute path to the top-level source directory,
  1340. represented with forward slashes.
  1341. ``build``
  1342. A string specifying the absolute path to the top-level build directory,
  1343. represented with forward slashes.
  1344. ``inputs``
  1345. A JSON array whose entries are each a JSON object specifying an input
  1346. file used by CMake when configuring and generating the build system.
  1347. The members of each entry are:
  1348. ``path``
  1349. A string specifying the path to an input file to CMake, represented
  1350. with forward slashes. If the file is inside the top-level source
  1351. directory then the path is specified relative to that directory.
  1352. Otherwise the path is absolute.
  1353. ``isGenerated``
  1354. Optional member that is present with boolean value ``true``
  1355. if the path specifies a file that is under the top-level
  1356. build directory and the build is out-of-source.
  1357. This member is not available on in-source builds.
  1358. ``isExternal``
  1359. Optional member that is present with boolean value ``true``
  1360. if the path specifies a file that is not under the top-level
  1361. source or build directories.
  1362. ``isCMake``
  1363. Optional member that is present with boolean value ``true``
  1364. if the path specifies a file in the CMake installation.
  1365. ``globsDependent``
  1366. Optional member that is present when the project calls :command:`file(GLOB)`
  1367. or :command:`file(GLOB_RECURSE)` with the ``CONFIGURE_DEPENDS`` option.
  1368. The value is a JSON array of JSON objects, each specifying a globbing
  1369. expression and the list of paths it matched. If the globbing expression
  1370. no longer matches the same list of paths, CMake considers the build system
  1371. to be out of date.
  1372. This field was added in ``cmakeFiles`` version 1.1.
  1373. The members of each entry are:
  1374. ``expression``
  1375. A string specifying the globbing expression.
  1376. ``recurse``
  1377. Optional member that is present with boolean value ``true``
  1378. if the entry corresponds to a :command:`file(GLOB_RECURSE)` call.
  1379. Otherwise the entry corresponds to a :command:`file(GLOB)` call.
  1380. ``listDirectories``
  1381. Optional member that is present with boolean value ``true`` if
  1382. :command:`file(GLOB)` was called without ``LIST_DIRECTORIES false`` or
  1383. :command:`file(GLOB_RECURSE)` was called with ``LIST_DIRECTORIES true``.
  1384. ``followSymlinks``
  1385. Optional member that is present with boolean value ``true`` if
  1386. :command:`file(GLOB)` was called with the ``FOLLOW_SYMLINKS`` option.
  1387. ``relative``
  1388. Optional member that is present if :command:`file(GLOB)` was called
  1389. with the ``RELATIVE <path>`` option. The value is a string containing
  1390. the ``<path>`` given.
  1391. ``paths``
  1392. A JSON array of strings specifying the paths matched by the call
  1393. to :command:`file(GLOB)` or :command:`file(GLOB_RECURSE)`.
  1394. Object Kind "toolchains"
  1395. ------------------------
  1396. The ``toolchains`` object kind lists properties of the toolchains used during
  1397. the build. These include the language, compiler path, ID, and version.
  1398. There is only one ``toolchains`` object major version, version 1.
  1399. .. versionadded:: 4.1
  1400. The ``toolchains`` object kind reply is described in machine-readable form
  1401. by :download:`this JSON schema </manual/file_api/schema_toolchains.json>`.
  1402. "toolchains" version 1
  1403. ^^^^^^^^^^^^^^^^^^^^^^
  1404. ``toolchains`` object version 1 is a JSON object:
  1405. .. code-block:: json
  1406. {
  1407. "kind": "toolchains",
  1408. "version": { "major": 1, "minor": 0 },
  1409. "toolchains": [
  1410. {
  1411. "language": "C",
  1412. "compiler": {
  1413. "path": "/usr/bin/cc",
  1414. "id": "GNU",
  1415. "version": "9.3.0",
  1416. "implicit": {
  1417. "includeDirectories": [
  1418. "/usr/lib/gcc/x86_64-linux-gnu/9/include",
  1419. "/usr/local/include",
  1420. "/usr/include/x86_64-linux-gnu",
  1421. "/usr/include"
  1422. ],
  1423. "linkDirectories": [
  1424. "/usr/lib/gcc/x86_64-linux-gnu/9",
  1425. "/usr/lib/x86_64-linux-gnu",
  1426. "/usr/lib",
  1427. "/lib/x86_64-linux-gnu",
  1428. "/lib"
  1429. ],
  1430. "linkFrameworkDirectories": [],
  1431. "linkLibraries": [ "gcc", "gcc_s", "c", "gcc", "gcc_s" ]
  1432. }
  1433. },
  1434. "sourceFileExtensions": [ "c", "m" ]
  1435. },
  1436. {
  1437. "language": "CXX",
  1438. "compiler": {
  1439. "path": "/usr/bin/c++",
  1440. "id": "GNU",
  1441. "version": "9.3.0",
  1442. "implicit": {
  1443. "includeDirectories": [
  1444. "/usr/include/c++/9",
  1445. "/usr/include/x86_64-linux-gnu/c++/9",
  1446. "/usr/include/c++/9/backward",
  1447. "/usr/lib/gcc/x86_64-linux-gnu/9/include",
  1448. "/usr/local/include",
  1449. "/usr/include/x86_64-linux-gnu",
  1450. "/usr/include"
  1451. ],
  1452. "linkDirectories": [
  1453. "/usr/lib/gcc/x86_64-linux-gnu/9",
  1454. "/usr/lib/x86_64-linux-gnu",
  1455. "/usr/lib",
  1456. "/lib/x86_64-linux-gnu",
  1457. "/lib"
  1458. ],
  1459. "linkFrameworkDirectories": [],
  1460. "linkLibraries": [
  1461. "stdc++", "m", "gcc_s", "gcc", "c", "gcc_s", "gcc"
  1462. ]
  1463. }
  1464. },
  1465. "sourceFileExtensions": [
  1466. "C", "M", "c++", "cc", "cpp", "cxx", "mm", "CPP"
  1467. ]
  1468. }
  1469. ]
  1470. }
  1471. The members specific to ``toolchains`` objects are:
  1472. ``toolchains``
  1473. A JSON array whose entries are each a JSON object specifying a toolchain
  1474. associated with a particular language. The members of each entry are:
  1475. ``language``
  1476. A JSON string specifying the toolchain language, like C or CXX. Language
  1477. names are the same as language names that can be passed to the
  1478. :command:`project` command. Because CMake only supports a single toolchain
  1479. per language, this field can be used as a key.
  1480. ``compiler``
  1481. A JSON object containing members:
  1482. ``path``
  1483. Optional member that is present when the
  1484. :variable:`CMAKE_<LANG>_COMPILER` variable is defined for the current
  1485. language. Its value is a JSON string holding the path to the compiler.
  1486. ``id``
  1487. Optional member that is present when the
  1488. :variable:`CMAKE_<LANG>_COMPILER_ID` variable is defined for the current
  1489. language. Its value is a JSON string holding the ID (GNU, MSVC, etc.) of
  1490. the compiler.
  1491. ``version``
  1492. Optional member that is present when the
  1493. :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable is defined for the
  1494. current language. Its value is a JSON string holding the version of the
  1495. compiler.
  1496. ``target``
  1497. Optional member that is present when the
  1498. :variable:`CMAKE_<LANG>_COMPILER_TARGET` variable is defined for the
  1499. current language. Its value is a JSON string holding the cross-compiling
  1500. target of the compiler.
  1501. ``implicit``
  1502. A JSON object containing members:
  1503. ``includeDirectories``
  1504. Optional member that is present when the
  1505. :variable:`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variable is
  1506. defined for the current language. Its value is a JSON array of JSON
  1507. strings where each string holds a path to an implicit include
  1508. directory for the compiler.
  1509. ``linkDirectories``
  1510. Optional member that is present when the
  1511. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES` variable is
  1512. defined for the current language. Its value is a JSON array of JSON
  1513. strings where each string holds a path to an implicit link directory
  1514. for the compiler.
  1515. ``linkFrameworkDirectories``
  1516. Optional member that is present when the
  1517. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES` variable
  1518. is defined for the current language. Its value is a JSON array of JSON
  1519. strings where each string holds a path to an implicit link framework
  1520. directory for the compiler.
  1521. ``linkLibraries``
  1522. Optional member that is present when the
  1523. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES` variable is defined
  1524. for the current language. Its value is a JSON array of JSON strings
  1525. where each string holds a path to an implicit link library for the
  1526. compiler.
  1527. ``sourceFileExtensions``
  1528. Optional member that is present when the
  1529. :variable:`CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS` variable is defined for
  1530. the current language. Its value is a JSON array of JSON strings where
  1531. each string holds a file extension (without the leading dot) for the
  1532. language.