4 The set of package files distributed on ``cmake.org`` varies by CMake version.
5 One file, named ``cmake-<ver>-files-v1.json``, contains a table of the package
6 files available for a given version. Clients may use this to find other files.
11 The format is a JSON object:
17 "major": 3, "minor": 20, "patch": 0,
23 "architecture": ["...", "..."],
30 "algorithm": ["...", "..."],
31 "name": "cmake-<version>-<algo>.txt",
32 "signature": ["cmake-<version>-<algo>.txt.asc"]
40 A JSON object specifying the version of CMake with members:
42 ``major``, ``minor``, ``patch``
43 Integer values specifying the major, minor, and patch version components.
46 A string specifying the version suffix, if any, e.g. ``rc1``.
49 A string specifying the full version in the format
50 ``<major>.<minor>.<patch>[-<suffix>]``.
53 A JSON array of entries corresponding to available package files.
54 Each entry is a JSON object containing members:
57 A JSON array of strings naming the operating system for which the
58 package file is built, possibly using multiple alternative spellings.
59 Possible names include:
70 ``Windows``, ``windows``
74 A JSON array of strings naming the architecture(s) for which the
75 package file is built, possibly using multiple alternative spellings.
76 Source packages have an empty list of architectures (``[]``).
77 Binary packages have a non-empty list of architectures, with at least
78 one name matching the output of ``uname -m`` on corresponding hosts.
79 On Windows, architecture names include ``x86_64``, ``i386``, and ``arm64``.
80 On macOS, universal binary packages list all architectures,
81 e.g. ``["arm64","x86_64"]``.
84 A JSON string naming the class of package. The value is one of:
87 A tarball or zip archive.
88 The extension, such as ``.tar.gz`` or ``.zip``, indicates the format.
89 The rest of the file name matches the top-level directory in the archive.
92 An interactive installer.
95 A disk image (``.dmg`` on macOS).
98 A JSON string specifying the name of the package file.
101 Optional member that is present on package files for macOS.
102 The value is a JSON string specifying the minimum version of macOS
103 required to run the binary, e.g. ``"10.13"``.
106 Optional member that is present when the package file is deprecated
107 and may be removed from the set of package files in later versions.
108 The value is a string containing a deprecation message.
109 Clients should check this field to warn users when they are using
110 a deprecated package file.
113 A JSON array of entries corresponding to files containing cryptographic
114 hashes of the package file contents. Each entry is a JSON object
118 A JSON array of strings naming a cryptographic hash algorithm, possibly
119 using multiple alternative spellings, e.g. ``["sha256", "SHA-256"]``.
122 A JSON string specifying the name of the file containing hashes,
123 e.g. ``"cmake-<version>-SHA-256.txt"``.
126 A JSON array of strings naming files containing a cryptographic
127 signature of the hash file specified by ``name``, e.g.
128 ``["cmake-<version>-SHA-256.txt.asc"]``.
131 Optional member that is present when the hash algorithm is deprecated
132 and may be removed from the set of hash files in later versions.
133 The value is a string containing a deprecation message.
134 Clients that rely on a specific hash algorithm should check this
135 field to determine whether an update is needed.
138 Optional member that is present when `File Table v1`_ has been
139 deprecated in favor of a newer alternative. The value is a string
140 containing a deprecation message. Clients should check this field
141 to determine whether they need an update to use a newer alternative.
143 The table and hash files are generated by `files.bash`_ from
144 the `files-v1.json.in`_ template and the package files themselves.
146 .. _`files.bash`: files.bash
147 .. _`files-v1.json.in`: files-v1.json.in
152 Clients may download the `File Table v1`_ file ``cmake-<ver>-files-v1.json``
153 and query it to get the name(s) of specific package files adjacent to it.
154 Make queries as specific as possible in order to account for additional
155 alternative binaries in future CMake versions.
157 For example, one may use ``jq`` queries:
159 * To select a Windows binary archive supporting ``x86_64`` hosts::
161 .files[] | select((.os[] | . == "windows") and
162 (.architecture[] | . == "x86_64") and
163 (.class == "archive")) | .name
165 * To select a Linux binary archive supporting ``aarch64`` hosts::
167 .files[] | select((.os[] | . == "linux") and
168 (.architecture[] | . == "aarch64") and
169 (.class == "archive")) | .name
171 * To select a macOS binary archive supporting ``arm64`` hosts::
173 .files[] | select((.os[] | . == "macos") and
174 (.architecture[] | . == "arm64") and
175 (.class == "archive")) | .name
177 * To select a macOS binary archive supporting macOS 10.12 on ``x86_64`` hosts::
179 .files[] | select((.os[] | contains("macOS")) and
180 (.architecture[] | . == "x86_64") and
181 ([.macOSmin] | inside(["10.10", "10.11", "10.12"]))
184 * To select a SHA-256 hash file::
186 .hashFiles[] | select(.algorithm[] | . == "SHA-256") | .name