1CMAKE-FILE-API(7)                    CMake                   CMAKE-FILE-API(7)
2
3
4

NAME

6       cmake-file-api - CMake File-Based API
7

INTRODUCTION

9       CMake  provides  a  file-based API that clients may use to get semantic
10       information about the buildsystems CMake generates.   Clients  may  use
11       the  API  by writing query files to a specific location in a build tree
12       to request zero  or  more  Object  Kinds.   When  CMake  generates  the
13       buildsystem  in  that build tree it will read the query files and write
14       reply files for the client to read.
15
16       The file-based API uses a <build>/.cmake/api/ directory at the top of a
17       build  tree.   The API is versioned to support changes to the layout of
18       files within the API directory.  API file layout versioning is orthogo‐
19       nal to the versioning of Object Kinds used in replies.  This version of
20       CMake supports only one API version, API v1.
21
22       New in version 3.27: Projects may also submit queries for  the  current
23       run using the cmake_file_api() command.
24
25

API V1

27       API  v1  is housed in the <build>/.cmake/api/v1/ directory.  It has the
28       following subdirectories:
29
30       query/ Holds query files written by clients.  These may  be  v1  Shared
31              Stateless  Query  Files,  v1 Client Stateless Query Files, or v1
32              Client Stateful Query Files.
33
34       reply/ Holds reply files written by CMake whenever it runs to  generate
35              a build system.  These are indexed by a v1 Reply Index File file
36              that may reference additional v1 Reply Files.   CMake  owns  all
37              reply files.  Clients must never remove them.
38
39              Clients  may  look  for and read a reply index file at any time.
40              Clients may optionally create the reply/ directory at  any  time
41              and monitor it for the appearance of a new reply index file.
42
43   v1 Shared Stateless Query Files
44       Shared  stateless query files allow clients to share requests for major
45       versions of the Object Kinds and get all requested versions  recognized
46       by the CMake that runs.
47
48       Clients  may  create  shared  requests  by  creating empty files in the
49       v1/query/ directory.  The form is:
50
51          <build>/.cmake/api/v1/query/<kind>-v<major>
52
53       where <kind> is one of the Object Kinds, -v is literal, and <major>  is
54       the major version number.
55
56       Files  of  this form are stateless shared queries not owned by any spe‐
57       cific client.  Once created they should not be removed without external
58       client coordination or human intervention.
59
60   v1 Client Stateless Query Files
61       Client stateless query files allow clients to create owned requests for
62       major versions of the Object Kinds and get all requested versions  rec‐
63       ognized by the CMake that runs.
64
65       Clients   may   create  owned  requests  by  creating  empty  files  in
66       client-specific query subdirectories.  The form is:
67
68          <build>/.cmake/api/v1/query/client-<client>/<kind>-v<major>
69
70       where client- is literal, <client> is a string uniquely identifying the
71       client,  <kind>  is one of the Object Kinds, -v is literal, and <major>
72       is the major version number.  Each client must choose a unique <client>
73       identifier via its own means.
74
75       Files  of this form are stateless queries owned by the client <client>.
76       The owning client may remove them at any time.
77
78   v1 Client Stateful Query Files
79       Stateful query files allow clients to request a  list  of  versions  of
80       each  of  the  Object Kinds and get only the most recent version recog‐
81       nized by the CMake that runs.
82
83       Clients may create owned stateful queries by creating query.json  files
84       in client-specific query subdirectories.  The form is:
85
86          <build>/.cmake/api/v1/query/client-<client>/query.json
87
88       where client- is literal, <client> is a string uniquely identifying the
89       client, and query.json is literal.  Each client must  choose  a  unique
90       <client> identifier via its own means.
91
92       query.json  files  are  stateful  queries owned by the client <client>.
93       The owning client may update or remove them at any time.  When a  given
94       client installation is updated it may then update the stateful query it
95       writes to build trees to request newer object versions.   This  can  be
96       used  to avoid asking CMake to generate multiple object versions unnec‐
97       essarily.
98
99       A query.json file must contain a JSON object:
100
101          {
102            "requests": [
103              { "kind": "<kind>" , "version": 1 },
104              { "kind": "<kind>" , "version": { "major": 1, "minor": 2 } },
105              { "kind": "<kind>" , "version": [2, 1] },
106              { "kind": "<kind>" , "version": [2, { "major": 1, "minor": 2 }] },
107              { "kind": "<kind>" , "version": 1, "client": {} },
108              { "kind": "..." }
109            ],
110            "client": {}
111          }
112
113       The members are:
114
115       requests
116              A JSON array containing zero or more requests.  Each request  is
117              a JSON object with members:
118
119              kind   Specifies  one  of the Object Kinds to be included in the
120                     reply.
121
122              version
123                     Indicates the version(s) of  the  object  kind  that  the
124                     client understands.  Versions have major and minor compo‐
125                     nents following semantic version conventions.  The  value
126                     must be
127
128                     • a  JSON  integer specifying a (non-negative) major ver‐
129                       sion number, or
130
131                     • a JSON object containing major and  (optionally)  minor
132                       members  specifying non-negative integer version compo‐
133                       nents, or
134
135                     • a JSON array whose elements are each one of the above.
136
137              client Optional member reserved for use  by  the  client.   This
138                     value is preserved in the reply written for the client in
139                     the  v1  Reply  Index  File  but  is  otherwise  ignored.
140                     Clients  may  use  this to pass custom information with a
141                     request through to its reply.
142
143              For each requested object kind CMake will choose the first  ver‐
144              sion  that it recognizes for that kind among those listed in the
145              request.  The response will use the selected major version  with
146              the  highest  minor  version known to the running CMake for that
147              major version.  Therefore clients should list all supported  ma‐
148              jor  versions  in  preferred  order along with the minimal minor
149              version required for each major version.
150
151       client Optional member reserved for use by the client.  This  value  is
152              preserved  in  the  reply written for the client in the v1 Reply
153              Index File but is otherwise ignored.  Clients may  use  this  to
154              pass custom information with a query through to its reply.
155
156       Other  query.json  top-level  members  are reserved for future use.  If
157       present they are ignored for forward compatibility.
158
159   v1 Reply Index File
160       CMake writes an index-*.json file to the v1/reply/  directory  whenever
161       it  runs to generate a build system.  Clients must read the reply index
162       file first and may read other v1 Reply Files only by  following  refer‐
163       ences.  The form of the reply index file name is:
164
165          <build>/.cmake/api/v1/reply/index-<unspecified>.json
166
167       where  index-  is  literal and <unspecified> is an unspecified name se‐
168       lected by CMake.  Whenever a new index file is generated it is given  a
169       new  name  and  any  old one is deleted.  During the short time between
170       these steps there may be multiple index files present; the one with the
171       largest name in lexicographic order is the current index file.
172
173       The reply index file contains a JSON object:
174
175          {
176            "cmake": {
177              "version": {
178                "major": 3, "minor": 14, "patch": 0, "suffix": "",
179                "string": "3.14.0", "isDirty": false
180              },
181              "paths": {
182                "cmake": "/prefix/bin/cmake",
183                "ctest": "/prefix/bin/ctest",
184                "cpack": "/prefix/bin/cpack",
185                "root": "/prefix/share/cmake-3.14"
186              },
187              "generator": {
188                "multiConfig": false,
189                "name": "Unix Makefiles"
190              }
191            },
192            "objects": [
193              { "kind": "<kind>",
194                "version": { "major": 1, "minor": 0 },
195                "jsonFile": "<file>" },
196              { "...": "..." }
197            ],
198            "reply": {
199              "<kind>-v<major>": { "kind": "<kind>",
200                                   "version": { "major": 1, "minor": 0 },
201                                   "jsonFile": "<file>" },
202              "<unknown>": { "error": "unknown query file" },
203              "...": {},
204              "client-<client>": {
205                "<kind>-v<major>": { "kind": "<kind>",
206                                     "version": { "major": 1, "minor": 0 },
207                                     "jsonFile": "<file>" },
208                "<unknown>": { "error": "unknown query file" },
209                "...": {},
210                "query.json": {
211                  "requests": [ {}, {}, {} ],
212                  "responses": [
213                    { "kind": "<kind>",
214                      "version": { "major": 1, "minor": 0 },
215                      "jsonFile": "<file>" },
216                    { "error": "unknown query file" },
217                    { "...": {} }
218                  ],
219                  "client": {}
220                }
221              }
222            }
223          }
224
225       The members are:
226
227       cmake  A JSON object containing information about the instance of CMake
228              that generated the reply.  It contains members:
229
230              version
231                     A JSON object specifying the version of CMake  with  mem‐
232                     bers:
233
234                     major, minor, patch
235                            Integer  values  specifying  the major, minor, and
236                            patch version components.
237
238                     suffix A string specifying the version  suffix,  if  any,
239                            e.g. g0abc3.
240
241                     string A string specifying the full version in the format
242                            <major>.<minor>.<patch>[-<suffix>].
243
244                     isDirty
245                            A boolean indicating whether the version was built
246                            from  a  version controlled source tree with local
247                            modifications.
248
249              paths  A JSON object specifying paths to things that  come  with
250                     CMake.   It has members for cmake, ctest, and cpack whose
251                     values are JSON strings specifying the absolute  path  to
252                     each tool, represented with forward slashes.  It also has
253                     a root member for the absolute path to the directory con‐
254                     taining  CMake resources like the Modules/ directory (see
255                     CMAKE_ROOT).
256
257              generator
258                     A JSON object describing the CMake generator used for the
259                     build.  It has members:
260
261                     multiConfig
262                            A  boolean  specifying  whether the generator sup‐
263                            ports multiple output configurations.
264
265                     name   A string specifying the name of the generator.
266
267                     platform
268                            If         the         generator          supports
269                            CMAKE_GENERATOR_PLATFORM,  this is a string speci‐
270                            fying the generator platform name.
271
272       objects
273              A JSON array listing all versions of all Object Kinds  generated
274              as  part of the reply.  Each array entry is a v1 Reply File Ref‐
275              erence.
276
277       reply  A JSON object mirroring the content of the query/ directory that
278              CMake loaded to produce the reply.  The members are of the form
279
280              <kind>-v<major>
281                     A  member  of this form appears for each of the v1 Shared
282                     Stateless Query Files that CMake recognized as a  request
283                     for  object  kind <kind> with major version <major>.  The
284                     value is a v1 Reply File Reference to  the  corresponding
285                     reply file for that object kind and version.
286
287              <unknown>
288                     A  member  of this form appears for each of the v1 Shared
289                     Stateless Query Files that CMake did not recognize.   The
290                     value  is  a  JSON object with a single error member con‐
291                     taining a string with an error  message  indicating  that
292                     the query file is unknown.
293
294              client-<client>
295                     A  member  of this form appears for each client-owned di‐
296                     rectory holding v1 Client  Stateless  Query  Files.   The
297                     value  is  a  JSON  object  mirroring  the content of the
298                     query/client-<client>/ directory.  The members are of the
299                     form:
300
301                     <kind>-v<major>
302                            A  member  of this form appears for each of the v1
303                            Client Stateless Query Files that CMake recognized
304                            as  a  request  for  object kind <kind> with major
305                            version <major>.  The value is  a  v1  Reply  File
306                            Reference to the corresponding reply file for that
307                            object kind and version.
308
309                     <unknown>
310                            A member of this form appears for each of  the  v1
311                            Client  Stateless  Query  Files that CMake did not
312                            recognize.  The value is a JSON object with a sin‐
313                            gle error member containing a string with an error
314                            message indicating that the query file is unknown.
315
316                     query.json
317                            This member appears for clients  using  v1  Client
318                            Stateful  Query  Files.   If  the  query.json file
319                            failed to read or parse as  a  JSON  object,  this
320                            member is a JSON object with a single error member
321                            containing a string with an error message.  Other‐
322                            wise,  this  member is a JSON object mirroring the
323                            content of the query.json file.  The members are:
324
325                            client A copy of the query.json file  client  mem‐
326                                   ber, if it exists.
327
328                            requests
329                                   A copy of the query.json file requests mem‐
330                                   ber, if it exists.
331
332                            responses
333                                   If the query.json file requests  member  is
334                                   missing  or  invalid, this member is a JSON
335                                   object with a single error member  contain‐
336                                   ing a string with an error message.  Other‐
337                                   wise, this member  contains  a  JSON  array
338                                   with  a  response for each entry of the re‐
339                                   quests array, in the same order.  Each  re‐
340                                   sponse is
341
342                                   • a  JSON object with a single error member
343                                     containing a string with  an  error  mes‐
344                                     sage, or
345
346                                   • a  v1  Reply File Reference to the corre‐
347                                     sponding reply file for the requested ob‐
348                                     ject kind and selected version.
349
350       After reading the reply index file, clients may read the other v1 Reply
351       Files it references.
352
353   v1 Reply File Reference
354       The reply index file represents each reference to  another  reply  file
355       using a JSON object with members:
356
357       kind   A string specifying one of the Object Kinds.
358
359       version
360              A  JSON  object  with members major and minor specifying integer
361              version components of the object kind.
362
363       jsonFile
364              A JSON string specifying a path relative to the reply index file
365              to another JSON file containing the object.
366
367   v1 Reply Files
368       Reply files containing specific Object Kinds are written by CMake.  The
369       names of these files are unspecified and must  not  be  interpreted  by
370       clients.   Clients  must  first read the v1 Reply Index File and follow
371       references to the names of the desired response objects.
372
373       Reply files (including the index file) will never be replaced by  files
374       of  the  same name but different content.  This allows a client to read
375       the files concurrently with a running CMake that may generate a new re‐
376       ply.   However,  after generating a new reply CMake will attempt to re‐
377       move reply files from previous runs that it did not just write.   If  a
378       client  attempts to read a reply file referenced by the index but finds
379       the file missing, that means a concurrent CMake has generated a new re‐
380       ply.   The client may simply start again by reading the new reply index
381       file.
382

