cmake-file-api.7.rst 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  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. API v1
  20. ======
  21. API v1 is housed in the ``<build>/.cmake/api/v1/`` directory.
  22. It has the following subdirectories:
  23. ``query/``
  24. Holds query files written by clients.
  25. These may be `v1 Shared Stateless Query Files`_,
  26. `v1 Client Stateless Query Files`_, or `v1 Client Stateful Query Files`_.
  27. ``reply/``
  28. Holds reply files written by CMake whenever it runs to generate a build
  29. system. These are indexed by a `v1 Reply Index File`_ file that may
  30. reference additional `v1 Reply Files`_. CMake owns all reply files.
  31. Clients must never remove them.
  32. Clients may look for and read a reply index file at any time.
  33. Clients may optionally create the ``reply/`` directory at any time
  34. and monitor it for the appearance of a new reply index file.
  35. v1 Shared Stateless Query Files
  36. -------------------------------
  37. Shared stateless query files allow clients to share requests for
  38. major versions of the `Object Kinds`_ and get all requested versions
  39. recognized by the CMake that runs.
  40. Clients may create shared requests by creating empty files in the
  41. ``v1/query/`` directory. The form is::
  42. <build>/.cmake/api/v1/query/<kind>-v<major>
  43. where ``<kind>`` is one of the `Object Kinds`_, ``-v`` is literal,
  44. and ``<major>`` is the major version number.
  45. Files of this form are stateless shared queries not owned by any specific
  46. client. Once created they should not be removed without external client
  47. coordination or human intervention.
  48. v1 Client Stateless Query Files
  49. -------------------------------
  50. Client stateless query files allow clients to create owned requests for
  51. major versions of the `Object Kinds`_ and get all requested versions
  52. recognized by the CMake that runs.
  53. Clients may create owned requests by creating empty files in
  54. client-specific query subdirectories. The form is::
  55. <build>/.cmake/api/v1/query/client-<client>/<kind>-v<major>
  56. where ``client-`` is literal, ``<client>`` is a string uniquely
  57. identifying the client, ``<kind>`` is one of the `Object Kinds`_,
  58. ``-v`` is literal, and ``<major>`` is the major version number.
  59. Each client must choose a unique ``<client>`` identifier via its
  60. own means.
  61. Files of this form are stateless queries owned by the client ``<client>``.
  62. The owning client may remove them at any time.
  63. v1 Client Stateful Query Files
  64. ------------------------------
  65. Stateful query files allow clients to request a list of versions of
  66. each of the `Object Kinds`_ and get only the most recent version
  67. recognized by the CMake that runs.
  68. Clients may create owned stateful queries by creating ``query.json``
  69. files in client-specific query subdirectories. The form is::
  70. <build>/.cmake/api/v1/query/client-<client>/query.json
  71. where ``client-`` is literal, ``<client>`` is a string uniquely
  72. identifying the client, and ``query.json`` is literal. Each client
  73. must choose a unique ``<client>`` identifier via its own means.
  74. ``query.json`` files are stateful queries owned by the client ``<client>``.
  75. The owning client may update or remove them at any time. When a
  76. given client installation is updated it may then update the stateful
  77. query it writes to build trees to request newer object versions.
  78. This can be used to avoid asking CMake to generate multiple object
  79. versions unnecessarily.
  80. A ``query.json`` file must contain a JSON object:
  81. .. code-block:: json
  82. {
  83. "requests": [
  84. { "kind": "<kind>" , "version": 1 },
  85. { "kind": "<kind>" , "version": { "major": 1, "minor": 2 } },
  86. { "kind": "<kind>" , "version": [2, 1] },
  87. { "kind": "<kind>" , "version": [2, { "major": 1, "minor": 2 }] },
  88. { "kind": "<kind>" , "version": 1, "client": {} },
  89. { "kind": "..." }
  90. ],
  91. "client": {}
  92. }
  93. The members are:
  94. ``requests``
  95. A JSON array containing zero or more requests. Each request is
  96. a JSON object with members:
  97. ``kind``
  98. Specifies one of the `Object Kinds`_ to be included in the reply.
  99. ``version``
  100. Indicates the version(s) of the object kind that the client
  101. understands. Versions have major and minor components following
  102. semantic version conventions. The value must be
  103. * a JSON integer specifying a (non-negative) major version number, or
  104. * a JSON object containing ``major`` and (optionally) ``minor``
  105. members specifying non-negative integer version components, or
  106. * a JSON array whose elements are each one of the above.
  107. ``client``
  108. Optional member reserved for use by the client. This value is
  109. preserved in the reply written for the client in the
  110. `v1 Reply Index File`_ but is otherwise ignored. Clients may use
  111. this to pass custom information with a request through to its reply.
  112. For each requested object kind CMake will choose the *first* version
  113. that it recognizes for that kind among those listed in the request.
  114. The response will use the selected *major* version with the highest
  115. *minor* version known to the running CMake for that major version.
  116. Therefore clients should list all supported major versions in
  117. preferred order along with the minimal minor version required
  118. for each major version.
  119. ``client``
  120. Optional member reserved for use by the client. This value is
  121. preserved in the reply written for the client in the
  122. `v1 Reply Index File`_ but is otherwise ignored. Clients may use
  123. this to pass custom information with a query through to its reply.
  124. Other ``query.json`` top-level members are reserved for future use.
  125. If present they are ignored for forward compatibility.
  126. v1 Reply Index File
  127. -------------------
  128. CMake writes an ``index-*.json`` file to the ``v1/reply/`` directory
  129. whenever it runs to generate a build system. Clients must read the
  130. reply index file first and may read other `v1 Reply Files`_ only by
  131. following references. The form of the reply index file name is::
  132. <build>/.cmake/api/v1/reply/index-<unspecified>.json
  133. where ``index-`` is literal and ``<unspecified>`` is an unspecified
  134. name selected by CMake. Whenever a new index file is generated it
  135. is given a new name and any old one is deleted. During the short
  136. time between these steps there may be multiple index files present;
  137. the one with the largest name in lexicographic order is the current
  138. index file.
  139. The reply index file contains a JSON object:
  140. .. code-block:: json
  141. {
  142. "cmake": {
  143. "version": {
  144. "major": 3, "minor": 14, "patch": 0, "suffix": "",
  145. "string": "3.14.0", "isDirty": false
  146. },
  147. "paths": {
  148. "cmake": "/prefix/bin/cmake",
  149. "ctest": "/prefix/bin/ctest",
  150. "cpack": "/prefix/bin/cpack",
  151. "root": "/prefix/share/cmake-3.14"
  152. },
  153. "generator": {
  154. "multiConfig": false,
  155. "name": "Unix Makefiles"
  156. }
  157. },
  158. "objects": [
  159. { "kind": "<kind>",
  160. "version": { "major": 1, "minor": 0 },
  161. "jsonFile": "<file>" },
  162. { "...": "..." }
  163. ],
  164. "reply": {
  165. "<kind>-v<major>": { "kind": "<kind>",
  166. "version": { "major": 1, "minor": 0 },
  167. "jsonFile": "<file>" },
  168. "<unknown>": { "error": "unknown query file" },
  169. "...": {},
  170. "client-<client>": {
  171. "<kind>-v<major>": { "kind": "<kind>",
  172. "version": { "major": 1, "minor": 0 },
  173. "jsonFile": "<file>" },
  174. "<unknown>": { "error": "unknown query file" },
  175. "...": {},
  176. "query.json": {
  177. "requests": [ {}, {}, {} ],
  178. "responses": [
  179. { "kind": "<kind>",
  180. "version": { "major": 1, "minor": 0 },
  181. "jsonFile": "<file>" },
  182. { "error": "unknown query file" },
  183. { "...": {} }
  184. ],
  185. "client": {}
  186. }
  187. }
  188. }
  189. }
  190. The members are:
  191. ``cmake``
  192. A JSON object containing information about the instance of CMake that
  193. generated the reply. It contains members:
  194. ``version``
  195. A JSON object specifying the version of CMake with members:
  196. ``major``, ``minor``, ``patch``
  197. Integer values specifying the major, minor, and patch version components.
  198. ``suffix``
  199. A string specifying the version suffix, if any, e.g. ``g0abc3``.
  200. ``string``
  201. A string specifying the full version in the format
  202. ``<major>.<minor>.<patch>[-<suffix>]``.
  203. ``isDirty``
  204. A boolean indicating whether the version was built from a version
  205. controlled source tree with local modifications.
  206. ``paths``
  207. A JSON object specifying paths to things that come with CMake.
  208. It has members for ``cmake``, ``ctest``, and ``cpack`` whose values
  209. are JSON strings specifying the absolute path to each tool,
  210. represented with forward slashes. It also has a ``root`` member for
  211. the absolute path to the directory containing CMake resources like the
  212. ``Modules/`` directory (see :variable:`CMAKE_ROOT`).
  213. ``generator``
  214. A JSON object describing the CMake generator used for the build.
  215. It has members:
  216. ``multiConfig``
  217. A boolean specifying whether the generator supports multiple output
  218. configurations.
  219. ``name``
  220. A string specifying the name of the generator.
  221. ``platform``
  222. If the generator supports :variable:`CMAKE_GENERATOR_PLATFORM`,
  223. this is a string specifying the generator platform name.
  224. ``objects``
  225. A JSON array listing all versions of all `Object Kinds`_ generated
  226. as part of the reply. Each array entry is a
  227. `v1 Reply File Reference`_.
  228. ``reply``
  229. A JSON object mirroring the content of the ``query/`` directory
  230. that CMake loaded to produce the reply. The members are of the form
  231. ``<kind>-v<major>``
  232. A member of this form appears for each of the
  233. `v1 Shared Stateless Query Files`_ that CMake recognized as a
  234. request for object kind ``<kind>`` with major version ``<major>``.
  235. The value is a `v1 Reply File Reference`_ to the corresponding
  236. reply file for that object kind and version.
  237. ``<unknown>``
  238. A member of this form appears for each of the
  239. `v1 Shared Stateless Query Files`_ that CMake did not recognize.
  240. The value is a JSON object with a single ``error`` member
  241. containing a string with an error message indicating that the
  242. query file is unknown.
  243. ``client-<client>``
  244. A member of this form appears for each client-owned directory
  245. holding `v1 Client Stateless Query Files`_.
  246. The value is a JSON object mirroring the content of the
  247. ``query/client-<client>/`` directory. The members are of the form:
  248. ``<kind>-v<major>``
  249. A member of this form appears for each of the
  250. `v1 Client Stateless Query Files`_ that CMake recognized as a
  251. request for object kind ``<kind>`` with major version ``<major>``.
  252. The value is a `v1 Reply File Reference`_ to the corresponding
  253. reply file for that object kind and version.
  254. ``<unknown>``
  255. A member of this form appears for each of the
  256. `v1 Client Stateless Query Files`_ that CMake did not recognize.
  257. The value is a JSON object with a single ``error`` member
  258. containing a string with an error message indicating that the
  259. query file is unknown.
  260. ``query.json``
  261. This member appears for clients using
  262. `v1 Client Stateful Query Files`_.
  263. If the ``query.json`` file failed to read or parse as a JSON object,
  264. this member is a JSON object with a single ``error`` member
  265. containing a string with an error message. Otherwise, this member
  266. is a JSON object mirroring the content of the ``query.json`` file.
  267. The members are:
  268. ``client``
  269. A copy of the ``query.json`` file ``client`` member, if it exists.
  270. ``requests``
  271. A copy of the ``query.json`` file ``requests`` member, if it exists.
  272. ``responses``
  273. If the ``query.json`` file ``requests`` member is missing or invalid,
  274. this member is a JSON object with a single ``error`` member
  275. containing a string with an error message. Otherwise, this member
  276. contains a JSON array with a response for each entry of the
  277. ``requests`` array, in the same order. Each response is
  278. * a JSON object with a single ``error`` member containing a string
  279. with an error message, or
  280. * a `v1 Reply File Reference`_ to the corresponding reply file for
  281. the requested object kind and selected version.
  282. After reading the reply index file, clients may read the other
  283. `v1 Reply Files`_ it references.
  284. v1 Reply File Reference
  285. ^^^^^^^^^^^^^^^^^^^^^^^
  286. The reply index file represents each reference to another reply file
  287. using a JSON object with members:
  288. ``kind``
  289. A string specifying one of the `Object Kinds`_.
  290. ``version``
  291. A JSON object with members ``major`` and ``minor`` specifying
  292. integer version components of the object kind.
  293. ``jsonFile``
  294. A JSON string specifying a path relative to the reply index file
  295. to another JSON file containing the object.
  296. v1 Reply Files
  297. --------------
  298. Reply files containing specific `Object Kinds`_ are written by CMake.
  299. The names of these files are unspecified and must not be interpreted
  300. by clients. Clients must first read the `v1 Reply Index File`_ and
  301. and follow references to the names of the desired response objects.
  302. Reply files (including the index file) will never be replaced by
  303. files of the same name but different content. This allows a client
  304. to read the files concurrently with a running CMake that may generate
  305. a new reply. However, after generating a new reply CMake will attempt
  306. to remove reply files from previous runs that it did not just write.
  307. If a client attempts to read a reply file referenced by the index but
  308. finds the file missing, that means a concurrent CMake has generated
  309. a new reply. The client may simply start again by reading the new
  310. reply index file.
  311. .. _`file-api object kinds`:
  312. Object Kinds
  313. ============
  314. The CMake file-based API reports semantic information about the build
  315. system using the following kinds of JSON objects. Each kind of object
  316. is versioned independently using semantic versioning with major and
  317. minor components. Every kind of object has the form:
  318. .. code-block:: json
  319. {
  320. "kind": "<kind>",
  321. "version": { "major": 1, "minor": 0 },
  322. "...": {}
  323. }
  324. The ``kind`` member is a string specifying the object kind name.
  325. The ``version`` member is a JSON object with ``major`` and ``minor``
  326. members specifying integer components of the object kind's version.
  327. Additional top-level members are specific to each object kind.
  328. Object Kind "codemodel"
  329. -----------------------
  330. The ``codemodel`` object kind describes the build system structure as
  331. modeled by CMake.
  332. There is only one ``codemodel`` object major version, version 2.
  333. Version 1 does not exist to avoid confusion with that from
  334. :manual:`cmake-server(7)` mode.
  335. "codemodel" version 2
  336. ^^^^^^^^^^^^^^^^^^^^^
  337. ``codemodel`` object version 2 is a JSON object:
  338. .. code-block:: json
  339. {
  340. "kind": "codemodel",
  341. "version": { "major": 2, "minor": 2 },
  342. "paths": {
  343. "source": "/path/to/top-level-source-dir",
  344. "build": "/path/to/top-level-build-dir"
  345. },
  346. "configurations": [
  347. {
  348. "name": "Debug",
  349. "directories": [
  350. {
  351. "source": ".",
  352. "build": ".",
  353. "childIndexes": [ 1 ],
  354. "projectIndex": 0,
  355. "targetIndexes": [ 0 ],
  356. "hasInstallRule": true,
  357. "minimumCMakeVersion": {
  358. "string": "3.14"
  359. },
  360. "jsonFile": "<file>"
  361. },
  362. {
  363. "source": "sub",
  364. "build": "sub",
  365. "parentIndex": 0,
  366. "projectIndex": 0,
  367. "targetIndexes": [ 1 ],
  368. "minimumCMakeVersion": {
  369. "string": "3.14"
  370. },
  371. "jsonFile": "<file>"
  372. }
  373. ],
  374. "projects": [
  375. {
  376. "name": "MyProject",
  377. "directoryIndexes": [ 0, 1 ],
  378. "targetIndexes": [ 0, 1 ]
  379. }
  380. ],
  381. "targets": [
  382. {
  383. "name": "MyExecutable",
  384. "directoryIndex": 0,
  385. "projectIndex": 0,
  386. "jsonFile": "<file>"
  387. },
  388. {
  389. "name": "MyLibrary",
  390. "directoryIndex": 1,
  391. "projectIndex": 0,
  392. "jsonFile": "<file>"
  393. }
  394. ]
  395. }
  396. ]
  397. }
  398. The members specific to ``codemodel`` objects are:
  399. ``paths``
  400. A JSON object containing members:
  401. ``source``
  402. A string specifying the absolute path to the top-level source directory,
  403. represented with forward slashes.
  404. ``build``
  405. A string specifying the absolute path to the top-level build directory,
  406. represented with forward slashes.
  407. ``configurations``
  408. A JSON array of entries corresponding to available build configurations.
  409. On single-configuration generators there is one entry for the value
  410. of the :variable:`CMAKE_BUILD_TYPE` variable. For multi-configuration
  411. generators there is an entry for each configuration listed in the
  412. :variable:`CMAKE_CONFIGURATION_TYPES` variable.
  413. Each entry is a JSON object containing members:
  414. ``name``
  415. A string specifying the name of the configuration, e.g. ``Debug``.
  416. ``directories``
  417. A JSON array of entries each corresponding to a build system directory
  418. whose source directory contains a ``CMakeLists.txt`` file. The first
  419. entry corresponds to the top-level directory. Each entry is a
  420. JSON object containing members:
  421. ``source``
  422. A string specifying the path to the source directory, represented
  423. with forward slashes. If the directory is inside the top-level
  424. source directory then the path is specified relative to that
  425. directory (with ``.`` for the top-level source directory itself).
  426. Otherwise the path is absolute.
  427. ``build``
  428. A string specifying the path to the build directory, represented
  429. with forward slashes. If the directory is inside the top-level
  430. build directory then the path is specified relative to that
  431. directory (with ``.`` for the top-level build directory itself).
  432. Otherwise the path is absolute.
  433. ``parentIndex``
  434. Optional member that is present when the directory is not top-level.
  435. The value is an unsigned integer 0-based index of another entry in
  436. the main ``directories`` array that corresponds to the parent
  437. directory that added this directory as a subdirectory.
  438. ``childIndexes``
  439. Optional member that is present when the directory has subdirectories.
  440. The value is a JSON array of entries corresponding to child directories
  441. created by the :command:`add_subdirectory` or :command:`subdirs`
  442. command. Each entry is an unsigned integer 0-based index of another
  443. entry in the main ``directories`` array.
  444. ``projectIndex``
  445. An unsigned integer 0-based index into the main ``projects`` array
  446. indicating the build system project to which the this directory belongs.
  447. ``targetIndexes``
  448. Optional member that is present when the directory itself has targets,
  449. excluding those belonging to subdirectories. The value is a JSON
  450. array of entries corresponding to the targets. Each entry is an
  451. unsigned integer 0-based index into the main ``targets`` array.
  452. ``minimumCMakeVersion``
  453. Optional member present when a minimum required version of CMake is
  454. known for the directory. This is the ``<min>`` version given to the
  455. most local call to the :command:`cmake_minimum_required(VERSION)`
  456. command in the directory itself or one of its ancestors.
  457. The value is a JSON object with one member:
  458. ``string``
  459. A string specifying the minimum required version in the format::
  460. <major>.<minor>[.<patch>[.<tweak>]][<suffix>]
  461. Each component is an unsigned integer and the suffix may be an
  462. arbitrary string.
  463. ``hasInstallRule``
  464. Optional member that is present with boolean value ``true`` when
  465. the directory or one of its subdirectories contains any
  466. :command:`install` rules, i.e. whether a ``make install``
  467. or equivalent rule is available.
  468. ``jsonFile``
  469. A JSON string specifying a path relative to the codemodel file
  470. to another JSON file containing a
  471. `"codemodel" version 2 "directory" object`_.
  472. This field was added in codemodel version 2.3.
  473. ``projects``
  474. A JSON array of entries corresponding to the top-level project
  475. and sub-projects defined in the build system. Each (sub-)project
  476. corresponds to a source directory whose ``CMakeLists.txt`` file
  477. calls the :command:`project` command with a project name different
  478. from its parent directory. The first entry corresponds to the
  479. top-level project.
  480. Each entry is a JSON object containing members:
  481. ``name``
  482. A string specifying the name given to the :command:`project` command.
  483. ``parentIndex``
  484. Optional member that is present when the project is not top-level.
  485. The value is an unsigned integer 0-based index of another entry in
  486. the main ``projects`` array that corresponds to the parent project
  487. that added this project as a sub-project.
  488. ``childIndexes``
  489. Optional member that is present when the project has sub-projects.
  490. The value is a JSON array of entries corresponding to the sub-projects.
  491. Each entry is an unsigned integer 0-based index of another
  492. entry in the main ``projects`` array.
  493. ``directoryIndexes``
  494. A JSON array of entries corresponding to build system directories
  495. that are part of the project. The first entry corresponds to the
  496. top-level directory of the project. Each entry is an unsigned
  497. integer 0-based index into the main ``directories`` array.
  498. ``targetIndexes``
  499. Optional member that is present when the project itself has targets,
  500. excluding those belonging to sub-projects. The value is a JSON
  501. array of entries corresponding to the targets. Each entry is an
  502. unsigned integer 0-based index into the main ``targets`` array.
  503. ``targets``
  504. A JSON array of entries corresponding to the build system targets.
  505. Such targets are created by calls to :command:`add_executable`,
  506. :command:`add_library`, and :command:`add_custom_target`, excluding
  507. imported targets and interface libraries (which do not generate any
  508. build rules). Each entry is a JSON object containing members:
  509. ``name``
  510. A string specifying the target name.
  511. ``id``
  512. A string uniquely identifying the target. This matches the ``id``
  513. field in the file referenced by ``jsonFile``.
  514. ``directoryIndex``
  515. An unsigned integer 0-based index into the main ``directories`` array
  516. indicating the build system directory in which the target is defined.
  517. ``projectIndex``
  518. An unsigned integer 0-based index into the main ``projects`` array
  519. indicating the build system project in which the target is defined.
  520. ``jsonFile``
  521. A JSON string specifying a path relative to the codemodel file
  522. to another JSON file containing a
  523. `"codemodel" version 2 "target" object`_.
  524. "codemodel" version 2 "directory" object
  525. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  526. A codemodel "directory" object is referenced by a `"codemodel" version 2`_
  527. object's ``directories`` array. Each "directory" object is a JSON object
  528. with members:
  529. ``paths``
  530. A JSON object containing members:
  531. ``source``
  532. A string specifying the path to the source directory, represented
  533. with forward slashes. If the directory is inside the top-level
  534. source directory then the path is specified relative to that
  535. directory (with ``.`` for the top-level source directory itself).
  536. Otherwise the path is absolute.
  537. ``build``
  538. A string specifying the path to the build directory, represented
  539. with forward slashes. If the directory is inside the top-level
  540. build directory then the path is specified relative to that
  541. directory (with ``.`` for the top-level build directory itself).
  542. Otherwise the path is absolute.
  543. "codemodel" version 2 "target" object
  544. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  545. A codemodel "target" object is referenced by a `"codemodel" version 2`_
  546. object's ``targets`` array. Each "target" object is a JSON object
  547. with members:
  548. ``name``
  549. A string specifying the logical name of the target.
  550. ``id``
  551. A string uniquely identifying the target. The format is unspecified
  552. and should not be interpreted by clients.
  553. ``type``
  554. A string specifying the type of the target. The value is one of
  555. ``EXECUTABLE``, ``STATIC_LIBRARY``, ``SHARED_LIBRARY``,
  556. ``MODULE_LIBRARY``, ``OBJECT_LIBRARY``, ``INTERFACE_LIBRARY``,
  557. or ``UTILITY``.
  558. ``backtrace``
  559. Optional member that is present when a CMake language backtrace to
  560. the command in the source code that created the target is available.
  561. The value is an unsigned integer 0-based index into the
  562. ``backtraceGraph`` member's ``nodes`` array.
  563. ``folder``
  564. Optional member that is present when the :prop_tgt:`FOLDER` target
  565. property is set. The value is a JSON object with one member:
  566. ``name``
  567. A string specifying the name of the target folder.
  568. ``paths``
  569. A JSON object containing members:
  570. ``source``
  571. A string specifying the path to the target's source directory,
  572. represented with forward slashes. If the directory is inside the
  573. top-level source directory then the path is specified relative to
  574. that directory (with ``.`` for the top-level source directory itself).
  575. Otherwise the path is absolute.
  576. ``build``
  577. A string specifying the path to the target's build directory,
  578. represented with forward slashes. If the directory is inside the
  579. top-level build directory then the path is specified relative to
  580. that directory (with ``.`` for the top-level build directory itself).
  581. Otherwise the path is absolute.
  582. ``nameOnDisk``
  583. Optional member that is present for executable and library targets
  584. that are linked or archived into a single primary artifact.
  585. The value is a string specifying the file name of that artifact on disk.
  586. ``artifacts``
  587. Optional member that is present for executable and library targets
  588. that produce artifacts on disk meant for consumption by dependents.
  589. The value is a JSON array of entries corresponding to the artifacts.
  590. Each entry is a JSON object containing one member:
  591. ``path``
  592. A string specifying the path to the file on disk, represented with
  593. forward slashes. If the file is inside the top-level build directory
  594. then the path is specified relative to that directory.
  595. Otherwise the path is absolute.
  596. ``isGeneratorProvided``
  597. Optional member that is present with boolean value ``true`` if the
  598. target is provided by CMake's build system generator rather than by
  599. a command in the source code.
  600. ``install``
  601. Optional member that is present when the target has an :command:`install`
  602. rule. The value is a JSON object with members:
  603. ``prefix``
  604. A JSON object specifying the installation prefix. It has one member:
  605. ``path``
  606. A string specifying the value of :variable:`CMAKE_INSTALL_PREFIX`.
  607. ``destinations``
  608. A JSON array of entries specifying an install destination path.
  609. Each entry is a JSON object with members:
  610. ``path``
  611. A string specifying the install destination path. The path may
  612. be absolute or relative to the install prefix.
  613. ``backtrace``
  614. Optional member that is present when a CMake language backtrace to
  615. the :command:`install` command invocation that specified this
  616. destination is available. The value is an unsigned integer 0-based
  617. index into the ``backtraceGraph`` member's ``nodes`` array.
  618. ``link``
  619. Optional member that is present for executables and shared library
  620. targets that link into a runtime binary. The value is a JSON object
  621. with members describing the link step:
  622. ``language``
  623. A string specifying the language (e.g. ``C``, ``CXX``, ``Fortran``)
  624. of the toolchain is used to invoke the linker.
  625. ``commandFragments``
  626. Optional member that is present when fragments of the link command
  627. line invocation are available. The value is a JSON array of entries
  628. specifying ordered fragments. Each entry is a JSON object with members:
  629. ``fragment``
  630. A string specifying a fragment of the link command line invocation.
  631. The value is encoded in the build system's native shell format.
  632. ``role``
  633. A string specifying the role of the fragment's content:
  634. * ``flags``: link flags.
  635. * ``libraries``: link library file paths or flags.
  636. * ``libraryPath``: library search path flags.
  637. * ``frameworkPath``: macOS framework search path flags.
  638. ``lto``
  639. Optional member that is present with boolean value ``true``
  640. when link-time optimization (a.k.a. interprocedural optimization
  641. or link-time code generation) is enabled.
  642. ``sysroot``
  643. Optional member that is present when the :variable:`CMAKE_SYSROOT_LINK`
  644. or :variable:`CMAKE_SYSROOT` variable is defined. The value is a
  645. JSON object with one member:
  646. ``path``
  647. A string specifying the absolute path to the sysroot, represented
  648. with forward slashes.
  649. ``archive``
  650. Optional member that is present for static library targets. The value
  651. is a JSON object with members describing the archive step:
  652. ``commandFragments``
  653. Optional member that is present when fragments of the archiver command
  654. line invocation are available. The value is a JSON array of entries
  655. specifying the fragments. Each entry is a JSON object with members:
  656. ``fragment``
  657. A string specifying a fragment of the archiver command line invocation.
  658. The value is encoded in the build system's native shell format.
  659. ``role``
  660. A string specifying the role of the fragment's content:
  661. * ``flags``: archiver flags.
  662. ``lto``
  663. Optional member that is present with boolean value ``true``
  664. when link-time optimization (a.k.a. interprocedural optimization
  665. or link-time code generation) is enabled.
  666. ``dependencies``
  667. Optional member that is present when the target depends on other targets.
  668. The value is a JSON array of entries corresponding to the dependencies.
  669. Each entry is a JSON object with members:
  670. ``id``
  671. A string uniquely identifying the target on which this target depends.
  672. This matches the main ``id`` member of the other target.
  673. ``backtrace``
  674. Optional member that is present when a CMake language backtrace to
  675. the :command:`add_dependencies`, :command:`target_link_libraries`,
  676. or other command invocation that created this dependency is
  677. available. The value is an unsigned integer 0-based index into
  678. the ``backtraceGraph`` member's ``nodes`` array.
  679. ``sources``
  680. A JSON array of entries corresponding to the target's source files.
  681. Each entry is a JSON object with members:
  682. ``path``
  683. A string specifying the path to the source file on disk, represented
  684. with forward slashes. If the file is inside the top-level source
  685. directory then the path is specified relative to that directory.
  686. Otherwise the path is absolute.
  687. ``compileGroupIndex``
  688. Optional member that is present when the source is compiled.
  689. The value is an unsigned integer 0-based index into the
  690. ``compileGroups`` array.
  691. ``sourceGroupIndex``
  692. Optional member that is present when the source is part of a source
  693. group either via the :command:`source_group` command or by default.
  694. The value is an unsigned integer 0-based index into the
  695. ``sourceGroups`` array.
  696. ``isGenerated``
  697. Optional member that is present with boolean value ``true`` if
  698. the source is :prop_sf:`GENERATED`.
  699. ``backtrace``
  700. Optional member that is present when a CMake language backtrace to
  701. the :command:`target_sources`, :command:`add_executable`,
  702. :command:`add_library`, :command:`add_custom_target`, or other
  703. command invocation that added this source to the target is
  704. available. The value is an unsigned integer 0-based index into
  705. the ``backtraceGraph`` member's ``nodes`` array.
  706. ``sourceGroups``
  707. Optional member that is present when sources are grouped together by
  708. the :command:`source_group` command or by default. The value is a
  709. JSON array of entries corresponding to the groups. Each entry is
  710. a JSON object with members:
  711. ``name``
  712. A string specifying the name of the source group.
  713. ``sourceIndexes``
  714. A JSON array listing the sources belonging to the group.
  715. Each entry is an unsigned integer 0-based index into the
  716. main ``sources`` array for the target.
  717. ``compileGroups``
  718. Optional member that is present when the target has sources that compile.
  719. The value is a JSON array of entries corresponding to groups of sources
  720. that all compile with the same settings. Each entry is a JSON object
  721. with members:
  722. ``sourceIndexes``
  723. A JSON array listing the sources belonging to the group.
  724. Each entry is an unsigned integer 0-based index into the
  725. main ``sources`` array for the target.
  726. ``language``
  727. A string specifying the language (e.g. ``C``, ``CXX``, ``Fortran``)
  728. of the toolchain is used to compile the source file.
  729. ``languageStandard``
  730. Optional member that is present when the language standard is set
  731. explicitly (e.g. via :prop_tgt:`CXX_STANDARD`) or implicitly by
  732. compile features. Each entry is a JSON object with two members:
  733. ``backtraces``
  734. Optional member that is present when a CMake language backtrace to
  735. the ``<LANG>_STANDARD`` setting is available. If the language
  736. standard was set implicitly by compile features those are used as
  737. the backtrace(s). It's possible for multiple compile features to
  738. require the same language standard so there could be multiple
  739. backtraces. The value is a JSON array with each entry being an
  740. unsigned integer 0-based index into the ``backtraceGraph``
  741. member's ``nodes`` array.
  742. ``standard``
  743. String representing the language standard.
  744. This field was added in codemodel version 2.2.
  745. ``compileCommandFragments``
  746. Optional member that is present when fragments of the compiler command
  747. line invocation are available. The value is a JSON array of entries
  748. specifying ordered fragments. Each entry is a JSON object with
  749. one member:
  750. ``fragment``
  751. A string specifying a fragment of the compile command line invocation.
  752. The value is encoded in the build system's native shell format.
  753. ``includes``
  754. Optional member that is present when there are include directories.
  755. The value is a JSON array with an entry for each directory. Each
  756. entry is a JSON object with members:
  757. ``path``
  758. A string specifying the path to the include directory,
  759. represented with forward slashes.
  760. ``isSystem``
  761. Optional member that is present with boolean value ``true`` if
  762. the include directory is marked as a system include directory.
  763. ``backtrace``
  764. Optional member that is present when a CMake language backtrace to
  765. the :command:`target_include_directories` or other command invocation
  766. that added this include directory is available. The value is
  767. an unsigned integer 0-based index into the ``backtraceGraph``
  768. member's ``nodes`` array.
  769. ``precompileHeaders``
  770. Optional member that is present when :command:`target_precompile_headers`
  771. or other command invocations set :prop_tgt:`PRECOMPILE_HEADERS` on the
  772. target. The value is a JSON array with an entry for each header. Each
  773. entry is a JSON object with members:
  774. ``header``
  775. Full path to the precompile header file.
  776. ``backtrace``
  777. Optional member that is present when a CMake language backtrace to
  778. the :command:`target_precompile_headers` or other command invocation
  779. that added this precompiled header is available. The value is an
  780. unsigned integer 0-based index into the ``backtraceGraph`` member's
  781. ``nodes`` array.
  782. This field was added in codemodel version 2.1.
  783. ``defines``
  784. Optional member that is present when there are preprocessor definitions.
  785. The value is a JSON array with an entry for each definition. Each
  786. entry is a JSON object with members:
  787. ``define``
  788. A string specifying the preprocessor definition in the format
  789. ``<name>[=<value>]``, e.g. ``DEF`` or ``DEF=1``.
  790. ``backtrace``
  791. Optional member that is present when a CMake language backtrace to
  792. the :command:`target_compile_definitions` or other command invocation
  793. that added this preprocessor definition is available. The value is
  794. an unsigned integer 0-based index into the ``backtraceGraph``
  795. member's ``nodes`` array.
  796. ``sysroot``
  797. Optional member that is present when the
  798. :variable:`CMAKE_SYSROOT_COMPILE` or :variable:`CMAKE_SYSROOT`
  799. variable is defined. The value is a JSON object with one member:
  800. ``path``
  801. A string specifying the absolute path to the sysroot, represented
  802. with forward slashes.
  803. ``backtraceGraph``
  804. A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
  805. from ``backtrace`` members elsewhere in this "target" object.
  806. "codemodel" version 2 "backtrace graph"
  807. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  808. The ``backtraceGraph`` member of a `"codemodel" version 2 "target" object`_
  809. is a JSON object describing a graph of backtraces. Its nodes are referenced
  810. from ``backtrace`` members elsewhere in the containing object.
  811. The backtrace graph object members are:
  812. ``nodes``
  813. A JSON array listing nodes in the backtrace graph. Each entry
  814. is a JSON object with members:
  815. ``file``
  816. An unsigned integer 0-based index into the backtrace ``files`` array.
  817. ``line``
  818. An optional member present when the node represents a line within
  819. the file. The value is an unsigned integer 1-based line number.
  820. ``command``
  821. An optional member present when the node represents a command
  822. invocation within the file. The value is an unsigned integer
  823. 0-based index into the backtrace ``commands`` array.
  824. ``parent``
  825. An optional member present when the node is not the bottom of
  826. the call stack. The value is an unsigned integer 0-based index
  827. of another entry in the backtrace ``nodes`` array.
  828. ``commands``
  829. A JSON array listing command names referenced by backtrace nodes.
  830. Each entry is a string specifying a command name.
  831. ``files``
  832. A JSON array listing CMake language files referenced by backtrace nodes.
  833. Each entry is a string specifying the path to a file, represented
  834. with forward slashes. If the file is inside the top-level source
  835. directory then the path is specified relative to that directory.
  836. Otherwise the path is absolute.
  837. Object Kind "cache"
  838. -------------------
  839. The ``cache`` object kind lists cache entries. These are the
  840. :ref:`CMake Language Variables` stored in the persistent cache
  841. (``CMakeCache.txt``) for the build tree.
  842. There is only one ``cache`` object major version, version 2.
  843. Version 1 does not exist to avoid confusion with that from
  844. :manual:`cmake-server(7)` mode.
  845. "cache" version 2
  846. ^^^^^^^^^^^^^^^^^
  847. ``cache`` object version 2 is a JSON object:
  848. .. code-block:: json
  849. {
  850. "kind": "cache",
  851. "version": { "major": 2, "minor": 0 },
  852. "entries": [
  853. {
  854. "name": "BUILD_SHARED_LIBS",
  855. "value": "ON",
  856. "type": "BOOL",
  857. "properties": [
  858. {
  859. "name": "HELPSTRING",
  860. "value": "Build shared libraries"
  861. }
  862. ]
  863. },
  864. {
  865. "name": "CMAKE_GENERATOR",
  866. "value": "Unix Makefiles",
  867. "type": "INTERNAL",
  868. "properties": [
  869. {
  870. "name": "HELPSTRING",
  871. "value": "Name of generator."
  872. }
  873. ]
  874. }
  875. ]
  876. }
  877. The members specific to ``cache`` objects are:
  878. ``entries``
  879. A JSON array whose entries are each a JSON object specifying a
  880. cache entry. The members of each entry are:
  881. ``name``
  882. A string specifying the name of the entry.
  883. ``value``
  884. A string specifying the value of the entry.
  885. ``type``
  886. A string specifying the type of the entry used by
  887. :manual:`cmake-gui(1)` to choose a widget for editing.
  888. ``properties``
  889. A JSON array of entries specifying associated
  890. :ref:`cache entry properties <Cache Entry Properties>`.
  891. Each entry is a JSON object containing members:
  892. ``name``
  893. A string specifying the name of the cache entry property.
  894. ``value``
  895. A string specifying the value of the cache entry property.
  896. Object Kind "cmakeFiles"
  897. ------------------------
  898. The ``cmakeFiles`` object kind lists files used by CMake while
  899. configuring and generating the build system. These include the
  900. ``CMakeLists.txt`` files as well as included ``.cmake`` files.
  901. There is only one ``cmakeFiles`` object major version, version 1.
  902. "cmakeFiles" version 1
  903. ^^^^^^^^^^^^^^^^^^^^^^
  904. ``cmakeFiles`` object version 1 is a JSON object:
  905. .. code-block:: json
  906. {
  907. "kind": "cmakeFiles",
  908. "version": { "major": 1, "minor": 0 },
  909. "paths": {
  910. "build": "/path/to/top-level-build-dir",
  911. "source": "/path/to/top-level-source-dir"
  912. },
  913. "inputs": [
  914. {
  915. "path": "CMakeLists.txt"
  916. },
  917. {
  918. "isGenerated": true,
  919. "path": "/path/to/top-level-build-dir/.../CMakeSystem.cmake"
  920. },
  921. {
  922. "isExternal": true,
  923. "path": "/path/to/external/third-party/module.cmake"
  924. },
  925. {
  926. "isCMake": true,
  927. "isExternal": true,
  928. "path": "/path/to/cmake/Modules/CMakeGenericSystem.cmake"
  929. }
  930. ]
  931. }
  932. The members specific to ``cmakeFiles`` objects are:
  933. ``paths``
  934. A JSON object containing members:
  935. ``source``
  936. A string specifying the absolute path to the top-level source directory,
  937. represented with forward slashes.
  938. ``build``
  939. A string specifying the absolute path to the top-level build directory,
  940. represented with forward slashes.
  941. ``inputs``
  942. A JSON array whose entries are each a JSON object specifying an input
  943. file used by CMake when configuring and generating the build system.
  944. The members of each entry are:
  945. ``path``
  946. A string specifying the path to an input file to CMake, represented
  947. with forward slashes. If the file is inside the top-level source
  948. directory then the path is specified relative to that directory.
  949. Otherwise the path is absolute.
  950. ``isGenerated``
  951. Optional member that is present with boolean value ``true``
  952. if the path specifies a file that is under the top-level
  953. build directory and the build is out-of-source.
  954. This member is not available on in-source builds.
  955. ``isExternal``
  956. Optional member that is present with boolean value ``true``
  957. if the path specifies a file that is not under the top-level
  958. source or build directories.
  959. ``isCMake``
  960. Optional member that is present with boolean value ``true``
  961. if the path specifies a file in the CMake installation.
  962. Object Kind "toolchains"
  963. ------------------------
  964. The ``toolchains`` object kind lists properties of the toolchains used during
  965. the build. These include the language, compiler path, ID, and version.
  966. There is only one ``toolchains`` object major version, version 1.
  967. "toolchains" version 1
  968. ^^^^^^^^^^^^^^^^^^^^^^
  969. ``toolchains`` object version 1 is a JSON object:
  970. .. code-block:: json
  971. {
  972. "kind": "toolchains",
  973. "version": { "major": 1, "minor": 0 },
  974. "toolchains": [
  975. {
  976. "language": "C",
  977. "compiler": {
  978. "path": "/usr/bin/cc",
  979. "id": "GNU",
  980. "version": "9.3.0",
  981. "implicit": {
  982. "includeDirectories": [
  983. "/usr/lib/gcc/x86_64-linux-gnu/9/include",
  984. "/usr/local/include",
  985. "/usr/include/x86_64-linux-gnu",
  986. "/usr/include"
  987. ],
  988. "linkDirectories": [
  989. "/usr/lib/gcc/x86_64-linux-gnu/9",
  990. "/usr/lib/x86_64-linux-gnu",
  991. "/usr/lib",
  992. "/lib/x86_64-linux-gnu",
  993. "/lib"
  994. ],
  995. "linkFrameworkDirectories": [],
  996. "linkLibraries": [ "gcc", "gcc_s", "c", "gcc", "gcc_s" ]
  997. }
  998. },
  999. "sourceFileExtensions": [ "c", "m" ]
  1000. },
  1001. {
  1002. "language": "CXX",
  1003. "compiler": {
  1004. "path": "/usr/bin/c++",
  1005. "id": "GNU",
  1006. "version": "9.3.0",
  1007. "implicit": {
  1008. "includeDirectories": [
  1009. "/usr/include/c++/9",
  1010. "/usr/include/x86_64-linux-gnu/c++/9",
  1011. "/usr/include/c++/9/backward",
  1012. "/usr/lib/gcc/x86_64-linux-gnu/9/include",
  1013. "/usr/local/include",
  1014. "/usr/include/x86_64-linux-gnu",
  1015. "/usr/include"
  1016. ],
  1017. "linkDirectories": [
  1018. "/usr/lib/gcc/x86_64-linux-gnu/9",
  1019. "/usr/lib/x86_64-linux-gnu",
  1020. "/usr/lib",
  1021. "/lib/x86_64-linux-gnu",
  1022. "/lib"
  1023. ],
  1024. "linkFrameworkDirectories": [],
  1025. "linkLibraries": [
  1026. "stdc++", "m", "gcc_s", "gcc", "c", "gcc_s", "gcc"
  1027. ]
  1028. }
  1029. },
  1030. "sourceFileExtensions": [
  1031. "C", "M", "c++", "cc", "cpp", "cxx", "mm", "CPP"
  1032. ]
  1033. }
  1034. ]
  1035. }
  1036. The members specific to ``toolchains`` objects are:
  1037. ``toolchains``
  1038. A JSON array whose entries are each a JSON object specifying a toolchain
  1039. associated with a particular language. The members of each entry are:
  1040. ``language``
  1041. A JSON string specifying the toolchain language, like C or CXX. Language
  1042. names are the same as langauge names that can be passed to the
  1043. :command:`project` command. Because CMake only supports a single toolchain
  1044. per language, this field can be used as a key.
  1045. ``compiler``
  1046. A JSON object containing members:
  1047. ``path``
  1048. Optional member that is present when the
  1049. :variable:`CMAKE_<LANG>_COMPILER` variable is defined for the current
  1050. language. Its value is a JSON string holding the path to the compiler.
  1051. ``id``
  1052. Optional member that is present when the
  1053. :variable:`CMAKE_<LANG>_COMPILER_ID` variable is defined for the current
  1054. language. Its value is a JSON string holding the ID (GNU, MSVC, etc.) of
  1055. the compiler.
  1056. ``version``
  1057. Optional member that is present when the
  1058. :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable is defined for the
  1059. current language. Its value is a JSON string holding the version of the
  1060. compiler.
  1061. ``target``
  1062. Optional member that is present when the
  1063. :variable:`CMAKE_<LANG>_COMPILER_TARGET` variable is defined for the
  1064. current language. Its value is a JSON string holding the cross-compiling
  1065. target of the compiler.
  1066. ``implicit``
  1067. A JSON object containing members:
  1068. ``includeDirectories``
  1069. Optional member that is present when the
  1070. :variable:`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variable is
  1071. defined for the current language. Its value is a JSON array of JSON
  1072. strings where each string holds a path to an implicit include
  1073. directory for the compiler.
  1074. ``linkDirectories``
  1075. Optional member that is present when the
  1076. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES` variable is
  1077. defined for the current language. Its value is a JSON array of JSON
  1078. strings where each string holds a path to an implicit link directory
  1079. for the compiler.
  1080. ``linkFrameworkDirectories``
  1081. Optional member that is present when the
  1082. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES` variable
  1083. is defined for the current language. Its value is a JSON array of JSON
  1084. strings where each string holds a path to an implicit link framework
  1085. directory for the compiler.
  1086. ``linkLibraries``
  1087. Optional member that is present when the
  1088. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES` variable is defined
  1089. for the current language. Its value is a JSON array of JSON strings
  1090. where each string holds a path to an implicit link library for the
  1091. compiler.
  1092. ``sourceFileExtensions``
  1093. Optional member that is present when the
  1094. :variable:`CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS` variable is defined for
  1095. the current language. Its value is a JSON array of JSON strings where each
  1096. each string holds a file extension (without the leading dot) for the
  1097. language.