cmake-file-api.7.rst 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358
  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. ``backtraceGraph``
  544. A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
  545. from ``backtrace`` members elsewhere in this "directory" object.
  546. "codemodel" version 2 "target" object
  547. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  548. A codemodel "target" object is referenced by a `"codemodel" version 2`_
  549. object's ``targets`` array. Each "target" object is a JSON object
  550. with members:
  551. ``name``
  552. A string specifying the logical name of the target.
  553. ``id``
  554. A string uniquely identifying the target. The format is unspecified
  555. and should not be interpreted by clients.
  556. ``type``
  557. A string specifying the type of the target. The value is one of
  558. ``EXECUTABLE``, ``STATIC_LIBRARY``, ``SHARED_LIBRARY``,
  559. ``MODULE_LIBRARY``, ``OBJECT_LIBRARY``, ``INTERFACE_LIBRARY``,
  560. or ``UTILITY``.
  561. ``backtrace``
  562. Optional member that is present when a CMake language backtrace to
  563. the command in the source code that created the target is available.
  564. The value is an unsigned integer 0-based index into the
  565. ``backtraceGraph`` member's ``nodes`` array.
  566. ``folder``
  567. Optional member that is present when the :prop_tgt:`FOLDER` target
  568. property is set. The value is a JSON object with one member:
  569. ``name``
  570. A string specifying the name of the target folder.
  571. ``paths``
  572. A JSON object containing members:
  573. ``source``
  574. A string specifying the path to the target's source directory,
  575. represented with forward slashes. If the directory is inside the
  576. top-level source directory then the path is specified relative to
  577. that directory (with ``.`` for the top-level source directory itself).
  578. Otherwise the path is absolute.
  579. ``build``
  580. A string specifying the path to the target's build directory,
  581. represented with forward slashes. If the directory is inside the
  582. top-level build directory then the path is specified relative to
  583. that directory (with ``.`` for the top-level build directory itself).
  584. Otherwise the path is absolute.
  585. ``nameOnDisk``
  586. Optional member that is present for executable and library targets
  587. that are linked or archived into a single primary artifact.
  588. The value is a string specifying the file name of that artifact on disk.
  589. ``artifacts``
  590. Optional member that is present for executable and library targets
  591. that produce artifacts on disk meant for consumption by dependents.
  592. The value is a JSON array of entries corresponding to the artifacts.
  593. Each entry is a JSON object containing one member:
  594. ``path``
  595. A string specifying the path to the file on disk, represented with
  596. forward slashes. If the file is inside the top-level build directory
  597. then the path is specified relative to that directory.
  598. Otherwise the path is absolute.
  599. ``isGeneratorProvided``
  600. Optional member that is present with boolean value ``true`` if the
  601. target is provided by CMake's build system generator rather than by
  602. a command in the source code.
  603. ``install``
  604. Optional member that is present when the target has an :command:`install`
  605. rule. The value is a JSON object with members:
  606. ``prefix``
  607. A JSON object specifying the installation prefix. It has one member:
  608. ``path``
  609. A string specifying the value of :variable:`CMAKE_INSTALL_PREFIX`.
  610. ``destinations``
  611. A JSON array of entries specifying an install destination path.
  612. Each entry is a JSON object with members:
  613. ``path``
  614. A string specifying the install destination path. The path may
  615. be absolute or relative to the install prefix.
  616. ``backtrace``
  617. Optional member that is present when a CMake language backtrace to
  618. the :command:`install` command invocation that specified this
  619. destination is available. The value is an unsigned integer 0-based
  620. index into the ``backtraceGraph`` member's ``nodes`` array.
  621. ``link``
  622. Optional member that is present for executables and shared library
  623. targets that link into a runtime binary. The value is a JSON object
  624. with members describing the link step:
  625. ``language``
  626. A string specifying the language (e.g. ``C``, ``CXX``, ``Fortran``)
  627. of the toolchain is used to invoke the linker.
  628. ``commandFragments``
  629. Optional member that is present when fragments of the link command
  630. line invocation are available. The value is a JSON array of entries
  631. specifying ordered fragments. Each entry is a JSON object with members:
  632. ``fragment``
  633. A string specifying a fragment of the link command line invocation.
  634. The value is encoded in the build system's native shell format.
  635. ``role``
  636. A string specifying the role of the fragment's content:
  637. * ``flags``: link flags.
  638. * ``libraries``: link library file paths or flags.
  639. * ``libraryPath``: library search path flags.
  640. * ``frameworkPath``: macOS framework search path flags.
  641. ``lto``
  642. Optional member that is present with boolean value ``true``
  643. when link-time optimization (a.k.a. interprocedural optimization
  644. or link-time code generation) is enabled.
  645. ``sysroot``
  646. Optional member that is present when the :variable:`CMAKE_SYSROOT_LINK`
  647. or :variable:`CMAKE_SYSROOT` variable is defined. The value is a
  648. JSON object with one member:
  649. ``path``
  650. A string specifying the absolute path to the sysroot, represented
  651. with forward slashes.
  652. ``archive``
  653. Optional member that is present for static library targets. The value
  654. is a JSON object with members describing the archive step:
  655. ``commandFragments``
  656. Optional member that is present when fragments of the archiver command
  657. line invocation are available. The value is a JSON array of entries
  658. specifying the fragments. Each entry is a JSON object with members:
  659. ``fragment``
  660. A string specifying a fragment of the archiver command line invocation.
  661. The value is encoded in the build system's native shell format.
  662. ``role``
  663. A string specifying the role of the fragment's content:
  664. * ``flags``: archiver flags.
  665. ``lto``
  666. Optional member that is present with boolean value ``true``
  667. when link-time optimization (a.k.a. interprocedural optimization
  668. or link-time code generation) is enabled.
  669. ``dependencies``
  670. Optional member that is present when the target depends on other targets.
  671. The value is a JSON array of entries corresponding to the dependencies.
  672. Each entry is a JSON object with members:
  673. ``id``
  674. A string uniquely identifying the target on which this target depends.
  675. This matches the main ``id`` member of the other target.
  676. ``backtrace``
  677. Optional member that is present when a CMake language backtrace to
  678. the :command:`add_dependencies`, :command:`target_link_libraries`,
  679. or other command invocation that created this dependency is
  680. available. The value is an unsigned integer 0-based index into
  681. the ``backtraceGraph`` member's ``nodes`` array.
  682. ``sources``
  683. A JSON array of entries corresponding to the target's source files.
  684. Each entry is a JSON object with members:
  685. ``path``
  686. A string specifying the path to the source file on disk, represented
  687. with forward slashes. If the file is inside the top-level source
  688. directory then the path is specified relative to that directory.
  689. Otherwise the path is absolute.
  690. ``compileGroupIndex``
  691. Optional member that is present when the source is compiled.
  692. The value is an unsigned integer 0-based index into the
  693. ``compileGroups`` array.
  694. ``sourceGroupIndex``
  695. Optional member that is present when the source is part of a source
  696. group either via the :command:`source_group` command or by default.
  697. The value is an unsigned integer 0-based index into the
  698. ``sourceGroups`` array.
  699. ``isGenerated``
  700. Optional member that is present with boolean value ``true`` if
  701. the source is :prop_sf:`GENERATED`.
  702. ``backtrace``
  703. Optional member that is present when a CMake language backtrace to
  704. the :command:`target_sources`, :command:`add_executable`,
  705. :command:`add_library`, :command:`add_custom_target`, or other
  706. command invocation that added this source to the target is
  707. available. The value is an unsigned integer 0-based index into
  708. the ``backtraceGraph`` member's ``nodes`` array.
  709. ``sourceGroups``
  710. Optional member that is present when sources are grouped together by
  711. the :command:`source_group` command or by default. The value is a
  712. JSON array of entries corresponding to the groups. Each entry is
  713. a JSON object with members:
  714. ``name``
  715. A string specifying the name of the source group.
  716. ``sourceIndexes``
  717. A JSON array listing the sources belonging to the group.
  718. Each entry is an unsigned integer 0-based index into the
  719. main ``sources`` array for the target.
  720. ``compileGroups``
  721. Optional member that is present when the target has sources that compile.
  722. The value is a JSON array of entries corresponding to groups of sources
  723. that all compile with the same settings. Each entry is a JSON object
  724. with members:
  725. ``sourceIndexes``
  726. A JSON array listing the sources belonging to the group.
  727. Each entry is an unsigned integer 0-based index into the
  728. main ``sources`` array for the target.
  729. ``language``
  730. A string specifying the language (e.g. ``C``, ``CXX``, ``Fortran``)
  731. of the toolchain is used to compile the source file.
  732. ``languageStandard``
  733. Optional member that is present when the language standard is set
  734. explicitly (e.g. via :prop_tgt:`CXX_STANDARD`) or implicitly by
  735. compile features. Each entry is a JSON object with two members:
  736. ``backtraces``
  737. Optional member that is present when a CMake language backtrace to
  738. the ``<LANG>_STANDARD`` setting is available. If the language
  739. standard was set implicitly by compile features those are used as
  740. the backtrace(s). It's possible for multiple compile features to
  741. require the same language standard so there could be multiple
  742. backtraces. The value is a JSON array with each entry being an
  743. unsigned integer 0-based index into the ``backtraceGraph``
  744. member's ``nodes`` array.
  745. ``standard``
  746. String representing the language standard.
  747. This field was added in codemodel version 2.2.
  748. ``compileCommandFragments``
  749. Optional member that is present when fragments of the compiler command
  750. line invocation are available. The value is a JSON array of entries
  751. specifying ordered fragments. Each entry is a JSON object with
  752. one member:
  753. ``fragment``
  754. A string specifying a fragment of the compile command line invocation.
  755. The value is encoded in the build system's native shell format.
  756. ``includes``
  757. Optional member that is present when there are include directories.
  758. The value is a JSON array with an entry for each directory. Each
  759. entry is a JSON object with members:
  760. ``path``
  761. A string specifying the path to the include directory,
  762. represented with forward slashes.
  763. ``isSystem``
  764. Optional member that is present with boolean value ``true`` if
  765. the include directory is marked as a system include directory.
  766. ``backtrace``
  767. Optional member that is present when a CMake language backtrace to
  768. the :command:`target_include_directories` or other command invocation
  769. that added this include directory is available. The value is
  770. an unsigned integer 0-based index into the ``backtraceGraph``
  771. member's ``nodes`` array.
  772. ``precompileHeaders``
  773. Optional member that is present when :command:`target_precompile_headers`
  774. or other command invocations set :prop_tgt:`PRECOMPILE_HEADERS` on the
  775. target. The value is a JSON array with an entry for each header. Each
  776. entry is a JSON object with members:
  777. ``header``
  778. Full path to the precompile header file.
  779. ``backtrace``
  780. Optional member that is present when a CMake language backtrace to
  781. the :command:`target_precompile_headers` or other command invocation
  782. that added this precompiled header is available. The value is an
  783. unsigned integer 0-based index into the ``backtraceGraph`` member's
  784. ``nodes`` array.
  785. This field was added in codemodel version 2.1.
  786. ``defines``
  787. Optional member that is present when there are preprocessor definitions.
  788. The value is a JSON array with an entry for each definition. Each
  789. entry is a JSON object with members:
  790. ``define``
  791. A string specifying the preprocessor definition in the format
  792. ``<name>[=<value>]``, e.g. ``DEF`` or ``DEF=1``.
  793. ``backtrace``
  794. Optional member that is present when a CMake language backtrace to
  795. the :command:`target_compile_definitions` or other command invocation
  796. that added this preprocessor definition is available. The value is
  797. an unsigned integer 0-based index into the ``backtraceGraph``
  798. member's ``nodes`` array.
  799. ``sysroot``
  800. Optional member that is present when the
  801. :variable:`CMAKE_SYSROOT_COMPILE` or :variable:`CMAKE_SYSROOT`
  802. variable is defined. The value is a JSON object with one member:
  803. ``path``
  804. A string specifying the absolute path to the sysroot, represented
  805. with forward slashes.
  806. ``backtraceGraph``
  807. A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
  808. from ``backtrace`` members elsewhere in this "target" object.
  809. "codemodel" version 2 "backtrace graph"
  810. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  811. The ``backtraceGraph`` member of a `"codemodel" version 2 "directory" object`_,
  812. or `"codemodel" version 2 "target" object`_ is a JSON object describing a
  813. graph of backtraces. Its nodes are referenced from ``backtrace`` members
  814. elsewhere in the containing object. The backtrace graph object members are:
  815. ``nodes``
  816. A JSON array listing nodes in the backtrace graph. Each entry
  817. is a JSON object with members:
  818. ``file``
  819. An unsigned integer 0-based index into the backtrace ``files`` array.
  820. ``line``
  821. An optional member present when the node represents a line within
  822. the file. The value is an unsigned integer 1-based line number.
  823. ``command``
  824. An optional member present when the node represents a command
  825. invocation within the file. The value is an unsigned integer
  826. 0-based index into the backtrace ``commands`` array.
  827. ``parent``
  828. An optional member present when the node is not the bottom of
  829. the call stack. The value is an unsigned integer 0-based index
  830. of another entry in the backtrace ``nodes`` array.
  831. ``commands``
  832. A JSON array listing command names referenced by backtrace nodes.
  833. Each entry is a string specifying a command name.
  834. ``files``
  835. A JSON array listing CMake language files referenced by backtrace nodes.
  836. Each entry is a string specifying the path to a file, represented
  837. with forward slashes. If the file is inside the top-level source
  838. directory then the path is specified relative to that directory.
  839. Otherwise the path is absolute.
  840. Object Kind "cache"
  841. -------------------
  842. The ``cache`` object kind lists cache entries. These are the
  843. :ref:`CMake Language Variables` stored in the persistent cache
  844. (``CMakeCache.txt``) for the build tree.
  845. There is only one ``cache`` object major version, version 2.
  846. Version 1 does not exist to avoid confusion with that from
  847. :manual:`cmake-server(7)` mode.
  848. "cache" version 2
  849. ^^^^^^^^^^^^^^^^^
  850. ``cache`` object version 2 is a JSON object:
  851. .. code-block:: json
  852. {
  853. "kind": "cache",
  854. "version": { "major": 2, "minor": 0 },
  855. "entries": [
  856. {
  857. "name": "BUILD_SHARED_LIBS",
  858. "value": "ON",
  859. "type": "BOOL",
  860. "properties": [
  861. {
  862. "name": "HELPSTRING",
  863. "value": "Build shared libraries"
  864. }
  865. ]
  866. },
  867. {
  868. "name": "CMAKE_GENERATOR",
  869. "value": "Unix Makefiles",
  870. "type": "INTERNAL",
  871. "properties": [
  872. {
  873. "name": "HELPSTRING",
  874. "value": "Name of generator."
  875. }
  876. ]
  877. }
  878. ]
  879. }
  880. The members specific to ``cache`` objects are:
  881. ``entries``
  882. A JSON array whose entries are each a JSON object specifying a
  883. cache entry. The members of each entry are:
  884. ``name``
  885. A string specifying the name of the entry.
  886. ``value``
  887. A string specifying the value of the entry.
  888. ``type``
  889. A string specifying the type of the entry used by
  890. :manual:`cmake-gui(1)` to choose a widget for editing.
  891. ``properties``
  892. A JSON array of entries specifying associated
  893. :ref:`cache entry properties <Cache Entry Properties>`.
  894. Each entry is a JSON object containing members:
  895. ``name``
  896. A string specifying the name of the cache entry property.
  897. ``value``
  898. A string specifying the value of the cache entry property.
  899. Object Kind "cmakeFiles"
  900. ------------------------
  901. The ``cmakeFiles`` object kind lists files used by CMake while
  902. configuring and generating the build system. These include the
  903. ``CMakeLists.txt`` files as well as included ``.cmake`` files.
  904. There is only one ``cmakeFiles`` object major version, version 1.
  905. "cmakeFiles" version 1
  906. ^^^^^^^^^^^^^^^^^^^^^^
  907. ``cmakeFiles`` object version 1 is a JSON object:
  908. .. code-block:: json
  909. {
  910. "kind": "cmakeFiles",
  911. "version": { "major": 1, "minor": 0 },
  912. "paths": {
  913. "build": "/path/to/top-level-build-dir",
  914. "source": "/path/to/top-level-source-dir"
  915. },
  916. "inputs": [
  917. {
  918. "path": "CMakeLists.txt"
  919. },
  920. {
  921. "isGenerated": true,
  922. "path": "/path/to/top-level-build-dir/.../CMakeSystem.cmake"
  923. },
  924. {
  925. "isExternal": true,
  926. "path": "/path/to/external/third-party/module.cmake"
  927. },
  928. {
  929. "isCMake": true,
  930. "isExternal": true,
  931. "path": "/path/to/cmake/Modules/CMakeGenericSystem.cmake"
  932. }
  933. ]
  934. }
  935. The members specific to ``cmakeFiles`` objects are:
  936. ``paths``
  937. A JSON object containing members:
  938. ``source``
  939. A string specifying the absolute path to the top-level source directory,
  940. represented with forward slashes.
  941. ``build``
  942. A string specifying the absolute path to the top-level build directory,
  943. represented with forward slashes.
  944. ``inputs``
  945. A JSON array whose entries are each a JSON object specifying an input
  946. file used by CMake when configuring and generating the build system.
  947. The members of each entry are:
  948. ``path``
  949. A string specifying the path to an input file to CMake, represented
  950. with forward slashes. If the file is inside the top-level source
  951. directory then the path is specified relative to that directory.
  952. Otherwise the path is absolute.
  953. ``isGenerated``
  954. Optional member that is present with boolean value ``true``
  955. if the path specifies a file that is under the top-level
  956. build directory and the build is out-of-source.
  957. This member is not available on in-source builds.
  958. ``isExternal``
  959. Optional member that is present with boolean value ``true``
  960. if the path specifies a file that is not under the top-level
  961. source or build directories.
  962. ``isCMake``
  963. Optional member that is present with boolean value ``true``
  964. if the path specifies a file in the CMake installation.
  965. Object Kind "toolchains"
  966. ------------------------
  967. The ``toolchains`` object kind lists properties of the toolchains used during
  968. the build. These include the language, compiler path, ID, and version.
  969. There is only one ``toolchains`` object major version, version 1.
  970. "toolchains" version 1
  971. ^^^^^^^^^^^^^^^^^^^^^^
  972. ``toolchains`` object version 1 is a JSON object:
  973. .. code-block:: json
  974. {
  975. "kind": "toolchains",
  976. "version": { "major": 1, "minor": 0 },
  977. "toolchains": [
  978. {
  979. "language": "C",
  980. "compiler": {
  981. "path": "/usr/bin/cc",
  982. "id": "GNU",
  983. "version": "9.3.0",
  984. "implicit": {
  985. "includeDirectories": [
  986. "/usr/lib/gcc/x86_64-linux-gnu/9/include",
  987. "/usr/local/include",
  988. "/usr/include/x86_64-linux-gnu",
  989. "/usr/include"
  990. ],
  991. "linkDirectories": [
  992. "/usr/lib/gcc/x86_64-linux-gnu/9",
  993. "/usr/lib/x86_64-linux-gnu",
  994. "/usr/lib",
  995. "/lib/x86_64-linux-gnu",
  996. "/lib"
  997. ],
  998. "linkFrameworkDirectories": [],
  999. "linkLibraries": [ "gcc", "gcc_s", "c", "gcc", "gcc_s" ]
  1000. }
  1001. },
  1002. "sourceFileExtensions": [ "c", "m" ]
  1003. },
  1004. {
  1005. "language": "CXX",
  1006. "compiler": {
  1007. "path": "/usr/bin/c++",
  1008. "id": "GNU",
  1009. "version": "9.3.0",
  1010. "implicit": {
  1011. "includeDirectories": [
  1012. "/usr/include/c++/9",
  1013. "/usr/include/x86_64-linux-gnu/c++/9",
  1014. "/usr/include/c++/9/backward",
  1015. "/usr/lib/gcc/x86_64-linux-gnu/9/include",
  1016. "/usr/local/include",
  1017. "/usr/include/x86_64-linux-gnu",
  1018. "/usr/include"
  1019. ],
  1020. "linkDirectories": [
  1021. "/usr/lib/gcc/x86_64-linux-gnu/9",
  1022. "/usr/lib/x86_64-linux-gnu",
  1023. "/usr/lib",
  1024. "/lib/x86_64-linux-gnu",
  1025. "/lib"
  1026. ],
  1027. "linkFrameworkDirectories": [],
  1028. "linkLibraries": [
  1029. "stdc++", "m", "gcc_s", "gcc", "c", "gcc_s", "gcc"
  1030. ]
  1031. }
  1032. },
  1033. "sourceFileExtensions": [
  1034. "C", "M", "c++", "cc", "cpp", "cxx", "mm", "CPP"
  1035. ]
  1036. }
  1037. ]
  1038. }
  1039. The members specific to ``toolchains`` objects are:
  1040. ``toolchains``
  1041. A JSON array whose entries are each a JSON object specifying a toolchain
  1042. associated with a particular language. The members of each entry are:
  1043. ``language``
  1044. A JSON string specifying the toolchain language, like C or CXX. Language
  1045. names are the same as langauge names that can be passed to the
  1046. :command:`project` command. Because CMake only supports a single toolchain
  1047. per language, this field can be used as a key.
  1048. ``compiler``
  1049. A JSON object containing members:
  1050. ``path``
  1051. Optional member that is present when the
  1052. :variable:`CMAKE_<LANG>_COMPILER` variable is defined for the current
  1053. language. Its value is a JSON string holding the path to the compiler.
  1054. ``id``
  1055. Optional member that is present when the
  1056. :variable:`CMAKE_<LANG>_COMPILER_ID` variable is defined for the current
  1057. language. Its value is a JSON string holding the ID (GNU, MSVC, etc.) of
  1058. the compiler.
  1059. ``version``
  1060. Optional member that is present when the
  1061. :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable is defined for the
  1062. current language. Its value is a JSON string holding the version of the
  1063. compiler.
  1064. ``target``
  1065. Optional member that is present when the
  1066. :variable:`CMAKE_<LANG>_COMPILER_TARGET` variable is defined for the
  1067. current language. Its value is a JSON string holding the cross-compiling
  1068. target of the compiler.
  1069. ``implicit``
  1070. A JSON object containing members:
  1071. ``includeDirectories``
  1072. Optional member that is present when the
  1073. :variable:`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variable is
  1074. defined for the current language. Its value is a JSON array of JSON
  1075. strings where each string holds a path to an implicit include
  1076. directory for the compiler.
  1077. ``linkDirectories``
  1078. Optional member that is present when the
  1079. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES` variable is
  1080. defined for the current language. Its value is a JSON array of JSON
  1081. strings where each string holds a path to an implicit link directory
  1082. for the compiler.
  1083. ``linkFrameworkDirectories``
  1084. Optional member that is present when the
  1085. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES` variable
  1086. is defined for the current language. Its value is a JSON array of JSON
  1087. strings where each string holds a path to an implicit link framework
  1088. directory for the compiler.
  1089. ``linkLibraries``
  1090. Optional member that is present when the
  1091. :variable:`CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES` variable is defined
  1092. for the current language. Its value is a JSON array of JSON strings
  1093. where each string holds a path to an implicit link library for the
  1094. compiler.
  1095. ``sourceFileExtensions``
  1096. Optional member that is present when the
  1097. :variable:`CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS` variable is defined for
  1098. the current language. Its value is a JSON array of JSON strings where each
  1099. each string holds a file extension (without the leading dot) for the
  1100. language.