OBJECT KINDS

384       The CMake file-based API reports semantic information about  the  build
385       system  using the following kinds of JSON objects.  Each kind of object
386       is versioned independently using semantic versioning with major and mi‐
387       nor components.  Every kind of object has the form:
388
389          {
390            "kind": "<kind>",
391            "version": { "major": 1, "minor": 0 },
392            "...": {}
393          }
394
395       The  kind member is a string specifying the object kind name.  The ver‐
396       sion member is a JSON object with major and  minor  members  specifying
397       integer  components of the object kind's version.  Additional top-level
398       members are specific to each object kind.
399
400   Object Kind "codemodel"
401       The codemodel object kind describes the build system structure as  mod‐
402       eled by CMake.
403
404       There is only one codemodel object major version, version 2.  Version 1
405       does not exist to avoid confusion with that from cmake-server(7) mode.
406
407   "codemodel" version 2
408       codemodel object version 2 is a JSON object:
409
410          {
411            "kind": "codemodel",
412            "version": { "major": 2, "minor": 6 },
413            "paths": {
414              "source": "/path/to/top-level-source-dir",
415              "build": "/path/to/top-level-build-dir"
416            },
417            "configurations": [
418              {
419                "name": "Debug",
420                "directories": [
421                  {
422                    "source": ".",
423                    "build": ".",
424                    "childIndexes": [ 1 ],
425                    "projectIndex": 0,
426                    "targetIndexes": [ 0 ],
427                    "hasInstallRule": true,
428                    "minimumCMakeVersion": {
429                      "string": "3.14"
430                    },
431                    "jsonFile": "<file>"
432                  },
433                  {
434                    "source": "sub",
435                    "build": "sub",
436                    "parentIndex": 0,
437                    "projectIndex": 0,
438                    "targetIndexes": [ 1 ],
439                    "minimumCMakeVersion": {
440                      "string": "3.14"
441                    },
442                    "jsonFile": "<file>"
443                  }
444                ],
445                "projects": [
446                  {
447                    "name": "MyProject",
448                    "directoryIndexes": [ 0, 1 ],
449                    "targetIndexes": [ 0, 1 ]
450                  }
451                ],
452                "targets": [
453                  {
454                    "name": "MyExecutable",
455                    "directoryIndex": 0,
456                    "projectIndex": 0,
457                    "jsonFile": "<file>"
458                  },
459                  {
460                    "name": "MyLibrary",
461                    "directoryIndex": 1,
462                    "projectIndex": 0,
463                    "jsonFile": "<file>"
464                  }
465                ]
466              }
467            ]
468          }
469
470       The members specific to codemodel objects are:
471
472       paths  A JSON object containing members:
473
474              source A string specifying the absolute path  to  the  top-level
475                     source directory, represented with forward slashes.
476
477              build  A  string  specifying  the absolute path to the top-level
478                     build directory, represented with forward slashes.
479
480       configurations
481              A JSON array of entries corresponding to available build config‐
482              urations.  On single-configuration generators there is one entry
483              for the value of the CMAKE_BUILD_TYPE variable.  For  multi-con‐
484              figuration  generators  there is an entry for each configuration
485              listed in the CMAKE_CONFIGURATION_TYPES variable.  Each entry is
486              a JSON object containing members:
487
488              name   A  string  specifying the name of the configuration, e.g.
489                     Debug.
490
491              directories
492                     A JSON array of entries each  corresponding  to  a  build
493                     system directory whose source directory contains a CMake‐
494                     Lists.txt file.   The  first  entry  corresponds  to  the
495                     top-level  directory.   Each  entry is a JSON object con‐
496                     taining members:
497
498                     source A string specifying the path to the source  direc‐
499                            tory,  represented  with  forward slashes.  If the
500                            directory is inside the top-level source directory
501                            then the path is specified relative to that direc‐
502                            tory (with . for the  top-level  source  directory
503                            itself).  Otherwise the path is absolute.
504
505                     build  A  string  specifying the path to the build direc‐
506                            tory, represented with forward  slashes.   If  the
507                            directory  is inside the top-level build directory
508                            then the path is specified relative to that direc‐
509                            tory (with . for the top-level build directory it‐
510                            self).  Otherwise the path is absolute.
511
512                     parentIndex
513                            Optional member that is present when the directory
514                            is  not top-level.  The value is an unsigned inte‐
515                            ger 0-based index of another entry in the main di‐
516                            rectories array that corresponds to the parent di‐
517                            rectory that added this directory as  a  subdirec‐
518                            tory.
519
520                     childIndexes
521                            Optional member that is present when the directory
522                            has subdirectories.  The value is a JSON array  of
523                            entries corresponding to child directories created
524                            by the add_subdirectory()  or  subdirs()  command.
525                            Each entry is an unsigned integer 0-based index of
526                            another entry in the main directories array.
527
528                     projectIndex
529                            An unsigned integer 0-based index  into  the  main
530                            projects array indicating the build system project
531                            to which the this directory belongs.
532
533                     targetIndexes
534                            Optional member that is present when the directory
535                            itself  has  targets, excluding those belonging to
536                            subdirectories.  The value is a JSON array of  en‐
537                            tries corresponding to the targets.  Each entry is
538                            an unsigned integer 0-based index  into  the  main
539                            targets array.
540
541                     minimumCMakeVersion
542                            Optional  member  present  when a minimum required
543                            version of CMake is known for the directory.  This
544                            is  the <min> version given to the most local call
545                            to the cmake_minimum_required(VERSION) command  in
546                            the directory itself or one of its ancestors.  The
547                            value is a JSON object with one member:
548
549                            string A string specifying  the  minimum  required
550                                   version in the format:
551
552                                      <major>.<minor>[.<patch>[.<tweak>]][<suffix>]
553
554                                   Each  component  is an unsigned integer and
555                                   the suffix may be an arbitrary string.
556
557                     hasInstallRule
558                            Optional member that is present with boolean value
559                            true  when the directory or one of its subdirecto‐
560                            ries contains any install() rules, i.e. whether  a
561                            make install or equivalent rule is available.
562
563                     jsonFile
564                            A  JSON  string  specifying a path relative to the
565                            codemodel file to another JSON file  containing  a
566                            "codemodel" version 2 "directory" object.
567
568                            This field was added in codemodel version 2.3.
569
570              projects
571                     A  JSON  array  of entries corresponding to the top-level
572                     project and sub-projects defined  in  the  build  system.
573                     Each  (sub-)project  corresponds  to  a  source directory
574                     whose CMakeLists.txt file  calls  the  project()  command
575                     with  a project name different from its parent directory.
576                     The first entry corresponds to the top-level project.
577
578                     Each entry is a JSON object containing members:
579
580                     name   A  string  specifying  the  name  given   to   the
581                            project() command.
582
583                     parentIndex
584                            Optional  member  that is present when the project
585                            is not top-level.  The value is an unsigned  inte‐
586                            ger  0-based  index  of  another entry in the main
587                            projects array  that  corresponds  to  the  parent
588                            project that added this project as a sub-project.
589
590                     childIndexes
591                            Optional  member  that is present when the project
592                            has sub-projects.  The value is a  JSON  array  of
593                            entries  corresponding  to the sub-projects.  Each
594                            entry is an unsigned integer 0-based index of  an‐
595                            other entry in the main projects array.
596
597                     directoryIndexes
598                            A  JSON  array  of  entries corresponding to build
599                            system directories that are part of  the  project.
600                            The  first  entry corresponds to the top-level di‐
601                            rectory of the project.  Each entry is an unsigned
602                            integer  0-based  index  into the main directories
603                            array.
604
605                     targetIndexes
606                            Optional member that is present when  the  project
607                            itself  has  targets, excluding those belonging to
608                            sub-projects.  The value is a JSON  array  of  en‐
609                            tries corresponding to the targets.  Each entry is
610                            an unsigned integer 0-based index  into  the  main
611                            targets array.
612
613              targets
614                     A JSON array of entries corresponding to the build system
615                     targets.   Such  targets  are   created   by   calls   to
616                     add_executable(), add_library(), and add_custom_target(),
617                     excluding imported targets and interface libraries (which
618                     do  not  generate any build rules).  Each entry is a JSON
619                     object containing members:
620
621                     name   A string specifying the target name.
622
623                     id     A string uniquely identifying  the  target.   This
624                            matches  the  id  field  in the file referenced by
625                            jsonFile.
626
627                     directoryIndex
628                            An unsigned integer 0-based index  into  the  main
629                            directories  array indicating the build system di‐
630                            rectory in which the target is defined.
631
632                     projectIndex
633                            An unsigned integer 0-based index  into  the  main
634                            projects array indicating the build system project
635                            in which the target is defined.
636
637                     jsonFile
638                            A JSON string specifying a path  relative  to  the
639                            codemodel  file  to another JSON file containing a
640                            "codemodel" version 2 "target" object.
641
642   "codemodel" version 2 "directory" object
643       A codemodel "directory" object is referenced by a "codemodel" version 2
644       object's  directories  array.  Each "directory" object is a JSON object
645       with members:
646
647       paths  A JSON object containing members:
648
649              source A string specifying the path  to  the  source  directory,
650                     represented  with  forward  slashes.  If the directory is
651                     inside the top-level source directory then  the  path  is
652                     specified  relative  to  that  directory  (with . for the
653                     top-level source directory itself).  Otherwise  the  path
654                     is absolute.
655
656              build  A string specifying the path to the build directory, rep‐
657                     resented with forward slashes.  If the directory  is  in‐
658                     side the top-level build directory then the path is spec‐
659                     ified  relative  to  that  directory  (with  .  for   the
660                     top-level build directory itself).  Otherwise the path is
661                     absolute.
662
663       installers
664              A JSON array of entries corresponding to install() rules.   Each
665              entry is a JSON object containing members:
666
667              component
668                     A  string specifying the component selected by the corre‐
669                     sponding install() command invocation.
670
671              destination
672                     Optional member that is present for specific type  values
673                     below.  The value is a string specifying the install des‐
674                     tination path.  The path may be absolute or  relative  to
675                     the install prefix.
676
677              paths  Optional  member that is present for specific type values
678                     below.  The value is a JSON array of entries  correspond‐
679                     ing  to the paths (files or directories) to be installed.
680                     Each entry is one of:
681
682                     • A string specifying the path from which a file  or  di‐
683                       rectory  is  to  be installed.  The portion of the path
684                       not preceded by a / also specifies the path  (name)  to
685                       which  the  file  or directory is to be installed under
686                       the destination.
687
688                     • A JSON object with members:
689
690                       from   A string specifying the path from which  a  file
691                              or directory is to be installed.
692
693                       to     A  string  specifying the path to which the file
694                              or directory is to be installed under the desti‐
695                              nation.
696
697                     In  both  cases  the  paths  are represented with forward
698                     slashes.  If the "from" path is inside the top-level  di‐
699                     rectory  documented by the corresponding type value, then
700                     the path is specified relative to that directory.  Other‐
701                     wise the path is absolute.
702
703              type   A  string  specifying the type of installation rule.  The
704                     value is one of the following, with some variants provid‐
705                     ing additional members:
706
707                     file   An  install(FILES) or install(PROGRAMS) call.  The
708                            destination and paths members are populated,  with
709                            paths  under  the  top-level  source directory ex‐
710                            pressed relative to it.  The isOptional member may
711                            exist.  This type has no additional members.
712
713                     directory
714                            An  install(DIRECTORY)  call.  The destination and
715                            paths members are populated, with paths under  the
716                            top-level  source  directory expressed relative to
717                            it.  The isOptional member may exist.   This  type
718                            has no additional members.
719
720                     target An  install(TARGETS)  call.   The  destination and
721                            paths members are populated, with paths under  the
722                            top-level  build  directory  expressed relative to
723                            it.  The isOptional member may exist.   This  type
724                            has additional members targetId, targetIndex, tar‐
725                            getIsImportLibrary, and targetInstallNamelink.
726
727                     export An  install(EXPORT)  call.   The  destination  and
728                            paths  members are populated, with paths under the
729                            top-level build directory  expressed  relative  to
730                            it.   The  paths  entries refer to files generated
731                            automatically by CMake for installation, and their
732                            actual  values  are considered private implementa‐
733                            tion details.  This type  has  additional  members
734                            exportName and exportTargets.
735
736                     script An install(SCRIPT) call.  This type has additional
737                            member scriptFile.
738
739                     code   An install(CODE) call.  This  type  has  no  addi‐
740                            tional members.
741
742                     importedRuntimeArtifacts
743                            An  install(IMPORTED_RUNTIME_ARTIFACTS) call.  The
744                            destination member is  populated.  The  isOptional
745                            member may exist. This type has no additional mem‐
746                            bers.
747
748                     runtimeDependencySet
749                            An  install(RUNTIME_DEPENDENCY_SET)  call  or   an
750                            install(TARGETS)  call  with RUNTIME_DEPENDENCIES.
751                            The destination member is populated. This type has
752                            additional  members  runtimeDependencySetName  and
753                            runtimeDependencySetType.
754
755                     fileSet
756                            An install(TARGETS) call with FILE_SET.  The  des‐
757                            tination  and  paths  members  are populated.  The
758                            isOptional member may exist.  This type has  addi‐
759                            tional  members fileSetName, fileSetType, fileSet‐
760                            Directories, and fileSetTarget.
761
762                            This type was added in codemodel version 2.4.
763
764              isExcludeFromAll
765                     Optional member that is present with boolean  value  true
766                     when  install()  is  called with the EXCLUDE_FROM_ALL op‐
767                     tion.
768
769              isForAllComponents
770                     Optional member that is present with boolean  value  true
771                     when  install(SCRIPT|CODE)  is called with the ALL_COMPO‐
772                     NENTS option.
773
774              isOptional
775                     Optional member that is present with boolean  value  true
776                     when  install() is called with the OPTIONAL option.  This
777                     is allowed when type is file, directory, or target.
778
779              targetId
780                     Optional member that is present when type is target.  The
781                     value  is  a string uniquely identifying the target to be
782                     installed.  This matches the id member of the  target  in
783                     the main "codemodel" object's targets array.
784
785              targetIndex
786                     Optional member that is present when type is target.  The
787                     value is an unsigned integer 0-based index into the  main
788                     "codemodel"  object's  targets array for the target to be
789                     installed.
790
791              targetIsImportLibrary
792                     Optional member that is present when type is  target  and
793                     the installer is for a Windows DLL import library file or
794                     for an AIX linker import file.  If present, it has  bool‐
795                     ean value true.
796
797              targetInstallNamelink
798                     Optional  member  that is present when type is target and
799                     the installer corresponds to a target that may  use  sym‐
800                     bolic links to implement the VERSION and SOVERSION target
801                     properties.  The value is a string indicating how the in‐
802                     staller  is  supposed  to handle the symlinks: skip means
803                     the installer should skip the symlinks and  install  only
804                     the  real  file,  and only means the installer should in‐
805                     stall only the symlinks and not the real  file.   In  all
806                     cases the paths member lists what it actually installs.
807
808              exportName
809                     Optional member that is present when type is export.  The
810                     value is a string specifying the name of the export.
811
812              exportTargets
813                     Optional member that is present when type is export.  The
814                     value  is  a  JSON  array of entries corresponding to the
815                     targets included in the export.  Each entry is a JSON ob‐
816                     ject with members:
817
818                     id     A  string  uniquely  identifying the target.  This
819                            matches the id member of the target  in  the  main
820                            "codemodel" object's targets array.
821
822                     index  An  unsigned  integer  0-based index into the main
823                            "codemodel" object's targets array for the target.
824
825              runtimeDependencySetName
826                     Optional member that is present when type  is  runtimeDe‐
827                     pendencySet   and   the   installer  was  created  by  an
828                     install(RUNTIME_DEPENDENCY_SET)  call.  The  value  is  a
829                     string  specifying the name of the runtime dependency set
830                     that was installed.
831
832              runtimeDependencySetType
833                     Optional member that is present when type  is  runtimeDe‐
834                     pendencySet.   The value is a string with one of the fol‐
835                     lowing values:
836
837                     library
838                            Indicates that this installer  installs  dependen‐
839                            cies that are not macOS frameworks.
840
841                     framework
842                            Indicates  that  this installer installs dependen‐
843                            cies that are macOS frameworks.
844
845              fileSetName
846                     Optional member that is present when type is fileSet. The
847                     value is a string with the name of the file set.
848
849                     This field was added in codemodel version 2.4.
850
851              fileSetType
852                     Optional member that is present when type is fileSet. The
853                     value is a string with the type of the file set.
854
855                     This field was added in codemodel version 2.4.
856
857              fileSetDirectories
858                     Optional member that is present when type is fileSet. The
859                     value  is  a list of strings with the file set's base di‐
860                     rectories (determined by genex-evaluation of  HEADER_DIRS
861                     or HEADER_DIRS_<NAME>).
862
863                     This field was added in codemodel version 2.4.
864
865              fileSetTarget
866                     Optional member that is present when type is fileSet. The
867                     value is a JSON object with members:
868
869                     id     A string uniquely identifying  the  target.   This
870                            matches  the  id  member of the target in the main
871                            "codemodel" object's targets array.
872
873                     index  An unsigned integer 0-based index  into  the  main
874                            "codemodel" object's targets array for the target.
875
876                     This field was added in codemodel version 2.4.
877
878              scriptFile
879                     Optional member that is present when type is script.  The
880                     value is a string specifying the path to the script  file
881                     on  disk,  represented with forward slashes.  If the file
882                     is inside the top-level source directory then the path is
883                     specified relative to that directory.  Otherwise the path
884                     is absolute.
885
886              backtrace
887                     Optional member that is present  when  a  CMake  language
888                     backtrace  to  the  install() or other command invocation
889                     that added this installer is available.  The value is  an
890                     unsigned  integer  0-based  index into the backtraceGraph
891                     member's nodes array.
892
893       backtraceGraph
894              A "codemodel" version 2 "backtrace graph" whose nodes are refer‐
895              enced  from  backtrace members elsewhere in this "directory" ob‐
896              ject.
897
898   "codemodel" version 2 "target" object
899       A codemodel "target" object is referenced by a  "codemodel"  version  2
900       object's  targets  array.   Each  "target" object is a JSON object with
901       members:
902
903       name   A string specifying the logical name of the target.
904
905       id     A string uniquely identifying the target.  The format is unspec‐
906              ified and should not be interpreted by clients.
907
908       type   A string specifying the type of the target.  The value is one of
909              EXECUTABLE, STATIC_LIBRARY, SHARED_LIBRARY, MODULE_LIBRARY,  OB‐
910              JECT_LIBRARY, INTERFACE_LIBRARY, or UTILITY.
911
912       backtrace
913              Optional  member that is present when a CMake language backtrace
914              to the command in the source code that  created  the  target  is
915              available.   The value is an unsigned integer 0-based index into
916              the backtraceGraph member's nodes array.
917
918       folder Optional member that is present when the FOLDER target  property
919              is set.  The value is a JSON object with one member:
920
921              name   A string specifying the name of the target folder.
922
923       paths  A JSON object containing members:
924
925              source A  string  specifying the path to the target's source di‐
926                     rectory, represented with forward slashes.  If the direc‐
927                     tory  is  inside  the top-level source directory then the
928                     path is specified relative to that directory (with .  for
929                     the  top-level  source  directory itself).  Otherwise the
930                     path is absolute.
931
932              build  A string specifying the path to the target's build direc‐
933                     tory, represented with forward slashes.  If the directory
934                     is inside the top-level build directory then the path  is
935                     specified  relative  to  that  directory  (with . for the
936                     top-level build directory itself).  Otherwise the path is
937                     absolute.
938
939       nameOnDisk
940              Optional  member that is present for executable and library tar‐
941              gets that are linked or archived into a single primary artifact.
942              The  value is a string specifying the file name of that artifact
943              on disk.
944
945       artifacts
946              Optional member that is present for executable and library  tar‐
947              gets that produce artifacts on disk meant for consumption by de‐
948              pendents.  The value is a JSON array of entries corresponding to
949              the  artifacts.  Each entry is a JSON object containing one mem‐
950              ber:
951
952              path   A string specifying the path to the file on disk,  repre‐
953                     sented  with  forward slashes.  If the file is inside the
954                     top-level build directory then the path is specified rel‐
955                     ative to that directory.  Otherwise the path is absolute.
956
957       isGeneratorProvided
958              Optional  member  that is present with boolean value true if the
959              target is provided by CMake's build system generator rather than
960              by a command in the source code.
961
962       install
963              Optional member that is present when the target has an install()
964              rule.  The value is a JSON object with members:
965
966              prefix A JSON object specifying the installation prefix.  It has
967                     one member:
968
969                     path   A     string     specifying     the    value    of
970                            CMAKE_INSTALL_PREFIX.
971
972              destinations
973                     A JSON array of entries specifying an install destination
974                     path.  Each entry is a JSON object with members:
975
976                     path   A  string specifying the install destination path.
977                            The path may be absolute or relative  to  the  in‐
978                            stall prefix.
979
980                     backtrace
981                            Optional  member that is present when a CMake lan‐
982                            guage backtrace to the install()  command  invoca‐
983                            tion that specified this destination is available.
984                            The value is an  unsigned  integer  0-based  index
985                            into the backtraceGraph member's nodes array.
986
987       link   Optional  member  that is present for executables and shared li‐
988              brary targets that link into a runtime binary.  The value  is  a
989              JSON object with members describing the link step:
990
991              language
992                     A  string  specifying the language (e.g. C, CXX, Fortran)
993                     of the toolchain is used to invoke the linker.
994
995              commandFragments
996                     Optional member that is present  when  fragments  of  the
997                     link command line invocation are available.  The value is
998                     a JSON array of  entries  specifying  ordered  fragments.
999                     Each entry is a JSON object with members:
1000
1001                     fragment
1002                            A string specifying a fragment of the link command
1003                            line invocation.  The  value  is  encoded  in  the
1004                            build system's native shell format.
1005
1006                     role   A  string  specifying  the  role of the fragment's
1007                            content:
1008
1009flags: link flags.
1010
1011libraries: link library file paths or flags.
1012
1013libraryPath: library search path flags.
1014
1015frameworkPath:  macOS  framework   search   path
1016                              flags.
1017
1018              lto    Optional  member  that is present with boolean value true
1019                     when link-time optimization (a.k.a. interprocedural opti‐
1020                     mization or link-time code generation) is enabled.
1021
1022              sysroot
1023                     Optional    member    that    is    present    when   the
1024                     CMAKE_SYSROOT_LINK or CMAKE_SYSROOT variable is  defined.
1025                     The value is a JSON object with one member:
1026
1027                     path   A  string specifying the absolute path to the sys‐
1028                            root, represented with forward slashes.
1029
1030       archive
1031              Optional member that is present for static library targets.  The
1032              value is a JSON object with members describing the archive step:
1033
1034              commandFragments
1035                     Optional  member  that  is  present when fragments of the
1036                     archiver command  line  invocation  are  available.   The
1037                     value  is  a  JSON  array of entries specifying the frag‐
1038                     ments.  Each entry is a JSON object with members:
1039
1040                     fragment
1041                            A string specifying a  fragment  of  the  archiver
1042                            command  line invocation.  The value is encoded in
1043                            the build system's native shell format.
1044
1045                     role   A string specifying the  role  of  the  fragment's
1046                            content:
1047
1048flags: archiver flags.
1049
1050              lto    Optional  member  that is present with boolean value true
1051                     when link-time optimization (a.k.a. interprocedural opti‐
1052                     mization or link-time code generation) is enabled.
1053
1054       dependencies
1055              Optional member that is present when the target depends on other
1056              targets.  The value is a JSON array of entries corresponding  to
1057              the dependencies.  Each entry is a JSON object with members:
1058
1059              id     A  string  uniquely  identifying the target on which this
1060                     target depends.  This matches the main id member  of  the
1061                     other target.
1062
1063              backtrace
1064                     Optional  member  that  is  present when a CMake language
1065                     backtrace        to        the        add_dependencies(),
1066                     target_link_libraries(), or other command invocation that
1067                     created this dependency is available.  The  value  is  an
1068                     unsigned  integer  0-based  index into the backtraceGraph
1069                     member's nodes array.
1070
1071       fileSets
1072              A JSON array of entries corresponding to the target's file sets.
1073              Each entry is a JSON object with members:
1074
1075              name   A string specifying the name of the file set.
1076
1077              type   A  string  specifying  the  type  of  the  file set.  See
1078                     target_sources() supported file set types.
1079
1080              visibility
1081                     A string specifying the visibility of the file  set;  one
1082                     of PUBLIC, PRIVATE, or INTERFACE.
1083
1084              baseDirectories
1085                     A  JSON  array of strings specifying the base directories
1086                     containing sources in the file set.
1087
1088              This field was added in codemodel version 2.5.
1089
1090       sources
1091              A JSON array of entries corresponding  to  the  target's  source
1092              files.  Each entry is a JSON object with members:
1093
1094              path   A  string specifying the path to the source file on disk,
1095                     represented with forward slashes.  If the file is  inside
1096                     the top-level source directory then the path is specified
1097                     relative to that directory.  Otherwise the path is  abso‐
1098                     lute.
1099
1100              compileGroupIndex
1101                     Optional  member  that is present when the source is com‐
1102                     piled.  The value is an unsigned  integer  0-based  index
1103                     into the compileGroups array.
1104
1105              sourceGroupIndex
1106                     Optional  member  that is present when the source is part
1107                     of a source group either via the  source_group()  command
1108                     or  by default.  The value is an unsigned integer 0-based
1109                     index into the sourceGroups array.
1110
1111              isGenerated
1112                     Optional member that is present with boolean  value  true
1113                     if the source is GENERATED.
1114
1115              fileSetIndex
1116                     Optional  member  that is present when the source is part
1117                     of a file set.  The value is an unsigned integer  0-based
1118                     index into the fileSets array.
1119
1120                     This field was added in codemodel version 2.5.
1121
1122              backtrace
1123                     Optional  member  that  is  present when a CMake language
1124                     backtrace  to  the  target_sources(),   add_executable(),
1125                     add_library(),  add_custom_target(), or other command in‐
1126                     vocation that added this source to the target  is  avail‐
1127                     able.   The  value  is  an unsigned integer 0-based index
1128                     into the backtraceGraph member's nodes array.
1129
1130       sourceGroups
1131              Optional member that is present when  sources  are  grouped  to‐
1132              gether  by  the source_group() command or by default.  The value
1133              is a JSON array of entries corresponding to  the  groups.   Each
1134              entry is a JSON object with members:
1135
1136              name   A string specifying the name of the source group.
1137
1138              sourceIndexes
1139                     A  JSON array listing the sources belonging to the group.
1140                     Each entry is an unsigned integer 0-based index into  the
1141                     main sources array for the target.
1142
1143       compileGroups
1144              Optional member that is present when the target has sources that
1145              compile.  The value is a JSON array of entries corresponding  to
1146              groups of sources that all compile with the same settings.  Each
1147              entry is a JSON object with members:
1148
1149              sourceIndexes
1150                     A JSON array listing the sources belonging to the  group.
1151                     Each  entry is an unsigned integer 0-based index into the
1152                     main sources array for the target.
1153
1154              language
1155                     A string specifying the language (e.g. C,  CXX,  Fortran)
1156                     of the toolchain is used to compile the source file.
1157
1158              languageStandard
1159                     Optional  member  that is present when the language stan‐
1160                     dard is set explicitly (e.g. via CXX_STANDARD) or implic‐
1161                     itly  by  compile  features.  Each entry is a JSON object
1162                     with two members:
1163
1164                     backtraces
1165                            Optional member that is present when a CMake  lan‐
1166                            guage  backtrace to the <LANG>_STANDARD setting is
1167                            available.  If the language standard was  set  im‐
1168                            plicitly by compile features those are used as the
1169                            backtrace(s).  It's possible for multiple  compile
1170                            features  to require the same language standard so
1171                            there could be multiple backtraces. The value is a
1172                            JSON array with each entry being an unsigned inte‐
1173                            ger 0-based index into the backtraceGraph member's
1174                            nodes array.
1175
1176                     standard
1177                            String representing the language standard.
1178
1179                     This field was added in codemodel version 2.2.
1180
1181              compileCommandFragments
1182                     Optional  member  that  is  present when fragments of the
1183                     compiler command  line  invocation  are  available.   The
1184                     value is a JSON array of entries specifying ordered frag‐
1185                     ments.  Each entry is a JSON object with one member:
1186
1187                     fragment
1188                            A string specifying a fragment of the compile com‐
1189                            mand line invocation.  The value is encoded in the
1190                            build system's native shell format.
1191
1192              includes
1193                     Optional member that is present when  there  are  include
1194                     directories.  The value is a JSON array with an entry for
1195                     each directory.  Each entry is a JSON  object  with  mem‐
1196                     bers:
1197
1198                     path   A string specifying the path to the include direc‐
1199                            tory, represented with forward slashes.
1200
1201                     isSystem
1202                            Optional member that is present with boolean value
1203                            true  if the include directory is marked as a sys‐
1204                            tem include directory.
1205
1206                     backtrace
1207                            Optional member that is present when a CMake  lan‐
1208                            guage           backtrace          to          the
1209                            target_include_directories() or other command  in‐
1210                            vocation  that  added  this  include  directory is
1211                            available.   The  value  is  an  unsigned  integer
1212                            0-based  index  into  the  backtraceGraph member's
1213                            nodes array.
1214
1215              frameworks
1216                     Optional member that is present when, on Apple platforms,
1217                     there  are  frameworks. The value is a JSON array with an
1218                     entry for each directory.  Each entry is  a  JSON  object
1219                     with members:
1220
1221                     path   A  string specifying the path to the framework di‐
1222                            rectory, represented with forward slashes.
1223
1224                     isSystem
1225                            Optional member that is present with boolean value
1226                            true if the framework is marked as a system one.
1227
1228                     backtrace
1229                            Optional  member that is present when a CMake lan‐
1230                            guage backtrace to the target_link_libraries()  or
1231                            other command invocation that added this framework
1232                            is available.  The value is  an  unsigned  integer
1233                            0-based  index  into  the  backtraceGraph member's
1234                            nodes array.
1235
1236                     This field was added in codemodel version 2.6.
1237
1238              precompileHeaders
1239                     Optional     member     that     is     present      when
1240                     target_precompile_headers()  or other command invocations
1241                     set PRECOMPILE_HEADERS on the target.   The  value  is  a
1242                     JSON  array with an entry for each header.  Each entry is
1243                     a JSON object with members:
1244
1245                     header Full path to the precompile header file.
1246
1247                     backtrace
1248                            Optional member that is present when a CMake  lan‐
1249                            guage backtrace to the target_precompile_headers()
1250                            or other command invocation that added  this  pre‐
1251                            compiled header is available.  The value is an un‐
1252                            signed integer 0-based index into  the  backtrace‐
1253                            Graph member's nodes array.
1254
1255                     This field was added in codemodel version 2.1.
1256
1257              defines
1258                     Optional member that is present when there are preproces‐
1259                     sor definitions.  The value is a JSON array with an entry
1260                     for  each  definition.   Each entry is a JSON object with
1261                     members:
1262
1263                     define A string specifying the preprocessor definition in
1264                            the format <name>[=<value>], e.g. DEF or DEF=1.
1265
1266                     backtrace
1267                            Optional  member that is present when a CMake lan‐
1268                            guage          backtrace          to           the
1269                            target_compile_definitions()  or other command in‐
1270                            vocation that added this  preprocessor  definition
1271                            is  available.   The  value is an unsigned integer
1272                            0-based index  into  the  backtraceGraph  member's
1273                            nodes array.
1274
1275              sysroot
1276                     Optional    member    that    is    present    when   the
1277                     CMAKE_SYSROOT_COMPILE or CMAKE_SYSROOT  variable  is  de‐
1278                     fined.  The value is a JSON object with one member:
1279
1280                     path   A  string specifying the absolute path to the sys‐
1281                            root, represented with forward slashes.
1282
1283       backtraceGraph
1284              A "codemodel" version 2 "backtrace graph" whose nodes are refer‐
1285              enced from backtrace members elsewhere in this "target" object.
1286
1287   "codemodel" version 2 "backtrace graph"
1288       The  backtraceGraph  member  of a "codemodel" version 2 "directory" ob‐
1289       ject, or "codemodel" version 2 "target" object is  a  JSON  object  de‐
1290       scribing  a  graph  of backtraces.  Its nodes are referenced from back‐
1291       trace members elsewhere in the containing object.  The backtrace  graph
1292       object members are:
1293
1294       nodes  A  JSON  array listing nodes in the backtrace graph.  Each entry
1295              is a JSON object with members:
1296
1297              file   An unsigned integer  0-based  index  into  the  backtrace
1298                     files array.
1299
1300              line   An  optional  member  present  when the node represents a
1301                     line within the file.  The value is an  unsigned  integer
1302                     1-based line number.
1303
1304              command
1305                     An  optional  member  present  when the node represents a
1306                     command invocation within the file.  The value is an  un‐
1307                     signed  integer 0-based index into the backtrace commands
1308                     array.
1309
1310              parent An optional member present when the node is not the  bot‐
1311                     tom  of the call stack.  The value is an unsigned integer
1312                     0-based index of another entry in the backtrace nodes ar‐
1313                     ray.
1314
1315       commands
1316              A  JSON  array  listing  command  names  referenced by backtrace
1317              nodes.  Each entry is a string specifying a command name.
1318
1319       files  A JSON array listing CMake language files  referenced  by  back‐
1320              trace  nodes.   Each  entry is a string specifying the path to a
1321              file, represented with forward slashes.  If the file  is  inside
1322              the  top-level source directory then the path is specified rela‐
1323              tive to that directory.  Otherwise the path is absolute.
1324
1325   Object Kind "configureLog"
1326       The configureLog object kind describes the location and contents  of  a
1327       cmake-configure-log(7) file.
1328
1329       There is only one configureLog object major version, version 1.
1330
1331   "configureLog" version 1
1332       configureLog object version 1 is a JSON object:
1333
1334          {
1335            "kind": "configureLog",
1336            "version": { "major": 1, "minor": 0 },
1337            "path": "/path/to/top-level-build-dir/CMakeFiles/CMakeConfigureLog.yaml",
1338            "eventKindNames": [ "try_compile-v1", "try_run-v1" ]
1339          }
1340
1341       The members specific to configureLog objects are:
1342
1343       path   A string specifying the path to the configure log file.  Clients
1344              must read the log file from this path, which  may  be  different
1345              than  the  path  documented  by cmake-configure-log(7).  The log
1346              file may not exist if no events are logged.
1347
1348       eventKindNames
1349              A JSON array whose entries are each a JSON string naming one  of
1350              the  cmake-configure-log(7)  versioned event kinds.  At most one
1351              version of each configure log event kind will  be  listed.   Al‐
1352              though  the  configure  log  may contain other (versioned) event
1353              kinds, clients must ignore those that are  not  listed  in  this
1354              field.
1355
1356   Object Kind "cache"
1357       The  cache  object  kind  lists cache entries.  These are the Variables
1358       stored in the persistent cache (CMakeCache.txt) for the build tree.
1359
1360       There is only one cache object major version,  version  2.   Version  1
1361       does not exist to avoid confusion with that from cmake-server(7) mode.
1362
1363   "cache" version 2
1364       cache object version 2 is a JSON object:
1365
1366          {
1367            "kind": "cache",
1368            "version": { "major": 2, "minor": 0 },
1369            "entries": [
1370              {
1371                "name": "BUILD_SHARED_LIBS",
1372                "value": "ON",
1373                "type": "BOOL",
1374                "properties": [
1375                  {
1376                    "name": "HELPSTRING",
1377                    "value": "Build shared libraries"
1378                  }
1379                ]
1380              },
1381              {
1382                "name": "CMAKE_GENERATOR",
1383                "value": "Unix Makefiles",
1384                "type": "INTERNAL",
1385                "properties": [
1386                  {
1387                    "name": "HELPSTRING",
1388                    "value": "Name of generator."
1389                  }
1390                ]
1391              }
1392            ]
1393          }
1394
1395       The members specific to cache objects are:
1396
1397       entries
1398              A  JSON  array whose entries are each a JSON object specifying a
1399              cache entry.  The members of each entry are:
1400
1401              name   A string specifying the name of the entry.
1402
1403              value  A string specifying the value of the entry.
1404
1405              type   A string  specifying  the  type  of  the  entry  used  by
1406                     cmake-gui(1) to choose a widget for editing.
1407
1408              properties
1409                     A JSON array of entries specifying associated cache entry
1410                     properties.  Each entry is a JSON object containing  mem‐
1411                     bers:
1412
1413                     name   A  string  specifying  the name of the cache entry
1414                            property.
1415
1416                     value  A string specifying the value of the  cache  entry
1417                            property.
1418
1419   Object Kind "cmakeFiles"
1420       The  cmakeFiles object kind lists files used by CMake while configuring
1421       and generating the build  system.   These  include  the  CMakeLists.txt
1422       files as well as included .cmake files.
1423
1424       There is only one cmakeFiles object major version, version 1.
1425
1426   "cmakeFiles" version 1
1427       cmakeFiles object version 1 is a JSON object:
1428
1429          {
1430            "kind": "cmakeFiles",
1431            "version": { "major": 1, "minor": 0 },
1432            "paths": {
1433              "build": "/path/to/top-level-build-dir",
1434              "source": "/path/to/top-level-source-dir"
1435            },
1436            "inputs": [
1437              {
1438                "path": "CMakeLists.txt"
1439              },
1440              {
1441                "isGenerated": true,
1442                "path": "/path/to/top-level-build-dir/.../CMakeSystem.cmake"
1443              },
1444              {
1445                "isExternal": true,
1446                "path": "/path/to/external/third-party/module.cmake"
1447              },
1448              {
1449                "isCMake": true,
1450                "isExternal": true,
1451                "path": "/path/to/cmake/Modules/CMakeGenericSystem.cmake"
1452              }
1453            ]
1454          }
1455
1456       The members specific to cmakeFiles objects are:
1457
1458       paths  A JSON object containing members:
1459
1460              source A  string  specifying  the absolute path to the top-level
1461                     source directory, represented with forward slashes.
1462
1463              build  A string specifying the absolute path  to  the  top-level
1464                     build directory, represented with forward slashes.
1465
1466       inputs A  JSON array whose entries are each a JSON object specifying an
1467              input file used by CMake when  configuring  and  generating  the
1468              build system.  The members of each entry are:
1469
1470              path   A  string  specifying the path to an input file to CMake,
1471                     represented with forward slashes.  If the file is  inside
1472                     the top-level source directory then the path is specified
1473                     relative to that directory.  Otherwise the path is  abso‐
1474                     lute.
1475
1476              isGenerated
1477                     Optional  member  that is present with boolean value true
1478                     if the path specifies a file that is under the  top-level
1479                     build  directory  and  the  build is out-of-source.  This
1480                     member is not available on in-source builds.
1481
1482              isExternal
1483                     Optional member that is present with boolean  value  true
1484                     if  the  path  specifies  a  file  that  is not under the
1485                     top-level source or build directories.
1486
1487              isCMake
1488                     Optional member that is present with boolean  value  true
1489                     if the path specifies a file in the CMake installation.
1490
1491   Object Kind "toolchains"
1492       The toolchains object kind lists properties of the toolchains used dur‐
1493       ing the build.  These include the language, compiler path, ID, and ver‐
1494       sion.
1495
1496       There is only one toolchains object major version, version 1.
1497
1498   "toolchains" version 1
1499       toolchains object version 1 is a JSON object:
1500
1501          {
1502            "kind": "toolchains",
1503            "version": { "major": 1, "minor": 0 },
1504            "toolchains": [
1505              {
1506                "language": "C",
1507                "compiler": {
1508                  "path": "/usr/bin/cc",
1509                  "id": "GNU",
1510                  "version": "9.3.0",
1511                  "implicit": {
1512                    "includeDirectories": [
1513                      "/usr/lib/gcc/x86_64-linux-gnu/9/include",
1514                      "/usr/local/include",
1515                      "/usr/include/x86_64-linux-gnu",
1516                      "/usr/include"
1517                    ],
1518                    "linkDirectories": [
1519                      "/usr/lib/gcc/x86_64-linux-gnu/9",
1520                      "/usr/lib/x86_64-linux-gnu",
1521                      "/usr/lib",
1522                      "/lib/x86_64-linux-gnu",
1523                      "/lib"
1524                    ],
1525                    "linkFrameworkDirectories": [],
1526                    "linkLibraries": [ "gcc", "gcc_s", "c", "gcc", "gcc_s" ]
1527                  }
1528                },
1529                "sourceFileExtensions": [ "c", "m" ]
1530              },
1531              {
1532                "language": "CXX",
1533                "compiler": {
1534                  "path": "/usr/bin/c++",
1535                  "id": "GNU",
1536                  "version": "9.3.0",
1537                  "implicit": {
1538                    "includeDirectories": [
1539                      "/usr/include/c++/9",
1540                      "/usr/include/x86_64-linux-gnu/c++/9",
1541                      "/usr/include/c++/9/backward",
1542                      "/usr/lib/gcc/x86_64-linux-gnu/9/include",
1543                      "/usr/local/include",
1544                      "/usr/include/x86_64-linux-gnu",
1545                      "/usr/include"
1546                    ],
1547                    "linkDirectories": [
1548                      "/usr/lib/gcc/x86_64-linux-gnu/9",
1549                      "/usr/lib/x86_64-linux-gnu",
1550                      "/usr/lib",
1551                      "/lib/x86_64-linux-gnu",
1552                      "/lib"
1553                    ],
1554                    "linkFrameworkDirectories": [],
1555                    "linkLibraries": [
1556                      "stdc++", "m", "gcc_s", "gcc", "c", "gcc_s", "gcc"
1557                    ]
1558                  }
1559                },
1560                "sourceFileExtensions": [
1561                  "C", "M", "c++", "cc", "cpp", "cxx", "mm", "CPP"
1562                ]
1563              }
1564            ]
1565          }
1566
1567       The members specific to toolchains objects are:
1568
1569       toolchains
1570              A  JSON  array whose entries are each a JSON object specifying a
1571              toolchain associated with a particular language. The members  of
1572              each entry are:
1573
1574              language
1575                     A  JSON  string specifying the toolchain language, like C
1576                     or CXX. Language names are the  same  as  language  names
1577                     that  can  be  passed  to  the project() command. Because
1578                     CMake only supports a single toolchain per language, this
1579                     field can be used as a key.
1580
1581              compiler
1582                     A JSON object containing members:
1583
1584                     path   Optional   member   that   is   present  when  the
1585                            CMAKE_<LANG>_COMPILER variable is defined for  the
1586                            current language. Its value is a JSON string hold‐
1587                            ing the path to the compiler.
1588
1589                     id     Optional  member  that   is   present   when   the
1590                            CMAKE_<LANG>_COMPILER_ID  variable  is defined for
1591                            the current language. Its value is a  JSON  string
1592                            holding the ID (GNU, MSVC, etc.) of the compiler.
1593
1594                     version
1595                            Optional   member   that   is   present  when  the
1596                            CMAKE_<LANG>_COMPILER_VERSION variable is  defined
1597                            for  the  current  language.  Its  value is a JSON
1598                            string holding the version of the compiler.
1599
1600                     target Optional  member  that   is   present   when   the
1601                            CMAKE_<LANG>_COMPILER_TARGET  variable  is defined
1602                            for the current language.  Its  value  is  a  JSON
1603                            string  holding  the cross-compiling target of the
1604                            compiler.
1605
1606                     implicit
1607                            A JSON object containing members:
1608
1609                            includeDirectories
1610                                   Optional member that is  present  when  the
1611                                   CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES
1612                                   variable is defined for  the  current  lan‐
1613                                   guage.  Its  value  is a JSON array of JSON
1614                                   strings where each string holds a  path  to
1615                                   an  implicit include directory for the com‐
1616                                   piler.
1617
1618                            linkDirectories
1619                                   Optional member that is  present  when  the
1620                                   CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
1621                                   variable is defined for  the  current  lan‐
1622                                   guage.  Its  value  is a JSON array of JSON
1623                                   strings where each string holds a  path  to
1624                                   an  implicit  link  directory  for the com‐
1625                                   piler.
1626
1627                            linkFrameworkDirectories
1628                                   Optional member that is  present  when  the
1629                                   CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
1630                                   variable is defined for  the  current  lan‐
1631                                   guage.  Its  value  is a JSON array of JSON
1632                                   strings where each string holds a  path  to
1633                                   an  implicit  link  framework directory for
1634                                   the compiler.
1635
1636                            linkLibraries
1637                                   Optional member that is  present  when  the
1638                                   CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES  vari‐
1639                                   able is defined for the  current  language.
1640                                   Its  value  is a JSON array of JSON strings
1641                                   where each string holds a path  to  an  im‐
1642                                   plicit link library for the compiler.
1643
1644              sourceFileExtensions
1645                     Optional    member    that    is    present    when   the
1646                     CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS variable  is  defined
1647                     for  the  current  language. Its value is a JSON array of
1648                     JSON strings where each each string holds a  file  exten‐
1649                     sion (without the leading dot) for the language.
1650
1652       2000-2023 Kitware, Inc. and Contributors
1653
1654
1655
1656
16573.27.7                           Oct 07, 2023                CMAKE-FILE-API(7)
Impressum