Datasets:

Modalities:
Image
Text
Formats:
text
Size:
< 1K
Libraries:
Datasets
License:
ZijunCui commited on
Commit
112cca2
·
verified ·
1 Parent(s): f6ba64c

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/DEPRECATED_POLICY_VERSIONS.txt +15 -0
  2. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/DEVICE_LINK_OPTIONS.txt +12 -0
  3. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX.txt +252 -0
  4. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX_ORDER.txt +12 -0
  5. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX_REGISTRY_VIEW.txt +41 -0
  6. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX_ROOT.txt +29 -0
  7. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/GENEX_NOTE.txt +6 -0
  8. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/LINK_OPTIONS_LINKER.txt +25 -0
  9. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/OPTIONS_SHELL.txt +15 -0
  10. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/SUPPORTED_LANGUAGES.txt +25 -0
  11. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/UNSET_NOTE.txt +9 -0
  12. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_compile_definitions.rst +33 -0
  13. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_compile_options.rst +67 -0
  14. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_custom_command.rst +577 -0
  15. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_custom_target.rst +192 -0
  16. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_definitions.rst +38 -0
  17. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_dependencies.rst +31 -0
  18. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_executable.rst +114 -0
  19. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_library.rst +268 -0
  20. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_link_options.rst +44 -0
  21. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_subdirectory.rst +41 -0
  22. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_test.rst +89 -0
  23. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/aux_source_directory.rst +24 -0
  24. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/block.rst +76 -0
  25. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/break.rst +12 -0
  26. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/build_command.rst +51 -0
  27. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/build_name.rst +15 -0
  28. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_file_api.rst +78 -0
  29. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_host_system_information.rst +396 -0
  30. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_language.rst +508 -0
  31. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_minimum_required.rst +88 -0
  32. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_parse_arguments.rst +121 -0
  33. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_path.rst +798 -0
  34. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_policy.rst +159 -0
  35. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/configure_file.rst +189 -0
  36. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/continue.rst +16 -0
  37. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/create_test_sourcelist.rst +30 -0
  38. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_build.rst +93 -0
  39. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_configure.rst +50 -0
  40. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_coverage.rst +50 -0
  41. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_empty_binary_directory.rst +12 -0
  42. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_memcheck.rst +45 -0
  43. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_read_custom_files.rst +14 -0
  44. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_run_script.rst +15 -0
  45. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_sleep.rst +16 -0
  46. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_start.rst +88 -0
  47. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_submit.rst +131 -0
  48. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_test.rst +312 -0
  49. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_update.rst +43 -0
  50. toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_upload.rst +26 -0
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/DEPRECATED_POLICY_VERSIONS.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. versionchanged:: 3.27
2
+
3
+ Compatibility with versions of CMake older than 3.5 is deprecated.
4
+ Calls to :command:`cmake_minimum_required(VERSION)` or
5
+ :command:`cmake_policy(VERSION)` that do not specify at least
6
+ 3.5 as their policy version (optionally via ``...<max>``)
7
+ will produce a deprecation warning in CMake 3.27 and above.
8
+
9
+ .. versionchanged:: 3.19
10
+
11
+ Compatibility with versions of CMake older than 2.8.12 is deprecated.
12
+ Calls to :command:`cmake_minimum_required(VERSION)` or
13
+ :command:`cmake_policy(VERSION)` that do not specify at least
14
+ 2.8.12 as their policy version (optionally via ``...<max>``)
15
+ will produce a deprecation warning in CMake 3.19 and above.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/DEVICE_LINK_OPTIONS.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Host And Device Specific Link Options
2
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
+
4
+ .. versionadded:: 3.18
5
+ When a device link step is involved, which is controlled by
6
+ :prop_tgt:`CUDA_SEPARABLE_COMPILATION` and
7
+ :prop_tgt:`CUDA_RESOLVE_DEVICE_SYMBOLS` properties and policy :policy:`CMP0105`,
8
+ the raw options will be delivered to the host and device link steps (wrapped in
9
+ ``-Xcompiler`` or equivalent for device link). Options wrapped with
10
+ :genex:`$<DEVICE_LINK:...>` generator expression will be used
11
+ only for the device link step. Options wrapped with :genex:`$<HOST_LINK:...>`
12
+ generator expression will be used only for the host link step.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX.txt ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ A short-hand signature is:
2
+
3
+ .. parsed-literal::
4
+
5
+ |FIND_XXX| (<VAR> name1 [path1 path2 ...])
6
+
7
+ The general signature is:
8
+
9
+ .. parsed-literal::
10
+
11
+ |FIND_XXX| (
12
+ <VAR>
13
+ name | |NAMES|
14
+ [HINTS [path | ENV var]... ]
15
+ [PATHS [path | ENV var]... ]
16
+ [REGISTRY_VIEW (64|32|64_32|32_64|HOST|TARGET|BOTH)]
17
+ [PATH_SUFFIXES suffix1 [suffix2 ...]]
18
+ [VALIDATOR function]
19
+ [DOC "cache documentation string"]
20
+ [NO_CACHE]
21
+ [REQUIRED]
22
+ [NO_DEFAULT_PATH]
23
+ [NO_PACKAGE_ROOT_PATH]
24
+ [NO_CMAKE_PATH]
25
+ [NO_CMAKE_ENVIRONMENT_PATH]
26
+ [NO_SYSTEM_ENVIRONMENT_PATH]
27
+ [NO_CMAKE_SYSTEM_PATH]
28
+ [NO_CMAKE_INSTALL_PREFIX]
29
+ [CMAKE_FIND_ROOT_PATH_BOTH |
30
+ ONLY_CMAKE_FIND_ROOT_PATH |
31
+ NO_CMAKE_FIND_ROOT_PATH]
32
+ )
33
+
34
+ This command is used to find a |SEARCH_XXX_DESC|.
35
+ A cache entry, or a normal variable if ``NO_CACHE`` is specified,
36
+ named by ``<VAR>`` is created to store the result of this command.
37
+ If the |SEARCH_XXX| is found the result is stored in the variable
38
+ and the search will not be repeated unless the variable is cleared.
39
+ If nothing is found, the result will be ``<VAR>-NOTFOUND``.
40
+
41
+ Options include:
42
+
43
+ ``NAMES``
44
+ Specify one or more possible names for the |SEARCH_XXX|.
45
+
46
+ When using this to specify names with and without a version
47
+ suffix, we recommend specifying the unversioned name first
48
+ so that locally-built packages can be found before those
49
+ provided by distributions.
50
+
51
+ ``HINTS``, ``PATHS``
52
+ Specify directories to search in addition to the default locations.
53
+ The ``ENV var`` sub-option reads paths from a system environment
54
+ variable.
55
+
56
+ .. versionchanged:: 3.24
57
+ On ``Windows`` platform, it is possible to include registry queries as part
58
+ of the directories, using a :ref:`dedicated syntax <Find Using Windows Registry>`.
59
+ Such specifications will be ignored on all other platforms.
60
+
61
+ ``REGISTRY_VIEW``
62
+ .. versionadded:: 3.24
63
+
64
+ .. include:: FIND_XXX_REGISTRY_VIEW.txt
65
+
66
+ ``PATH_SUFFIXES``
67
+ Specify additional subdirectories to check below each directory
68
+ location otherwise considered.
69
+
70
+ ``VALIDATOR``
71
+ .. versionadded:: 3.25
72
+
73
+ Specify a :command:`function` to be called for each candidate item found
74
+ (a :command:`macro` cannot be provided, that will result in an error).
75
+ Two arguments will be passed to the validator function: the name of a
76
+ result variable, and the absolute path to the candidate item. The item
77
+ will be accepted and the search will end unless the function sets the
78
+ value in the result variable to false in the calling scope. The result
79
+ variable will hold a true value when the validator function is entered.
80
+
81
+ .. parsed-literal::
82
+
83
+ function(my_check validator_result_var item)
84
+ if(NOT item MATCHES ...)
85
+ set(${validator_result_var} FALSE PARENT_SCOPE)
86
+ endif()
87
+ endfunction()
88
+
89
+ |FIND_XXX| (result NAMES ... VALIDATOR my_check)
90
+
91
+ Note that if a cached result is used, the search is skipped and any
92
+ ``VALIDATOR`` is ignored. The cached result is not required to pass the
93
+ validation function.
94
+
95
+ ``DOC``
96
+ Specify the documentation string for the ``<VAR>`` cache entry.
97
+
98
+ ``NO_CACHE``
99
+ .. versionadded:: 3.21
100
+
101
+ The result of the search will be stored in a normal variable rather than
102
+ a cache entry.
103
+
104
+ .. note::
105
+
106
+ If the variable is already set before the call (as a normal or cache
107
+ variable) then the search will not occur.
108
+
109
+ .. warning::
110
+
111
+ This option should be used with caution because it can greatly increase
112
+ the cost of repeated configure steps.
113
+
114
+ ``REQUIRED``
115
+ .. versionadded:: 3.18
116
+
117
+ Stop processing with an error message if nothing is found, otherwise
118
+ the search will be attempted again the next time |FIND_XXX| is invoked
119
+ with the same variable.
120
+
121
+ If ``NO_DEFAULT_PATH`` is specified, then no additional paths are
122
+ added to the search.
123
+ If ``NO_DEFAULT_PATH`` is not specified, the search process is as follows:
124
+
125
+ .. |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX_SUBDIR| replace::
126
+ |prefix_XXX_SUBDIR| for each ``<prefix>`` in the
127
+ :variable:`<PackageName>_ROOT` CMake variable and the
128
+ :envvar:`<PackageName>_ROOT` environment variable if
129
+ called from within a find module loaded by
130
+ :command:`find_package(<PackageName>)`
131
+
132
+ .. |CMAKE_PREFIX_PATH_XXX_SUBDIR| replace::
133
+ |prefix_XXX_SUBDIR| for each ``<prefix>`` in :variable:`CMAKE_PREFIX_PATH`
134
+
135
+ .. |ENV_CMAKE_PREFIX_PATH_XXX_SUBDIR| replace::
136
+ |prefix_XXX_SUBDIR| for each ``<prefix>`` in :envvar:`CMAKE_PREFIX_PATH`
137
+
138
+ .. |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR| replace::
139
+ |prefix_XXX_SUBDIR| for each ``<prefix>/[s]bin`` in ``PATH``, and
140
+ |entry_XXX_SUBDIR| for other entries in ``PATH``
141
+
142
+ .. |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR| replace::
143
+ |prefix_XXX_SUBDIR| for each ``<prefix>`` in
144
+ :variable:`CMAKE_SYSTEM_PREFIX_PATH`
145
+
146
+ 1. If called from within a find module or any other script loaded by a call to
147
+ :command:`find_package(<PackageName>)`, search prefixes unique to the
148
+ current package being found. See policy :policy:`CMP0074`.
149
+
150
+ .. versionadded:: 3.12
151
+
152
+ Specifically, search paths specified by the following variables, in order:
153
+
154
+ a. :variable:`<PackageName>_ROOT` CMake variable,
155
+ where ``<PackageName>`` is the case-preserved package name.
156
+
157
+ b. :variable:`<PACKAGENAME>_ROOT` CMake variable,
158
+ where ``<PACKAGENAME>`` is the upper-cased package name.
159
+ See policy :policy:`CMP0144`.
160
+
161
+ .. versionadded:: 3.27
162
+
163
+ c. :envvar:`<PackageName>_ROOT` environment variable,
164
+ where ``<PackageName>`` is the case-preserved package name.
165
+
166
+ d. :envvar:`<PACKAGENAME>_ROOT` environment variable,
167
+ where ``<PACKAGENAME>`` is the upper-cased package name.
168
+ See policy :policy:`CMP0144`.
169
+
170
+ .. versionadded:: 3.27
171
+
172
+ The package root variables are maintained as a stack, so if called from
173
+ nested find modules or config packages, root paths from the parent's find
174
+ module or config package will be searched after paths from the current
175
+ module or package. In other words, the search order would be
176
+ ``<CurrentPackage>_ROOT``, ``ENV{<CurrentPackage>_ROOT}``,
177
+ ``<ParentPackage>_ROOT``, ``ENV{<ParentPackage>_ROOT}``, etc.
178
+ This can be skipped if ``NO_PACKAGE_ROOT_PATH`` is passed or by setting
179
+ the :variable:`CMAKE_FIND_USE_PACKAGE_ROOT_PATH` to ``FALSE``.
180
+
181
+ * |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX|
182
+
183
+ 2. Search paths specified in cmake-specific cache variables.
184
+ These are intended to be used on the command line with a ``-DVAR=value``.
185
+ The values are interpreted as :ref:`semicolon-separated lists <CMake Language Lists>`.
186
+ This can be skipped if ``NO_CMAKE_PATH`` is passed or by setting the
187
+ :variable:`CMAKE_FIND_USE_CMAKE_PATH` to ``FALSE``.
188
+
189
+ * |CMAKE_PREFIX_PATH_XXX|
190
+ * |CMAKE_XXX_PATH|
191
+ * |CMAKE_XXX_MAC_PATH|
192
+
193
+ 3. Search paths specified in cmake-specific environment variables.
194
+ These are intended to be set in the user's shell configuration,
195
+ and therefore use the host's native path separator
196
+ (``;`` on Windows and ``:`` on UNIX).
197
+ This can be skipped if ``NO_CMAKE_ENVIRONMENT_PATH`` is passed or
198
+ by setting the :variable:`CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH` to ``FALSE``.
199
+
200
+ * |ENV_CMAKE_PREFIX_PATH_XXX|
201
+ * |ENV_CMAKE_XXX_PATH|
202
+ * |ENV_CMAKE_XXX_MAC_PATH|
203
+
204
+ 4. Search the paths specified by the ``HINTS`` option.
205
+ These should be paths computed by system introspection, such as a
206
+ hint provided by the location of another item already found.
207
+ Hard-coded guesses should be specified with the ``PATHS`` option.
208
+
209
+ 5. Search the standard system environment variables.
210
+ This can be skipped if ``NO_SYSTEM_ENVIRONMENT_PATH`` is passed or by
211
+ setting the :variable:`CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH` to ``FALSE``.
212
+
213
+ * |SYSTEM_ENVIRONMENT_PATH_XXX|
214
+ * |SYSTEM_ENVIRONMENT_PATH_WINDOWS_XXX|
215
+
216
+ 6. Search cmake variables defined in the Platform files
217
+ for the current system. The searching of ``CMAKE_INSTALL_PREFIX`` and
218
+ ``CMAKE_STAGING_PREFIX`` can be
219
+ skipped if ``NO_CMAKE_INSTALL_PREFIX`` is passed or by setting the
220
+ :variable:`CMAKE_FIND_USE_INSTALL_PREFIX` to ``FALSE``. All these locations
221
+ can be skipped if ``NO_CMAKE_SYSTEM_PATH`` is passed or by setting the
222
+ :variable:`CMAKE_FIND_USE_CMAKE_SYSTEM_PATH` to ``FALSE``.
223
+
224
+ * |CMAKE_SYSTEM_PREFIX_PATH_XXX|
225
+ * |CMAKE_SYSTEM_XXX_PATH|
226
+ * |CMAKE_SYSTEM_XXX_MAC_PATH|
227
+
228
+ The platform paths that these variables contain are locations that
229
+ typically include installed software. An example being ``/usr/local`` for
230
+ UNIX based platforms.
231
+
232
+ 7. Search the paths specified by the PATHS option
233
+ or in the short-hand version of the command.
234
+ These are typically hard-coded guesses.
235
+
236
+ The :variable:`CMAKE_IGNORE_PATH`, :variable:`CMAKE_IGNORE_PREFIX_PATH`,
237
+ :variable:`CMAKE_SYSTEM_IGNORE_PATH` and
238
+ :variable:`CMAKE_SYSTEM_IGNORE_PREFIX_PATH` variables can also cause some
239
+ of the above locations to be ignored.
240
+
241
+ .. versionadded:: 3.16
242
+ Added ``CMAKE_FIND_USE_<CATEGORY>_PATH`` variables to globally disable
243
+ various search locations.
244
+
245
+ .. |FIND_ARGS_XXX| replace:: <VAR> NAMES name
246
+
247
+ On macOS the :variable:`CMAKE_FIND_FRAMEWORK` and
248
+ :variable:`CMAKE_FIND_APPBUNDLE` variables determine the order of
249
+ preference between Apple-style and unix-style package components.
250
+
251
+ .. include:: FIND_XXX_ROOT.txt
252
+ .. include:: FIND_XXX_ORDER.txt
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX_ORDER.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The default search order is designed to be most-specific to
2
+ least-specific for common use cases.
3
+ Projects may override the order by simply calling the command
4
+ multiple times and using the ``NO_*`` options:
5
+
6
+ .. parsed-literal::
7
+
8
+ |FIND_XXX| (|FIND_ARGS_XXX| PATHS paths... NO_DEFAULT_PATH)
9
+ |FIND_XXX| (|FIND_ARGS_XXX|)
10
+
11
+ Once one of the calls succeeds the result variable will be set
12
+ and stored in the cache so that no call will search again.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX_REGISTRY_VIEW.txt ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Specify which registry views must be queried. This option is only meaningful
2
+ on ``Windows`` platforms and will be ignored on other ones. When not
3
+ specified, the |FIND_XXX_REGISTRY_VIEW_DEFAULT| view is used when the
4
+ :policy:`CMP0134` policy is ``NEW``. Refer to :policy:`CMP0134` for the
5
+ default view when the policy is ``OLD``.
6
+
7
+ ``64``
8
+ Query the 64-bit registry. On 32-bit Windows, it always returns the string
9
+ ``/REGISTRY-NOTFOUND``.
10
+
11
+ ``32``
12
+ Query the 32-bit registry.
13
+
14
+ ``64_32``
15
+ Query both views (``64`` and ``32``) and generate a path for each.
16
+
17
+ ``32_64``
18
+ Query both views (``32`` and ``64``) and generate a path for each.
19
+
20
+ ``HOST``
21
+ Query the registry matching the architecture of the host: ``64`` on 64-bit
22
+ Windows and ``32`` on 32-bit Windows.
23
+
24
+ ``TARGET``
25
+ Query the registry matching the architecture specified by the
26
+ :variable:`CMAKE_SIZEOF_VOID_P` variable. If not defined, fall back to
27
+ ``HOST`` view.
28
+
29
+ ``BOTH``
30
+ Query both views (``32`` and ``64``). The order depends on the following
31
+ rules: If the :variable:`CMAKE_SIZEOF_VOID_P` variable is defined, use the
32
+ following view depending on the content of this variable:
33
+
34
+ * ``8``: ``64_32``
35
+ * ``4``: ``32_64``
36
+
37
+ If the :variable:`CMAKE_SIZEOF_VOID_P` variable is not defined, rely on the
38
+ architecture of the host:
39
+
40
+ * 64-bit: ``64_32``
41
+ * 32-bit: ``32``
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/FIND_XXX_ROOT.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The CMake variable :variable:`CMAKE_FIND_ROOT_PATH` specifies one or more
2
+ directories to be prepended to all other search directories. This
3
+ effectively "re-roots" the entire search under given locations.
4
+ Paths which are descendants of the :variable:`CMAKE_STAGING_PREFIX` are excluded
5
+ from this re-rooting, because that variable is always a path on the host system.
6
+ By default the :variable:`CMAKE_FIND_ROOT_PATH` is empty.
7
+
8
+ The :variable:`CMAKE_SYSROOT` variable can also be used to specify exactly one
9
+ directory to use as a prefix. Setting :variable:`CMAKE_SYSROOT` also has other
10
+ effects. See the documentation for that variable for more.
11
+
12
+ These variables are especially useful when cross-compiling to
13
+ point to the root directory of the target environment and CMake will
14
+ search there too. By default at first the directories listed in
15
+ :variable:`CMAKE_FIND_ROOT_PATH` are searched, then the :variable:`CMAKE_SYSROOT`
16
+ directory is searched, and then the non-rooted directories will be
17
+ searched. The default behavior can be adjusted by setting
18
+ |CMAKE_FIND_ROOT_PATH_MODE_XXX|. This behavior can be manually
19
+ overridden on a per-call basis using options:
20
+
21
+ ``CMAKE_FIND_ROOT_PATH_BOTH``
22
+ Search in the order described above.
23
+
24
+ ``NO_CMAKE_FIND_ROOT_PATH``
25
+ Do not use the :variable:`CMAKE_FIND_ROOT_PATH` variable.
26
+
27
+ ``ONLY_CMAKE_FIND_ROOT_PATH``
28
+ Search only the re-rooted directories and directories below
29
+ :variable:`CMAKE_STAGING_PREFIX`.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/GENEX_NOTE.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ .. |more_see_also| replace:: See the :manual:`cmake-buildsystem(7)` manual
2
+ for more on defining buildsystem properties.
3
+
4
+ Arguments to |command_name| may use generator expressions
5
+ with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
6
+ manual for available expressions. |more_see_also|
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/LINK_OPTIONS_LINKER.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Handling Compiler Driver Differences
2
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
+
4
+ To pass options to the linker tool, each compiler driver has its own syntax.
5
+ The ``LINKER:`` prefix and ``,`` separator can be used to specify, in a portable
6
+ way, options to pass to the linker tool. ``LINKER:`` is replaced by the
7
+ appropriate driver option and ``,`` by the appropriate driver separator.
8
+ The driver prefix and driver separator are given by the values of the
9
+ :variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG` and
10
+ :variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP` variables.
11
+
12
+ For example, ``"LINKER:-z,defs"`` becomes ``-Xlinker -z -Xlinker defs`` for
13
+ ``Clang`` and ``-Wl,-z,defs`` for ``GNU GCC``.
14
+
15
+ The ``LINKER:`` prefix can be specified as part of a ``SHELL:`` prefix
16
+ expression.
17
+
18
+ The ``LINKER:`` prefix supports, as an alternative syntax, specification of
19
+ arguments using the ``SHELL:`` prefix and space as separator. The previous
20
+ example then becomes ``"LINKER:SHELL:-z defs"``.
21
+
22
+ .. note::
23
+
24
+ Specifying the ``SHELL:`` prefix anywhere other than at the beginning of the
25
+ ``LINKER:`` prefix is not supported.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/OPTIONS_SHELL.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Option De-duplication
2
+ ^^^^^^^^^^^^^^^^^^^^^
3
+
4
+ The final set of options used for a target is constructed by
5
+ accumulating options from the current target and the usage requirements of
6
+ its dependencies. The set of options is de-duplicated to avoid repetition.
7
+
8
+ .. versionadded:: 3.12
9
+ While beneficial for individual options, the de-duplication step can break
10
+ up option groups. For example, ``-option A -option B`` becomes
11
+ ``-option A B``. One may specify a group of options using shell-like
12
+ quoting along with a ``SHELL:`` prefix. The ``SHELL:`` prefix is dropped,
13
+ and the rest of the option string is parsed using the
14
+ :command:`separate_arguments` ``UNIX_COMMAND`` mode. For example,
15
+ ``"SHELL:-option A" "SHELL:-option B"`` becomes ``-option A -option B``.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/SUPPORTED_LANGUAGES.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Supported languages are ``C``, ``CXX`` (i.e. C++), ``CSharp`` (i.e. C#), ``CUDA``,
3
+ ``OBJC`` (i.e. Objective-C), ``OBJCXX`` (i.e. Objective-C++), ``Fortran``, ``HIP``,
4
+ ``ISPC``, ``Swift``, ``ASM``, ``ASM_NASM``, ``ASM_MARMASM``, ``ASM_MASM``, and ``ASM-ATT``.
5
+
6
+ .. versionadded:: 3.8
7
+ Added ``CSharp`` and ``CUDA`` support.
8
+
9
+ .. versionadded:: 3.15
10
+ Added ``Swift`` support.
11
+
12
+ .. versionadded:: 3.16
13
+ Added ``OBJC`` and ``OBJCXX`` support.
14
+
15
+ .. versionadded:: 3.18
16
+ Added ``ISPC`` support.
17
+
18
+ .. versionadded:: 3.21
19
+ Added ``HIP`` support.
20
+
21
+ .. versionadded:: 3.26
22
+ Added ``ASM_MARMASM`` support.
23
+
24
+ If enabling ``ASM``, list it last so that CMake can check whether
25
+ compilers for other languages like ``C`` work for assembly too.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/UNSET_NOTE.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ .. note::
2
+
3
+ When evaluating :ref:`Variable References` of the form ``${VAR}``, CMake
4
+ first searches for a normal variable with that name. If no such normal
5
+ variable exists, CMake will then search for a cache entry with that name.
6
+ Because of this, **unsetting a normal variable can expose a cache variable
7
+ that was previously hidden**. To force a variable reference of the form
8
+ ``${VAR}`` to return an empty string, use ``set(<variable> "")``, which
9
+ clears the normal variable but leaves it defined.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_compile_definitions.rst ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_compile_definitions
2
+ -----------------------
3
+
4
+ .. versionadded:: 3.12
5
+
6
+ Add preprocessor definitions to the compilation of source files.
7
+
8
+ .. code-block:: cmake
9
+
10
+ add_compile_definitions(<definition> ...)
11
+
12
+ Adds preprocessor definitions to the compiler command line.
13
+
14
+ The preprocessor definitions are added to the :prop_dir:`COMPILE_DEFINITIONS`
15
+ directory property for the current ``CMakeLists`` file. They are also added to
16
+ the :prop_tgt:`COMPILE_DEFINITIONS` target property for each target in the
17
+ current ``CMakeLists`` file.
18
+
19
+ Definitions are specified using the syntax ``VAR`` or ``VAR=value``.
20
+ Function-style definitions are not supported. CMake will automatically
21
+ escape the value correctly for the native build system (note that CMake
22
+ language syntax may require escapes to specify some values).
23
+
24
+ .. versionadded:: 3.26
25
+ Any leading ``-D`` on an item will be removed.
26
+
27
+ .. |command_name| replace:: ``add_compile_definitions``
28
+ .. include:: GENEX_NOTE.txt
29
+
30
+ See Also
31
+ ^^^^^^^^
32
+
33
+ * The command :command:`target_compile_definitions` adds target-specific definitions.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_compile_options.rst ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_compile_options
2
+ -------------------
3
+
4
+ Add options to the compilation of source files.
5
+
6
+ .. code-block:: cmake
7
+
8
+ add_compile_options(<option> ...)
9
+
10
+ Adds options to the :prop_dir:`COMPILE_OPTIONS` directory property.
11
+ These options are used when compiling targets from the current
12
+ directory and below.
13
+
14
+ .. note::
15
+
16
+ These options are not used when linking.
17
+ See the :command:`add_link_options` command for that.
18
+
19
+ Arguments
20
+ ^^^^^^^^^
21
+
22
+ .. |command_name| replace:: ``add_compile_options``
23
+ .. include:: GENEX_NOTE.txt
24
+
25
+ .. include:: OPTIONS_SHELL.txt
26
+
27
+ Example
28
+ ^^^^^^^
29
+
30
+ Since different compilers support different options, a typical use of
31
+ this command is in a compiler-specific conditional clause:
32
+
33
+ .. code-block:: cmake
34
+
35
+ if (MSVC)
36
+ # warning level 4
37
+ add_compile_options(/W4)
38
+ else()
39
+ # additional warnings
40
+ add_compile_options(-Wall -Wextra -Wpedantic)
41
+ endif()
42
+
43
+ To set per-language options, use the :genex:`$<COMPILE_LANGUAGE>`
44
+ or :genex:`$<COMPILE_LANGUAGE:languages>` generator expressions.
45
+
46
+ See Also
47
+ ^^^^^^^^
48
+
49
+ * This command can be used to add any options. However, for
50
+ adding preprocessor definitions and include directories it is recommended
51
+ to use the more specific commands :command:`add_compile_definitions`
52
+ and :command:`include_directories`.
53
+
54
+ * The command :command:`target_compile_options` adds target-specific options.
55
+
56
+ * This command adds compile options for all languages.
57
+ Use the :genex:`COMPILE_LANGUAGE` generator expression to specify
58
+ per-language compile options.
59
+
60
+ * The source file property :prop_sf:`COMPILE_OPTIONS` adds options to one
61
+ source file.
62
+
63
+ * :command:`add_link_options` adds options for linking.
64
+
65
+ * :variable:`CMAKE_<LANG>_FLAGS` and :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>`
66
+ add language-wide flags passed to all invocations of the compiler.
67
+ This includes invocations that drive compiling and those that drive linking.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_custom_command.rst ADDED
@@ -0,0 +1,577 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_custom_command
2
+ ------------------
3
+
4
+ Add a custom build rule to the generated build system.
5
+
6
+ There are two main signatures for ``add_custom_command``.
7
+
8
+ Generating Files
9
+ ^^^^^^^^^^^^^^^^
10
+
11
+ The first signature is for adding a custom command to produce an output:
12
+
13
+ .. code-block:: cmake
14
+
15
+ add_custom_command(OUTPUT output1 [output2 ...]
16
+ COMMAND command1 [ARGS] [args1...]
17
+ [COMMAND command2 [ARGS] [args2...] ...]
18
+ [MAIN_DEPENDENCY depend]
19
+ [DEPENDS [depends...]]
20
+ [BYPRODUCTS [files...]]
21
+ [IMPLICIT_DEPENDS <lang1> depend1
22
+ [<lang2> depend2] ...]
23
+ [WORKING_DIRECTORY dir]
24
+ [COMMENT comment]
25
+ [DEPFILE depfile]
26
+ [JOB_POOL job_pool]
27
+ [VERBATIM] [APPEND] [USES_TERMINAL]
28
+ [COMMAND_EXPAND_LISTS]
29
+ [DEPENDS_EXPLICIT_ONLY])
30
+
31
+ This defines a command to generate specified ``OUTPUT`` file(s).
32
+ A target created in the same directory (``CMakeLists.txt`` file)
33
+ that specifies any output of the custom command as a source file
34
+ is given a rule to generate the file using the command at build time.
35
+
36
+ Do not list the output in more than one independent target that
37
+ may build in parallel or the instances of the rule may conflict.
38
+ Instead, use the :command:`add_custom_target` command to drive the
39
+ command and make the other targets depend on that one. See the
40
+ `Example: Generating Files for Multiple Targets`_ below.
41
+
42
+ The options are:
43
+
44
+ ``APPEND``
45
+ Append the ``COMMAND`` and ``DEPENDS`` option values to the custom
46
+ command for the first output specified. There must have already
47
+ been a previous call to this command with the same output.
48
+
49
+ If the previous call specified the output via a generator expression,
50
+ the output specified by the current call must match in at least one
51
+ configuration after evaluating generator expressions. In this case,
52
+ the appended commands and dependencies apply to all configurations.
53
+
54
+ The ``COMMENT``, ``MAIN_DEPENDENCY``, and ``WORKING_DIRECTORY``
55
+ options are currently ignored when APPEND is given, but may be
56
+ used in the future.
57
+
58
+ ``BYPRODUCTS``
59
+ .. versionadded:: 3.2
60
+
61
+ Specify the files the command is expected to produce but whose
62
+ modification time may or may not be newer than the dependencies.
63
+ If a byproduct name is a relative path it will be interpreted
64
+ relative to the build tree directory corresponding to the
65
+ current source directory.
66
+ Each byproduct file will be marked with the :prop_sf:`GENERATED`
67
+ source file property automatically.
68
+
69
+ *See policy* :policy:`CMP0058` *for the motivation behind this feature.*
70
+
71
+ Explicit specification of byproducts is supported by the
72
+ :generator:`Ninja` generator to tell the ``ninja`` build tool
73
+ how to regenerate byproducts when they are missing. It is
74
+ also useful when other build rules (e.g. custom commands)
75
+ depend on the byproducts. Ninja requires a build rule for any
76
+ generated file on which another rule depends even if there are
77
+ order-only dependencies to ensure the byproducts will be
78
+ available before their dependents build.
79
+
80
+ The :ref:`Makefile Generators` will remove ``BYPRODUCTS`` and other
81
+ :prop_sf:`GENERATED` files during ``make clean``.
82
+
83
+ .. versionadded:: 3.20
84
+ Arguments to ``BYPRODUCTS`` may use a restricted set of
85
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
86
+ :ref:`Target-dependent expressions <Target-Dependent Queries>` are not
87
+ permitted.
88
+
89
+ ``COMMAND``
90
+ Specify the command-line(s) to execute at build time.
91
+ If more than one ``COMMAND`` is specified they will be executed in order,
92
+ but *not* necessarily composed into a stateful shell or batch script.
93
+ (To run a full script, use the :command:`configure_file` command or the
94
+ :command:`file(GENERATE)` command to create it, and then specify
95
+ a ``COMMAND`` to launch it.)
96
+ The optional ``ARGS`` argument is for backward compatibility and
97
+ will be ignored.
98
+
99
+ If ``COMMAND`` specifies an executable target name (created by the
100
+ :command:`add_executable` command), it will automatically be replaced
101
+ by the location of the executable created at build time if either of
102
+ the following is true:
103
+
104
+ * The target is not being cross-compiled (i.e. the
105
+ :variable:`CMAKE_CROSSCOMPILING` variable is not set to true).
106
+ * .. versionadded:: 3.6
107
+ The target is being cross-compiled and an emulator is provided (i.e.
108
+ its :prop_tgt:`CROSSCOMPILING_EMULATOR` target property is set).
109
+ In this case, the contents of :prop_tgt:`CROSSCOMPILING_EMULATOR` will be
110
+ prepended to the command before the location of the target executable.
111
+
112
+ If neither of the above conditions are met, it is assumed that the
113
+ command name is a program to be found on the ``PATH`` at build time.
114
+
115
+ Arguments to ``COMMAND`` may use
116
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
117
+ Use the :genex:`TARGET_FILE` generator expression to refer to the location
118
+ of a target later in the command line (i.e. as a command argument rather
119
+ than as the command to execute).
120
+
121
+ Whenever one of the following target based generator expressions are used as
122
+ a command to execute or is mentioned in a command argument, a target-level
123
+ dependency will be added automatically so that the mentioned target will be
124
+ built before any target using this custom command
125
+ (see policy :policy:`CMP0112`).
126
+
127
+ * ``TARGET_FILE``
128
+ * ``TARGET_LINKER_FILE``
129
+ * ``TARGET_SONAME_FILE``
130
+ * ``TARGET_PDB_FILE``
131
+
132
+ This target-level dependency does NOT add a file-level dependency that would
133
+ cause the custom command to re-run whenever the executable is recompiled.
134
+ List target names with the ``DEPENDS`` option to add such file-level
135
+ dependencies.
136
+
137
+
138
+ ``COMMENT``
139
+ Display the given message before the commands are executed at
140
+ build time.
141
+
142
+ .. versionadded:: 3.26
143
+ Arguments to ``COMMENT`` may use
144
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
145
+
146
+ ``DEPENDS``
147
+ Specify files on which the command depends. Each argument is converted
148
+ to a dependency as follows:
149
+
150
+ 1. If the argument is the name of a target (created by the
151
+ :command:`add_custom_target`, :command:`add_executable`, or
152
+ :command:`add_library` command) a target-level dependency is
153
+ created to make sure the target is built before any target
154
+ using this custom command. Additionally, if the target is an
155
+ executable or library, a file-level dependency is created to
156
+ cause the custom command to re-run whenever the target is
157
+ recompiled.
158
+
159
+ 2. If the argument is an absolute path, a file-level dependency
160
+ is created on that path.
161
+
162
+ 3. If the argument is the name of a source file that has been
163
+ added to a target or on which a source file property has been set,
164
+ a file-level dependency is created on that source file.
165
+
166
+ 4. If the argument is a relative path and it exists in the current
167
+ source directory, a file-level dependency is created on that
168
+ file in the current source directory.
169
+
170
+ 5. Otherwise, a file-level dependency is created on that path relative
171
+ to the current binary directory.
172
+
173
+ If any dependency is an ``OUTPUT`` of another custom command in the same
174
+ directory (``CMakeLists.txt`` file), CMake automatically brings the other
175
+ custom command into the target in which this command is built.
176
+
177
+ .. versionadded:: 3.16
178
+ A target-level dependency is added if any dependency is listed as
179
+ ``BYPRODUCTS`` of a target or any of its build events in the same
180
+ directory to ensure the byproducts will be available.
181
+
182
+ If ``DEPENDS`` is not specified, the command will run whenever
183
+ the ``OUTPUT`` is missing; if the command does not actually
184
+ create the ``OUTPUT``, the rule will always run.
185
+
186
+ .. versionadded:: 3.1
187
+ Arguments to ``DEPENDS`` may use
188
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
189
+
190
+ ``COMMAND_EXPAND_LISTS``
191
+ .. versionadded:: 3.8
192
+
193
+ Lists in ``COMMAND`` arguments will be expanded, including those
194
+ created with
195
+ :manual:`generator expressions <cmake-generator-expressions(7)>`,
196
+ allowing ``COMMAND`` arguments such as
197
+ ``${CC} "-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>" foo.cc``
198
+ to be properly expanded.
199
+
200
+ ``IMPLICIT_DEPENDS``
201
+ Request scanning of implicit dependencies of an input file.
202
+ The language given specifies the programming language whose
203
+ corresponding dependency scanner should be used.
204
+ Currently only ``C`` and ``CXX`` language scanners are supported.
205
+ The language has to be specified for every file in the
206
+ ``IMPLICIT_DEPENDS`` list. Dependencies discovered from the
207
+ scanning are added to those of the custom command at build time.
208
+ Note that the ``IMPLICIT_DEPENDS`` option is currently supported
209
+ only for Makefile generators and will be ignored by other generators.
210
+
211
+ .. note::
212
+
213
+ This option cannot be specified at the same time as ``DEPFILE`` option.
214
+
215
+ ``JOB_POOL``
216
+ .. versionadded:: 3.15
217
+
218
+ Specify a :prop_gbl:`pool <JOB_POOLS>` for the :generator:`Ninja`
219
+ generator. Incompatible with ``USES_TERMINAL``, which implies
220
+ the ``console`` pool.
221
+ Using a pool that is not defined by :prop_gbl:`JOB_POOLS` causes
222
+ an error by ninja at build time.
223
+
224
+ ``MAIN_DEPENDENCY``
225
+ Specify the primary input source file to the command. This is
226
+ treated just like any value given to the ``DEPENDS`` option
227
+ but also suggests to Visual Studio generators where to hang
228
+ the custom command. Each source file may have at most one command
229
+ specifying it as its main dependency. A compile command (i.e. for a
230
+ library or an executable) counts as an implicit main dependency which
231
+ gets silently overwritten by a custom command specification.
232
+
233
+ ``OUTPUT``
234
+ Specify the output files the command is expected to produce.
235
+ Each output file will be marked with the :prop_sf:`GENERATED`
236
+ source file property automatically.
237
+ If the output of the custom command is not actually created
238
+ as a file on disk it should be marked with the :prop_sf:`SYMBOLIC`
239
+ source file property.
240
+
241
+ If an output file name is a relative path, its absolute path is
242
+ determined by interpreting it relative to:
243
+
244
+ 1. the build directory corresponding to the current source directory
245
+ (:variable:`CMAKE_CURRENT_BINARY_DIR`), or
246
+
247
+ 2. the current source directory (:variable:`CMAKE_CURRENT_SOURCE_DIR`).
248
+
249
+ The path in the build directory is preferred unless the path in the
250
+ source tree is mentioned as an absolute source file path elsewhere
251
+ in the current directory.
252
+
253
+ .. versionadded:: 3.20
254
+ Arguments to ``OUTPUT`` may use a restricted set of
255
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
256
+ :ref:`Target-dependent expressions <Target-Dependent Queries>` are not
257
+ permitted.
258
+
259
+ ``USES_TERMINAL``
260
+ .. versionadded:: 3.2
261
+
262
+ The command will be given direct access to the terminal if possible.
263
+ With the :generator:`Ninja` generator, this places the command in
264
+ the ``console`` :prop_gbl:`pool <JOB_POOLS>`.
265
+
266
+ ``VERBATIM``
267
+ All arguments to the commands will be escaped properly for the
268
+ build tool so that the invoked command receives each argument
269
+ unchanged. Note that one level of escapes is still used by the
270
+ CMake language processor before add_custom_command even sees the
271
+ arguments. Use of ``VERBATIM`` is recommended as it enables
272
+ correct behavior. When ``VERBATIM`` is not given the behavior
273
+ is platform specific because there is no protection of
274
+ tool-specific special characters.
275
+
276
+ ``WORKING_DIRECTORY``
277
+ Execute the command with the given current working directory.
278
+ If it is a relative path it will be interpreted relative to the
279
+ build tree directory corresponding to the current source directory.
280
+
281
+ .. versionadded:: 3.13
282
+ Arguments to ``WORKING_DIRECTORY`` may use
283
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
284
+
285
+ ``DEPFILE``
286
+ .. versionadded:: 3.7
287
+
288
+ Specify a depfile which holds dependencies for the custom command. It is
289
+ usually emitted by the custom command itself. This keyword may only be used
290
+ if the generator supports it, as detailed below.
291
+
292
+ The expected format, compatible with what is generated by ``gcc`` with the
293
+ option ``-M``, is independent of the generator or platform.
294
+
295
+ The formal syntax, as specified using
296
+ `BNF <https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form>`_ notation with
297
+ the regular extensions, is the following:
298
+
299
+ .. raw:: latex
300
+
301
+ \begin{small}
302
+
303
+ .. productionlist:: depfile
304
+ depfile: `rule`*
305
+ rule: `targets` (':' (`separator` `dependencies`?)?)? `eol`
306
+ targets: `target` (`separator` `target`)* `separator`*
307
+ target: `pathname`
308
+ dependencies: `dependency` (`separator` `dependency`)* `separator`*
309
+ dependency: `pathname`
310
+ separator: (`space` | `line_continue`)+
311
+ line_continue: '\' `eol`
312
+ space: ' ' | '\t'
313
+ pathname: `character`+
314
+ character: `std_character` | `dollar` | `hash` | `whitespace`
315
+ std_character: <any character except '$', '#' or ' '>
316
+ dollar: '$$'
317
+ hash: '\#'
318
+ whitespace: '\ '
319
+ eol: '\r'? '\n'
320
+
321
+ .. raw:: latex
322
+
323
+ \end{small}
324
+
325
+ .. note::
326
+
327
+ As part of ``pathname``, any slash and backslash is interpreted as
328
+ a directory separator.
329
+
330
+ .. versionadded:: 3.7
331
+ The :generator:`Ninja` generator supports ``DEPFILE`` since the keyword
332
+ was first added.
333
+
334
+ .. versionadded:: 3.17
335
+ Added the :generator:`Ninja Multi-Config` generator, which included
336
+ support for the ``DEPFILE`` keyword.
337
+
338
+ .. versionadded:: 3.20
339
+ Added support for :ref:`Makefile Generators`.
340
+
341
+ .. note::
342
+
343
+ ``DEPFILE`` cannot be specified at the same time as the
344
+ ``IMPLICIT_DEPENDS`` option for :ref:`Makefile Generators`.
345
+
346
+ .. versionadded:: 3.21
347
+ Added support for :ref:`Visual Studio Generators` with VS 2012 and above,
348
+ and for the :generator:`Xcode` generator. Support for
349
+ :manual:`generator expressions <cmake-generator-expressions(7)>` was also
350
+ added.
351
+
352
+ Using ``DEPFILE`` with generators other than those listed above is an error.
353
+
354
+ If the ``DEPFILE`` argument is relative, it should be relative to
355
+ :variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the
356
+ ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`.
357
+ See policy :policy:`CMP0116`, which is always ``NEW`` for
358
+ :ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
359
+ and the :generator:`Xcode` generator.
360
+
361
+ ``DEPENDS_EXPLICIT_ONLY``
362
+
363
+ .. versionadded:: 3.27
364
+
365
+ Indicates that the command's ``DEPENDS`` argument represents all files
366
+ required by the command and implicit dependencies are not required.
367
+
368
+ Without this option, if any target uses the output of the custom command,
369
+ CMake will consider that target's dependencies as implicit dependencies for
370
+ the custom command in case this custom command requires files implicitly
371
+ created by those targets.
372
+
373
+ This option can be enabled on all custom commands by setting
374
+ :variable:`CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to ``ON``.
375
+
376
+ Only the :ref:`Ninja Generators` actually use this information to remove
377
+ unnecessary implicit dependencies.
378
+
379
+ See also the :prop_tgt:`OPTIMIZE_DEPENDENCIES` target property, which may
380
+ provide another way for reducing the impact of target dependencies in some
381
+ scenarios.
382
+
383
+ Examples: Generating Files
384
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
385
+
386
+ Custom commands may be used to generate source files.
387
+ For example, the code:
388
+
389
+ .. code-block:: cmake
390
+
391
+ add_custom_command(
392
+ OUTPUT out.c
393
+ COMMAND someTool -i ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
394
+ -o out.c
395
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
396
+ VERBATIM)
397
+ add_library(myLib out.c)
398
+
399
+ adds a custom command to run ``someTool`` to generate ``out.c`` and then
400
+ compile the generated source as part of a library. The generation rule
401
+ will re-run whenever ``in.txt`` changes.
402
+
403
+ .. versionadded:: 3.20
404
+ One may use generator expressions to specify per-configuration outputs.
405
+ For example, the code:
406
+
407
+ .. code-block:: cmake
408
+
409
+ add_custom_command(
410
+ OUTPUT "out-$<CONFIG>.c"
411
+ COMMAND someTool -i ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
412
+ -o "out-$<CONFIG>.c"
413
+ -c "$<CONFIG>"
414
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
415
+ VERBATIM)
416
+ add_library(myLib "out-$<CONFIG>.c")
417
+
418
+ adds a custom command to run ``someTool`` to generate ``out-<config>.c``,
419
+ where ``<config>`` is the build configuration, and then compile the generated
420
+ source as part of a library.
421
+
422
+ Example: Generating Files for Multiple Targets
423
+ """"""""""""""""""""""""""""""""""""""""""""""
424
+
425
+ If multiple independent targets need the same custom command output,
426
+ it must be attached to a single custom target on which they all depend.
427
+ Consider the following example:
428
+
429
+ .. code-block:: cmake
430
+
431
+ add_custom_command(
432
+ OUTPUT table.csv
433
+ COMMAND makeTable -i ${CMAKE_CURRENT_SOURCE_DIR}/input.dat
434
+ -o table.csv
435
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/input.dat
436
+ VERBATIM)
437
+ add_custom_target(generate_table_csv DEPENDS table.csv)
438
+
439
+ add_custom_command(
440
+ OUTPUT foo.cxx
441
+ COMMAND genFromTable -i table.csv -case foo -o foo.cxx
442
+ DEPENDS table.csv # file-level dependency
443
+ generate_table_csv # target-level dependency
444
+ VERBATIM)
445
+ add_library(foo foo.cxx)
446
+
447
+ add_custom_command(
448
+ OUTPUT bar.cxx
449
+ COMMAND genFromTable -i table.csv -case bar -o bar.cxx
450
+ DEPENDS table.csv # file-level dependency
451
+ generate_table_csv # target-level dependency
452
+ VERBATIM)
453
+ add_library(bar bar.cxx)
454
+
455
+ Output ``foo.cxx`` is needed only by target ``foo`` and output ``bar.cxx``
456
+ is needed only by target ``bar``, but *both* targets need ``table.csv``,
457
+ transitively. Since ``foo`` and ``bar`` are independent targets that may
458
+ build concurrently, we prevent them from racing to generate ``table.csv``
459
+ by placing its custom command in a separate target, ``generate_table_csv``.
460
+ The custom commands generating ``foo.cxx`` and ``bar.cxx`` each specify a
461
+ target-level dependency on ``generate_table_csv``, so the targets using them,
462
+ ``foo`` and ``bar``, will not build until after target ``generate_table_csv``
463
+ is built.
464
+
465
+ .. _`add_custom_command(TARGET)`:
466
+
467
+ Build Events
468
+ ^^^^^^^^^^^^
469
+
470
+ The second signature adds a custom command to a target such as a
471
+ library or executable. This is useful for performing an operation
472
+ before or after building the target. The command becomes part of the
473
+ target and will only execute when the target itself is built. If the
474
+ target is already built, the command will not execute.
475
+
476
+ .. code-block:: cmake
477
+
478
+ add_custom_command(TARGET <target>
479
+ PRE_BUILD | PRE_LINK | POST_BUILD
480
+ COMMAND command1 [ARGS] [args1...]
481
+ [COMMAND command2 [ARGS] [args2...] ...]
482
+ [BYPRODUCTS [files...]]
483
+ [WORKING_DIRECTORY dir]
484
+ [COMMENT comment]
485
+ [VERBATIM]
486
+ [COMMAND_EXPAND_LISTS])
487
+
488
+ This defines a new command that will be associated with building the
489
+ specified ``<target>``. The ``<target>`` must be defined in the current
490
+ directory; targets defined in other directories may not be specified.
491
+
492
+ When the command will happen is determined by which
493
+ of the following is specified:
494
+
495
+ ``PRE_BUILD``
496
+ This option has unique behavior for the :ref:`Visual Studio Generators`.
497
+ When using one of the Visual Studio generators, the command will run before
498
+ any other rules are executed within the target. With all other generators,
499
+ this option behaves the same as ``PRE_LINK`` instead. Because of this,
500
+ it is recommended to avoid using ``PRE_BUILD`` except when it is known that
501
+ a Visual Studio generator is being used.
502
+ ``PRE_LINK``
503
+ Run after sources have been compiled but before linking the binary
504
+ or running the librarian or archiver tool of a static library.
505
+ This is not defined for targets created by the
506
+ :command:`add_custom_target` command.
507
+ ``POST_BUILD``
508
+ Run after all other rules within the target have been executed.
509
+
510
+ Projects should always specify one of the above three keywords when using
511
+ the ``TARGET`` form. For backward compatibility reasons, ``POST_BUILD`` is
512
+ assumed if no such keyword is given, but projects should explicitly provide
513
+ one of the keywords to make clear the behavior they expect.
514
+
515
+ .. note::
516
+ Because generator expressions can be used in custom commands,
517
+ it is possible to define ``COMMAND`` lines or whole custom commands
518
+ which evaluate to empty strings for certain configurations.
519
+ For **Visual Studio 11 2012 (and newer)** generators these command
520
+ lines or custom commands will be omitted for the specific
521
+ configuration and no "empty-string-command" will be added.
522
+
523
+ This allows to add individual build events for every configuration.
524
+
525
+ .. versionadded:: 3.21
526
+ Support for target-dependent generator expressions.
527
+
528
+ Examples: Build Events
529
+ ^^^^^^^^^^^^^^^^^^^^^^
530
+
531
+ A ``POST_BUILD`` event may be used to post-process a binary after linking.
532
+ For example, the code:
533
+
534
+ .. code-block:: cmake
535
+
536
+ add_executable(myExe myExe.c)
537
+ add_custom_command(
538
+ TARGET myExe POST_BUILD
539
+ COMMAND someHasher -i "$<TARGET_FILE:myExe>"
540
+ -o "$<TARGET_FILE:myExe>.hash"
541
+ VERBATIM)
542
+
543
+ will run ``someHasher`` to produce a ``.hash`` file next to the executable
544
+ after linking.
545
+
546
+ .. versionadded:: 3.20
547
+ One may use generator expressions to specify per-configuration byproducts.
548
+ For example, the code:
549
+
550
+ .. code-block:: cmake
551
+
552
+ add_library(myPlugin MODULE myPlugin.c)
553
+ add_custom_command(
554
+ TARGET myPlugin POST_BUILD
555
+ COMMAND someHasher -i "$<TARGET_FILE:myPlugin>"
556
+ --as-code "myPlugin-hash-$<CONFIG>.c"
557
+ BYPRODUCTS "myPlugin-hash-$<CONFIG>.c"
558
+ VERBATIM)
559
+ add_executable(myExe myExe.c "myPlugin-hash-$<CONFIG>.c")
560
+
561
+ will run ``someHasher`` after linking ``myPlugin``, e.g. to produce a ``.c``
562
+ file containing code to check the hash of ``myPlugin`` that the ``myExe``
563
+ executable can use to verify it before loading.
564
+
565
+ Ninja Multi-Config
566
+ ^^^^^^^^^^^^^^^^^^
567
+
568
+ .. versionadded:: 3.20
569
+
570
+ ``add_custom_command`` supports the :generator:`Ninja Multi-Config`
571
+ generator's cross-config capabilities. See the generator documentation
572
+ for more information.
573
+
574
+ See Also
575
+ ^^^^^^^^
576
+
577
+ * :command:`add_custom_target`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_custom_target.rst ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_custom_target
2
+ -----------------
3
+
4
+ Add a target with no output so it will always be built.
5
+
6
+ .. code-block:: cmake
7
+
8
+ add_custom_target(Name [ALL] [command1 [args1...]]
9
+ [COMMAND command2 [args2...] ...]
10
+ [DEPENDS depend depend depend ... ]
11
+ [BYPRODUCTS [files...]]
12
+ [WORKING_DIRECTORY dir]
13
+ [COMMENT comment]
14
+ [JOB_POOL job_pool]
15
+ [VERBATIM] [USES_TERMINAL]
16
+ [COMMAND_EXPAND_LISTS]
17
+ [SOURCES src1 [src2...]])
18
+
19
+ Adds a target with the given name that executes the given commands.
20
+ The target has no output file and is *always considered out of date*
21
+ even if the commands try to create a file with the name of the target.
22
+ Use the :command:`add_custom_command` command to generate a file with
23
+ dependencies. By default nothing depends on the custom target. Use
24
+ the :command:`add_dependencies` command to add dependencies to or
25
+ from other targets.
26
+
27
+ The options are:
28
+
29
+ ``ALL``
30
+ Indicate that this target should be added to the default build
31
+ target so that it will be run every time (the command cannot be
32
+ called ``ALL``).
33
+
34
+ ``BYPRODUCTS``
35
+ .. versionadded:: 3.2
36
+
37
+ Specify the files the command is expected to produce but whose
38
+ modification time may or may not be updated on subsequent builds.
39
+ If a byproduct name is a relative path it will be interpreted
40
+ relative to the build tree directory corresponding to the
41
+ current source directory.
42
+ Each byproduct file will be marked with the :prop_sf:`GENERATED`
43
+ source file property automatically.
44
+
45
+ *See policy* :policy:`CMP0058` *for the motivation behind this feature.*
46
+
47
+ Explicit specification of byproducts is supported by the
48
+ :generator:`Ninja` generator to tell the ``ninja`` build tool
49
+ how to regenerate byproducts when they are missing. It is
50
+ also useful when other build rules (e.g. custom commands)
51
+ depend on the byproducts. Ninja requires a build rule for any
52
+ generated file on which another rule depends even if there are
53
+ order-only dependencies to ensure the byproducts will be
54
+ available before their dependents build.
55
+
56
+ The :ref:`Makefile Generators` will remove ``BYPRODUCTS`` and other
57
+ :prop_sf:`GENERATED` files during ``make clean``.
58
+
59
+ .. versionadded:: 3.20
60
+ Arguments to ``BYPRODUCTS`` may use a restricted set of
61
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
62
+ :ref:`Target-dependent expressions <Target-Dependent Queries>` are not
63
+ permitted.
64
+
65
+ ``COMMAND``
66
+ Specify the command-line(s) to execute at build time.
67
+ If more than one ``COMMAND`` is specified they will be executed in order,
68
+ but *not* necessarily composed into a stateful shell or batch script.
69
+ (To run a full script, use the :command:`configure_file` command or the
70
+ :command:`file(GENERATE)` command to create it, and then specify
71
+ a ``COMMAND`` to launch it.)
72
+
73
+ If ``COMMAND`` specifies an executable target name (created by the
74
+ :command:`add_executable` command), it will automatically be replaced
75
+ by the location of the executable created at build time if either of
76
+ the following is true:
77
+
78
+ * The target is not being cross-compiled (i.e. the
79
+ :variable:`CMAKE_CROSSCOMPILING` variable is not set to true).
80
+ * .. versionadded:: 3.6
81
+ The target is being cross-compiled and an emulator is provided (i.e.
82
+ its :prop_tgt:`CROSSCOMPILING_EMULATOR` target property is set).
83
+ In this case, the contents of :prop_tgt:`CROSSCOMPILING_EMULATOR` will be
84
+ prepended to the command before the location of the target executable.
85
+
86
+ If neither of the above conditions are met, it is assumed that the
87
+ command name is a program to be found on the ``PATH`` at build time.
88
+
89
+ Arguments to ``COMMAND`` may use
90
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
91
+ Use the :genex:`TARGET_FILE` generator expression to refer to the location
92
+ of a target later in the command line (i.e. as a command argument rather
93
+ than as the command to execute).
94
+
95
+ Whenever one of the following target based generator expressions are used as
96
+ a command to execute or is mentioned in a command argument, a target-level
97
+ dependency will be added automatically so that the mentioned target will be
98
+ built before this custom target (see policy :policy:`CMP0112`).
99
+
100
+ * ``TARGET_FILE``
101
+ * ``TARGET_LINKER_FILE``
102
+ * ``TARGET_SONAME_FILE``
103
+ * ``TARGET_PDB_FILE``
104
+
105
+ The command and arguments are optional and if not specified an empty
106
+ target will be created.
107
+
108
+ ``COMMENT``
109
+ Display the given message before the commands are executed at
110
+ build time.
111
+
112
+ .. versionadded:: 3.26
113
+ Arguments to ``COMMENT`` may use
114
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
115
+
116
+ ``DEPENDS``
117
+ Reference files and outputs of custom commands created with
118
+ :command:`add_custom_command` command calls in the same directory
119
+ (``CMakeLists.txt`` file). They will be brought up to date when
120
+ the target is built.
121
+
122
+ .. versionchanged:: 3.16
123
+ A target-level dependency is added if any dependency is a byproduct
124
+ of a target or any of its build events in the same directory to ensure
125
+ the byproducts will be available before this target is built.
126
+
127
+ Use the :command:`add_dependencies` command to add dependencies
128
+ on other targets.
129
+
130
+ ``COMMAND_EXPAND_LISTS``
131
+ .. versionadded:: 3.8
132
+
133
+ Lists in ``COMMAND`` arguments will be expanded, including those
134
+ created with
135
+ :manual:`generator expressions <cmake-generator-expressions(7)>`,
136
+ allowing ``COMMAND`` arguments such as
137
+ ``${CC} "-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>" foo.cc``
138
+ to be properly expanded.
139
+
140
+ ``JOB_POOL``
141
+ .. versionadded:: 3.15
142
+
143
+ Specify a :prop_gbl:`pool <JOB_POOLS>` for the :generator:`Ninja`
144
+ generator. Incompatible with ``USES_TERMINAL``, which implies
145
+ the ``console`` pool.
146
+ Using a pool that is not defined by :prop_gbl:`JOB_POOLS` causes
147
+ an error by ninja at build time.
148
+
149
+ ``SOURCES``
150
+ Specify additional source files to be included in the custom target.
151
+ Specified source files will be added to IDE project files for
152
+ convenience in editing even if they have no build rules.
153
+
154
+ ``VERBATIM``
155
+ All arguments to the commands will be escaped properly for the
156
+ build tool so that the invoked command receives each argument
157
+ unchanged. Note that one level of escapes is still used by the
158
+ CMake language processor before ``add_custom_target`` even sees
159
+ the arguments. Use of ``VERBATIM`` is recommended as it enables
160
+ correct behavior. When ``VERBATIM`` is not given the behavior
161
+ is platform specific because there is no protection of
162
+ tool-specific special characters.
163
+
164
+ ``USES_TERMINAL``
165
+ .. versionadded:: 3.2
166
+
167
+ The command will be given direct access to the terminal if possible.
168
+ With the :generator:`Ninja` generator, this places the command in
169
+ the ``console`` :prop_gbl:`pool <JOB_POOLS>`.
170
+
171
+ ``WORKING_DIRECTORY``
172
+ Execute the command with the given current working directory.
173
+ If it is a relative path it will be interpreted relative to the
174
+ build tree directory corresponding to the current source directory.
175
+
176
+ .. versionadded:: 3.13
177
+ Arguments to ``WORKING_DIRECTORY`` may use
178
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
179
+
180
+ Ninja Multi-Config
181
+ ^^^^^^^^^^^^^^^^^^
182
+
183
+ .. versionadded:: 3.20
184
+
185
+ ``add_custom_target`` supports the :generator:`Ninja Multi-Config`
186
+ generator's cross-config capabilities. See the generator documentation
187
+ for more information.
188
+
189
+ See Also
190
+ ^^^^^^^^
191
+
192
+ * :command:`add_custom_command`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_definitions.rst ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_definitions
2
+ ---------------
3
+
4
+ Add ``-D`` define flags to the compilation of source files.
5
+
6
+ .. code-block:: cmake
7
+
8
+ add_definitions(-DFOO -DBAR ...)
9
+
10
+ Adds definitions to the compiler command line for targets in the current
11
+ directory, whether added before or after this command is invoked, and for
12
+ the ones in sub-directories added after. This command can be used to add any
13
+ flags, but it is intended to add preprocessor definitions.
14
+
15
+ .. note::
16
+
17
+ This command has been superseded by alternatives:
18
+
19
+ * Use :command:`add_compile_definitions` to add preprocessor definitions.
20
+ * Use :command:`include_directories` to add include directories.
21
+ * Use :command:`add_compile_options` to add other options.
22
+
23
+ Flags beginning in ``-D`` or ``/D`` that look like preprocessor definitions are
24
+ automatically added to the :prop_dir:`COMPILE_DEFINITIONS` directory
25
+ property for the current directory. Definitions with non-trivial values
26
+ may be left in the set of flags instead of being converted for reasons of
27
+ backwards compatibility. See documentation of the
28
+ :prop_dir:`directory <COMPILE_DEFINITIONS>`,
29
+ :prop_tgt:`target <COMPILE_DEFINITIONS>`,
30
+ :prop_sf:`source file <COMPILE_DEFINITIONS>` ``COMPILE_DEFINITIONS``
31
+ properties for details on adding preprocessor definitions to specific
32
+ scopes and configurations.
33
+
34
+ See Also
35
+ ^^^^^^^^
36
+
37
+ * The :manual:`cmake-buildsystem(7)` manual for more on defining
38
+ buildsystem properties.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_dependencies.rst ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_dependencies
2
+ ----------------
3
+
4
+ Add a dependency between top-level targets.
5
+
6
+ .. code-block:: cmake
7
+
8
+ add_dependencies(<target> [<target-dependency>]...)
9
+
10
+ Makes a top-level ``<target>`` depend on other top-level targets to
11
+ ensure that they build before ``<target>`` does. A top-level target
12
+ is one created by one of the :command:`add_executable`,
13
+ :command:`add_library`, or :command:`add_custom_target` commands
14
+ (but not targets generated by CMake like ``install``).
15
+
16
+ Dependencies added to an :ref:`imported target <Imported Targets>`
17
+ or an :ref:`interface library <Interface Libraries>` are followed
18
+ transitively in its place since the target itself does not build.
19
+
20
+ .. versionadded:: 3.3
21
+ Allow adding dependencies to interface libraries.
22
+
23
+ See Also
24
+ ^^^^^^^^
25
+
26
+ * The ``DEPENDS`` option of :command:`add_custom_target` and
27
+ :command:`add_custom_command` commands for adding file-level
28
+ dependencies in custom rules.
29
+
30
+ * The :prop_sf:`OBJECT_DEPENDS` source file property to add
31
+ file-level dependencies to object files.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_executable.rst ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_executable
2
+ --------------
3
+
4
+ .. only:: html
5
+
6
+ .. contents::
7
+
8
+ Add an executable to the project using the specified source files.
9
+
10
+ Normal Executables
11
+ ^^^^^^^^^^^^^^^^^^
12
+
13
+ .. code-block:: cmake
14
+
15
+ add_executable(<name> [WIN32] [MACOSX_BUNDLE]
16
+ [EXCLUDE_FROM_ALL]
17
+ [source1] [source2 ...])
18
+
19
+ Adds an executable target called ``<name>`` to be built from the source
20
+ files listed in the command invocation. The
21
+ ``<name>`` corresponds to the logical target name and must be globally
22
+ unique within a project. The actual file name of the executable built is
23
+ constructed based on conventions of the native platform (such as
24
+ ``<name>.exe`` or just ``<name>``).
25
+
26
+ .. versionadded:: 3.1
27
+ Source arguments to ``add_executable`` may use "generator expressions" with
28
+ the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
29
+ manual for available expressions.
30
+
31
+ .. versionadded:: 3.11
32
+ The source files can be omitted if they are added later using
33
+ :command:`target_sources`.
34
+
35
+ By default the executable file will be created in the build tree
36
+ directory corresponding to the source tree directory in which the
37
+ command was invoked. See documentation of the
38
+ :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target property to change this
39
+ location. See documentation of the :prop_tgt:`OUTPUT_NAME` target property
40
+ to change the ``<name>`` part of the final file name.
41
+
42
+ If ``WIN32`` is given the property :prop_tgt:`WIN32_EXECUTABLE` will be
43
+ set on the target created. See documentation of that target property for
44
+ details.
45
+
46
+ If ``MACOSX_BUNDLE`` is given the corresponding property will be set on
47
+ the created target. See documentation of the :prop_tgt:`MACOSX_BUNDLE`
48
+ target property for details.
49
+
50
+ If ``EXCLUDE_FROM_ALL`` is given the corresponding property will be set on
51
+ the created target. See documentation of the :prop_tgt:`EXCLUDE_FROM_ALL`
52
+ target property for details.
53
+
54
+ See the :manual:`cmake-buildsystem(7)` manual for more on defining
55
+ buildsystem properties.
56
+
57
+ See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are
58
+ pre-processed, and you want to have the original sources reachable from
59
+ within IDE.
60
+
61
+ Imported Executables
62
+ ^^^^^^^^^^^^^^^^^^^^
63
+
64
+ .. code-block:: cmake
65
+
66
+ add_executable(<name> IMPORTED [GLOBAL])
67
+
68
+ An :ref:`IMPORTED executable target <Imported Targets>` references an
69
+ executable file located outside the project. No rules are generated to
70
+ build it, and the :prop_tgt:`IMPORTED` target property is ``True``. The
71
+ target name has scope in the directory in which it is created and below, but
72
+ the ``GLOBAL`` option extends visibility. It may be referenced like any
73
+ target built within the project. ``IMPORTED`` executables are useful
74
+ for convenient reference from commands like :command:`add_custom_command`.
75
+ Details about the imported executable are specified by setting properties
76
+ whose names begin in ``IMPORTED_``. The most important such property is
77
+ :prop_tgt:`IMPORTED_LOCATION` (and its per-configuration version
78
+ :prop_tgt:`IMPORTED_LOCATION_<CONFIG>`) which specifies the location of
79
+ the main executable file on disk. See documentation of the ``IMPORTED_*``
80
+ properties for more information.
81
+
82
+ Alias Executables
83
+ ^^^^^^^^^^^^^^^^^
84
+
85
+ .. code-block:: cmake
86
+
87
+ add_executable(<name> ALIAS <target>)
88
+
89
+ Creates an :ref:`Alias Target <Alias Targets>`, such that ``<name>`` can
90
+ be used to refer to ``<target>`` in subsequent commands. The ``<name>``
91
+ does not appear in the generated buildsystem as a make target. The
92
+ ``<target>`` may not be an ``ALIAS``.
93
+
94
+ .. versionadded:: 3.11
95
+ An ``ALIAS`` can target a ``GLOBAL`` :ref:`Imported Target <Imported Targets>`
96
+
97
+ .. versionadded:: 3.18
98
+ An ``ALIAS`` can target a non-``GLOBAL`` Imported Target. Such alias is
99
+ scoped to the directory in which it is created and subdirectories.
100
+ The :prop_tgt:`ALIAS_GLOBAL` target property can be used to check if the
101
+ alias is global or not.
102
+
103
+ ``ALIAS`` targets can be used as targets to read properties
104
+ from, executables for custom commands and custom targets. They can also be
105
+ tested for existence with the regular :command:`if(TARGET)` subcommand.
106
+ The ``<name>`` may not be used to modify properties of ``<target>``, that
107
+ is, it may not be used as the operand of :command:`set_property`,
108
+ :command:`set_target_properties`, :command:`target_link_libraries` etc.
109
+ An ``ALIAS`` target may not be installed or exported.
110
+
111
+ See Also
112
+ ^^^^^^^^
113
+
114
+ * :command:`add_library`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_library.rst ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_library
2
+ -----------
3
+
4
+ .. only:: html
5
+
6
+ .. contents::
7
+
8
+ Add a library to the project using the specified source files.
9
+
10
+ Normal Libraries
11
+ ^^^^^^^^^^^^^^^^
12
+
13
+ .. code-block:: cmake
14
+
15
+ add_library(<name> [STATIC | SHARED | MODULE]
16
+ [EXCLUDE_FROM_ALL]
17
+ [<source>...])
18
+
19
+ Adds a library target called ``<name>`` to be built from the source files
20
+ listed in the command invocation. The ``<name>``
21
+ corresponds to the logical target name and must be globally unique within
22
+ a project. The actual file name of the library built is constructed based
23
+ on conventions of the native platform (such as ``lib<name>.a`` or
24
+ ``<name>.lib``).
25
+
26
+ .. versionadded:: 3.1
27
+ Source arguments to ``add_library`` may use "generator expressions" with
28
+ the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
29
+ manual for available expressions.
30
+
31
+ .. versionadded:: 3.11
32
+ The source files can be omitted if they are added later using
33
+ :command:`target_sources`.
34
+
35
+ ``STATIC``, ``SHARED``, or ``MODULE`` may be given to specify the type of
36
+ library to be created. ``STATIC`` libraries are archives of object files
37
+ for use when linking other targets. ``SHARED`` libraries are linked
38
+ dynamically and loaded at runtime. ``MODULE`` libraries are plugins that
39
+ are not linked into other targets but may be loaded dynamically at runtime
40
+ using dlopen-like functionality. If no type is given explicitly the
41
+ type is ``STATIC`` or ``SHARED`` based on whether the current value of the
42
+ variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and
43
+ ``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
44
+ property is set to ``ON`` automatically.
45
+ A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
46
+ target property to create an macOS Framework.
47
+
48
+ .. versionadded:: 3.8
49
+ A ``STATIC`` library may be marked with the :prop_tgt:`FRAMEWORK`
50
+ target property to create a static Framework.
51
+
52
+ If a library does not export any symbols, it must not be declared as a
53
+ ``SHARED`` library. For example, a Windows resource DLL or a managed C++/CLI
54
+ DLL that exports no unmanaged symbols would need to be a ``MODULE`` library.
55
+ This is because CMake expects a ``SHARED`` library to always have an
56
+ associated import library on Windows.
57
+
58
+ By default the library file will be created in the build tree directory
59
+ corresponding to the source tree directory in which the command was
60
+ invoked. See documentation of the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`,
61
+ :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and
62
+ :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target properties to change this
63
+ location. See documentation of the :prop_tgt:`OUTPUT_NAME` target
64
+ property to change the ``<name>`` part of the final file name.
65
+
66
+ If ``EXCLUDE_FROM_ALL`` is given the corresponding property will be set on
67
+ the created target. See documentation of the :prop_tgt:`EXCLUDE_FROM_ALL`
68
+ target property for details.
69
+
70
+ See the :manual:`cmake-buildsystem(7)` manual for more on defining
71
+ buildsystem properties.
72
+
73
+ See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are
74
+ pre-processed, and you want to have the original sources reachable from
75
+ within IDE.
76
+
77
+ Object Libraries
78
+ ^^^^^^^^^^^^^^^^
79
+
80
+ .. code-block:: cmake
81
+
82
+ add_library(<name> OBJECT [<source>...])
83
+
84
+ Creates an :ref:`Object Library <Object Libraries>`. An object library
85
+ compiles source files but does not archive or link their object files into a
86
+ library. Instead other targets created by ``add_library`` or
87
+ :command:`add_executable` may reference the objects using an expression of the
88
+ form :genex:`$\<TARGET_OBJECTS:objlib\> <TARGET_OBJECTS>` as a source, where
89
+ ``objlib`` is the object library name. For example:
90
+
91
+ .. code-block:: cmake
92
+
93
+ add_library(... $<TARGET_OBJECTS:objlib> ...)
94
+ add_executable(... $<TARGET_OBJECTS:objlib> ...)
95
+
96
+ will include objlib's object files in a library and an executable
97
+ along with those compiled from their own sources. Object libraries
98
+ may contain only sources that compile, header files, and other files
99
+ that would not affect linking of a normal library (e.g. ``.txt``).
100
+ They may contain custom commands generating such sources, but not
101
+ ``PRE_BUILD``, ``PRE_LINK``, or ``POST_BUILD`` commands. Some native build
102
+ systems (such as Xcode) may not like targets that have only object files, so
103
+ consider adding at least one real source file to any target that references
104
+ :genex:`$\<TARGET_OBJECTS:objlib\> <TARGET_OBJECTS>`.
105
+
106
+ .. versionadded:: 3.12
107
+ Object libraries can be linked to with :command:`target_link_libraries`.
108
+
109
+ Interface Libraries
110
+ ^^^^^^^^^^^^^^^^^^^
111
+
112
+ .. code-block:: cmake
113
+
114
+ add_library(<name> INTERFACE)
115
+
116
+ Creates an :ref:`Interface Library <Interface Libraries>`.
117
+ An ``INTERFACE`` library target does not compile sources and does
118
+ not produce a library artifact on disk. However, it may have
119
+ properties set on it and it may be installed and exported.
120
+ Typically, ``INTERFACE_*`` properties are populated on an interface
121
+ target using the commands:
122
+
123
+ * :command:`set_property`,
124
+ * :command:`target_link_libraries(INTERFACE)`,
125
+ * :command:`target_link_options(INTERFACE)`,
126
+ * :command:`target_include_directories(INTERFACE)`,
127
+ * :command:`target_compile_options(INTERFACE)`,
128
+ * :command:`target_compile_definitions(INTERFACE)`, and
129
+ * :command:`target_sources(INTERFACE)`,
130
+
131
+ and then it is used as an argument to :command:`target_link_libraries`
132
+ like any other target.
133
+
134
+ An interface library created with the above signature has no source files
135
+ itself and is not included as a target in the generated buildsystem.
136
+
137
+ .. versionadded:: 3.15
138
+ An interface library can have :prop_tgt:`PUBLIC_HEADER` and
139
+ :prop_tgt:`PRIVATE_HEADER` properties. The headers specified by those
140
+ properties can be installed using the :command:`install(TARGETS)` command.
141
+
142
+ .. versionadded:: 3.19
143
+ An interface library target may be created with source files:
144
+
145
+ .. code-block:: cmake
146
+
147
+ add_library(<name> INTERFACE [<source>...] [EXCLUDE_FROM_ALL])
148
+
149
+ Source files may be listed directly in the ``add_library`` call or added
150
+ later by calls to :command:`target_sources` with the ``PRIVATE`` or
151
+ ``PUBLIC`` keywords.
152
+
153
+ If an interface library has source files (i.e. the :prop_tgt:`SOURCES`
154
+ target property is set), or header sets (i.e. the :prop_tgt:`HEADER_SETS`
155
+ target property is set), it will appear in the generated buildsystem
156
+ as a build target much like a target defined by the
157
+ :command:`add_custom_target` command. It does not compile any sources,
158
+ but does contain build rules for custom commands created by the
159
+ :command:`add_custom_command` command.
160
+
161
+ .. note::
162
+ In most command signatures where the ``INTERFACE`` keyword appears,
163
+ the items listed after it only become part of that target's usage
164
+ requirements and are not part of the target's own settings. However,
165
+ in this signature of ``add_library``, the ``INTERFACE`` keyword refers
166
+ to the library type only. Sources listed after it in the ``add_library``
167
+ call are ``PRIVATE`` to the interface library and do not appear in its
168
+ :prop_tgt:`INTERFACE_SOURCES` target property.
169
+
170
+ .. _`add_library imported libraries`:
171
+
172
+ Imported Libraries
173
+ ^^^^^^^^^^^^^^^^^^
174
+
175
+ .. code-block:: cmake
176
+
177
+ add_library(<name> <type> IMPORTED [GLOBAL])
178
+
179
+ Creates an :ref:`IMPORTED library target <Imported Targets>` called ``<name>``.
180
+ No rules are generated to build it, and the :prop_tgt:`IMPORTED` target
181
+ property is ``True``. The target name has scope in the directory in which
182
+ it is created and below, but the ``GLOBAL`` option extends visibility.
183
+ It may be referenced like any target built within the project.
184
+ ``IMPORTED`` libraries are useful for convenient reference from commands
185
+ like :command:`target_link_libraries`. Details about the imported library
186
+ are specified by setting properties whose names begin in ``IMPORTED_`` and
187
+ ``INTERFACE_``.
188
+
189
+ The ``<type>`` must be one of:
190
+
191
+ ``STATIC``, ``SHARED``, ``MODULE``, ``UNKNOWN``
192
+ References a library file located outside the project. The
193
+ :prop_tgt:`IMPORTED_LOCATION` target property (or its per-configuration
194
+ variant :prop_tgt:`IMPORTED_LOCATION_<CONFIG>`) specifies the
195
+ location of the main library file on disk:
196
+
197
+ * For a ``SHARED`` library on most non-Windows platforms, the main library
198
+ file is the ``.so`` or ``.dylib`` file used by both linkers and dynamic
199
+ loaders. If the referenced library file has a ``SONAME`` (or on macOS,
200
+ has a ``LC_ID_DYLIB`` starting in ``@rpath/``), the value of that field
201
+ should be set in the :prop_tgt:`IMPORTED_SONAME` target property.
202
+ If the referenced library file does not have a ``SONAME``, but the
203
+ platform supports it, then the :prop_tgt:`IMPORTED_NO_SONAME` target
204
+ property should be set.
205
+
206
+ * For a ``SHARED`` library on Windows, the :prop_tgt:`IMPORTED_IMPLIB`
207
+ target property (or its per-configuration variant
208
+ :prop_tgt:`IMPORTED_IMPLIB_<CONFIG>`) specifies the location of the
209
+ DLL import library file (``.lib`` or ``.dll.a``) on disk, and the
210
+ ``IMPORTED_LOCATION`` is the location of the ``.dll`` runtime
211
+ library (and is optional, but needed by the :genex:`TARGET_RUNTIME_DLLS`
212
+ generator expression).
213
+
214
+ Additional usage requirements may be specified in ``INTERFACE_*`` properties.
215
+
216
+ An ``UNKNOWN`` library type is typically only used in the implementation of
217
+ :ref:`Find Modules`. It allows the path to an imported library (often found
218
+ using the :command:`find_library` command) to be used without having to know
219
+ what type of library it is. This is especially useful on Windows where a
220
+ static library and a DLL's import library both have the same file extension.
221
+
222
+ ``OBJECT``
223
+ References a set of object files located outside the project.
224
+ The :prop_tgt:`IMPORTED_OBJECTS` target property (or its per-configuration
225
+ variant :prop_tgt:`IMPORTED_OBJECTS_<CONFIG>`) specifies the locations of
226
+ object files on disk.
227
+ Additional usage requirements may be specified in ``INTERFACE_*`` properties.
228
+
229
+ ``INTERFACE``
230
+ Does not reference any library or object files on disk, but may
231
+ specify usage requirements in ``INTERFACE_*`` properties.
232
+
233
+ See documentation of the ``IMPORTED_*`` and ``INTERFACE_*`` properties
234
+ for more information.
235
+
236
+ Alias Libraries
237
+ ^^^^^^^^^^^^^^^
238
+
239
+ .. code-block:: cmake
240
+
241
+ add_library(<name> ALIAS <target>)
242
+
243
+ Creates an :ref:`Alias Target <Alias Targets>`, such that ``<name>`` can be
244
+ used to refer to ``<target>`` in subsequent commands. The ``<name>`` does
245
+ not appear in the generated buildsystem as a make target. The ``<target>``
246
+ may not be an ``ALIAS``.
247
+
248
+ .. versionadded:: 3.11
249
+ An ``ALIAS`` can target a ``GLOBAL`` :ref:`Imported Target <Imported Targets>`
250
+
251
+ .. versionadded:: 3.18
252
+ An ``ALIAS`` can target a non-``GLOBAL`` Imported Target. Such alias is
253
+ scoped to the directory in which it is created and below.
254
+ The :prop_tgt:`ALIAS_GLOBAL` target property can be used to check if the
255
+ alias is global or not.
256
+
257
+ ``ALIAS`` targets can be used as linkable targets and as targets to
258
+ read properties from. They can also be tested for existence with the
259
+ regular :command:`if(TARGET)` subcommand. The ``<name>`` may not be used
260
+ to modify properties of ``<target>``, that is, it may not be used as the
261
+ operand of :command:`set_property`, :command:`set_target_properties`,
262
+ :command:`target_link_libraries` etc. An ``ALIAS`` target may not be
263
+ installed or exported.
264
+
265
+ See Also
266
+ ^^^^^^^^
267
+
268
+ * :command:`add_executable`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_link_options.rst ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_link_options
2
+ ----------------
3
+
4
+ .. versionadded:: 3.13
5
+
6
+ Add options to the link step for executable, shared library or module
7
+ library targets in the current directory and below that are added after
8
+ this command is invoked.
9
+
10
+ .. code-block:: cmake
11
+
12
+ add_link_options(<option> ...)
13
+
14
+ This command can be used to add any link options, but alternative commands
15
+ exist to add libraries (:command:`target_link_libraries` or
16
+ :command:`link_libraries`). See documentation of the
17
+ :prop_dir:`directory <LINK_OPTIONS>` and
18
+ :prop_tgt:`target <LINK_OPTIONS>` ``LINK_OPTIONS`` properties.
19
+
20
+ .. note::
21
+
22
+ This command cannot be used to add options for static library targets,
23
+ since they do not use a linker. To add archiver or MSVC librarian flags,
24
+ see the :prop_tgt:`STATIC_LIBRARY_OPTIONS` target property.
25
+
26
+ .. |command_name| replace:: ``add_link_options``
27
+ .. include:: GENEX_NOTE.txt
28
+
29
+ .. include:: DEVICE_LINK_OPTIONS.txt
30
+
31
+ .. include:: OPTIONS_SHELL.txt
32
+
33
+ .. include:: LINK_OPTIONS_LINKER.txt
34
+
35
+ See Also
36
+ ^^^^^^^^
37
+
38
+ * :command:`link_libraries`
39
+ * :command:`target_link_libraries`
40
+ * :command:`target_link_options`
41
+
42
+ * :variable:`CMAKE_<LANG>_FLAGS` and :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>`
43
+ add language-wide flags passed to all invocations of the compiler.
44
+ This includes invocations that drive compiling and those that drive linking.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_subdirectory.rst ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_subdirectory
2
+ ----------------
3
+
4
+ Add a subdirectory to the build.
5
+
6
+ .. code-block:: cmake
7
+
8
+ add_subdirectory(source_dir [binary_dir] [EXCLUDE_FROM_ALL] [SYSTEM])
9
+
10
+ Adds a subdirectory to the build. The ``source_dir`` specifies the
11
+ directory in which the source ``CMakeLists.txt`` and code files are
12
+ located. If it is a relative path, it will be evaluated with respect
13
+ to the current directory (the typical usage), but it may also be an
14
+ absolute path. The ``binary_dir`` specifies the directory in which to
15
+ place the output files. If it is a relative path, it will be evaluated
16
+ with respect to the current output directory, but it may also be an
17
+ absolute path. If ``binary_dir`` is not specified, the value of
18
+ ``source_dir``, before expanding any relative path, will be used (the
19
+ typical usage). The ``CMakeLists.txt`` file in the specified source
20
+ directory will be processed immediately by CMake before processing in
21
+ the current input file continues beyond this command.
22
+
23
+ If the ``EXCLUDE_FROM_ALL`` argument is provided then targets in the
24
+ subdirectory will not be included in the ``ALL`` target of the parent
25
+ directory by default, and will be excluded from IDE project files.
26
+ Users must explicitly build targets in the subdirectory. This is
27
+ meant for use when the subdirectory contains a separate part of the
28
+ project that is useful but not necessary, such as a set of examples.
29
+ Typically the subdirectory should contain its own :command:`project`
30
+ command invocation so that a full build system will be generated in the
31
+ subdirectory (such as a Visual Studio IDE solution file). Note that
32
+ inter-target dependencies supersede this exclusion. If a target built by
33
+ the parent project depends on a target in the subdirectory, the dependee
34
+ target will be included in the parent project build system to satisfy
35
+ the dependency.
36
+
37
+ .. versionadded:: 3.25
38
+ If the ``SYSTEM`` argument is provided, the :prop_dir:`SYSTEM` directory
39
+ property of the subdirectory will be set to true. This property is
40
+ used to initialize the :prop_tgt:`SYSTEM` property of each non-imported
41
+ target created in that subdirectory.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/add_test.rst ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ add_test
2
+ --------
3
+
4
+ Add a test to the project to be run by :manual:`ctest(1)`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ add_test(NAME <name> COMMAND <command> [<arg>...]
9
+ [CONFIGURATIONS <config>...]
10
+ [WORKING_DIRECTORY <dir>]
11
+ [COMMAND_EXPAND_LISTS])
12
+
13
+ Adds a test called ``<name>``. The test name may contain arbitrary
14
+ characters, expressed as a :ref:`Quoted Argument` or :ref:`Bracket Argument`
15
+ if necessary. See policy :policy:`CMP0110`.
16
+
17
+ CMake only generates tests if the :command:`enable_testing` command has been
18
+ invoked. The :module:`CTest` module invokes ``enable_testing`` automatically
19
+ unless ``BUILD_TESTING`` is set to ``OFF``.
20
+
21
+ Tests added with the ``add_test(NAME)`` signature support using
22
+ :manual:`generator expressions <cmake-generator-expressions(7)>`
23
+ in test properties set by :command:`set_property(TEST)` or
24
+ :command:`set_tests_properties`. Test properties may only be set in the
25
+ directory the test is created in.
26
+
27
+ ``add_test`` options are:
28
+
29
+ ``COMMAND``
30
+ Specify the test command-line. If ``<command>`` specifies an executable
31
+ target created by :command:`add_executable`, it will automatically be
32
+ replaced by the location of the executable created at build time.
33
+
34
+ The command may be specified using
35
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
36
+
37
+ ``CONFIGURATIONS``
38
+ Restrict execution of the test only to the named configurations.
39
+
40
+ ``WORKING_DIRECTORY``
41
+ Set the test property :prop_test:`WORKING_DIRECTORY` in which to execute the
42
+ test. If not specified, the test will be run in
43
+ :variable:`CMAKE_CURRENT_BINARY_DIR`. The working directory may be specified
44
+ using :manual:`generator expressions <cmake-generator-expressions(7)>`.
45
+
46
+ ``COMMAND_EXPAND_LISTS``
47
+ .. versionadded:: 3.16
48
+
49
+ Lists in ``COMMAND`` arguments will be expanded, including those created with
50
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
51
+
52
+ If the test command exits with code ``0`` the test passes. Non-zero exit code
53
+ is a "failed" test. The test property :prop_test:`WILL_FAIL` inverts this
54
+ logic. Note that system-level test failures such as segmentation faults or
55
+ heap errors will still fail the test even if ``WILL_FALL`` is true. Output
56
+ written to stdout or stderr is captured by :manual:`ctest(1)` and only
57
+ affects the pass/fail status via the :prop_test:`PASS_REGULAR_EXPRESSION`,
58
+ :prop_test:`FAIL_REGULAR_EXPRESSION`, or :prop_test:`SKIP_REGULAR_EXPRESSION`
59
+ test properties.
60
+
61
+ .. versionadded:: 3.16
62
+ Added :prop_test:`SKIP_REGULAR_EXPRESSION` property.
63
+
64
+ Example usage:
65
+
66
+ .. code-block:: cmake
67
+
68
+ add_test(NAME mytest
69
+ COMMAND testDriver --config $<CONFIG>
70
+ --exe $<TARGET_FILE:myexe>)
71
+
72
+ This creates a test ``mytest`` whose command runs a ``testDriver`` tool
73
+ passing the configuration name and the full path to the executable
74
+ file produced by target ``myexe``.
75
+
76
+ ---------------------------------------------------------------------
77
+
78
+ The command syntax above is recommended over the older, less flexible form:
79
+
80
+ .. code-block:: cmake
81
+
82
+ add_test(<name> <command> [<arg>...])
83
+
84
+ Add a test called ``<name>`` with the given command-line.
85
+
86
+ Unlike the above ``NAME`` signature, target names are not supported
87
+ in the command-line. Furthermore, tests added with this signature do not
88
+ support :manual:`generator expressions <cmake-generator-expressions(7)>`
89
+ in the command-line or test properties.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/aux_source_directory.rst ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aux_source_directory
2
+ --------------------
3
+
4
+ Find all source files in a directory.
5
+
6
+ .. code-block:: cmake
7
+
8
+ aux_source_directory(<dir> <variable>)
9
+
10
+ Collects the names of all the source files in the specified directory
11
+ and stores the list in the ``<variable>`` provided. This command is
12
+ intended to be used by projects that use explicit template
13
+ instantiation. Template instantiation files can be stored in a
14
+ ``Templates`` subdirectory and collected automatically using this
15
+ command to avoid manually listing all instantiations.
16
+
17
+ It is tempting to use this command to avoid writing the list of source
18
+ files for a library or executable target. While this seems to work,
19
+ there is no way for CMake to generate a build system that knows when a
20
+ new source file has been added. Normally the generated build system
21
+ knows when it needs to rerun CMake because the ``CMakeLists.txt`` file is
22
+ modified to add a new source. When the source is just added to the
23
+ directory without modifying this file, one would have to manually
24
+ rerun CMake to generate a build system incorporating the new file.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/block.rst ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ block
2
+ -----
3
+
4
+ .. versionadded:: 3.25
5
+
6
+ Evaluate a group of commands with a dedicated variable and/or policy scope.
7
+
8
+ .. code-block:: cmake
9
+
10
+ block([SCOPE_FOR [POLICIES] [VARIABLES] ] [PROPAGATE <var-name>...])
11
+ <commands>
12
+ endblock()
13
+
14
+ All commands between ``block()`` and the matching :command:`endblock` are
15
+ recorded without being invoked. Once the :command:`endblock` is evaluated, the
16
+ recorded list of commands is invoked inside the requested scopes, then the
17
+ scopes created by the ``block()`` command are removed.
18
+
19
+ ``SCOPE_FOR``
20
+ Specify which scopes must be created.
21
+
22
+ ``POLICIES``
23
+ Create a new policy scope. This is equivalent to
24
+ :command:`cmake_policy(PUSH)`.
25
+
26
+ ``VARIABLES``
27
+ Create a new variable scope.
28
+
29
+ If ``SCOPE_FOR`` is not specified, this is equivalent to:
30
+
31
+ .. code-block:: cmake
32
+
33
+ block(SCOPE_FOR VARIABLES POLICIES)
34
+
35
+ ``PROPAGATE``
36
+ When a variable scope is created by the :command:`block` command, this
37
+ option sets or unsets the specified variables in the parent scope. This is
38
+ equivalent to :command:`set(PARENT_SCOPE)` or :command:`unset(PARENT_SCOPE)`
39
+ commands.
40
+
41
+ .. code-block:: cmake
42
+
43
+ set(var1 "INIT1")
44
+ set(var2 "INIT2")
45
+
46
+ block(PROPAGATE var1 var2)
47
+ set(var1 "VALUE1")
48
+ unset(var2)
49
+ endblock()
50
+
51
+ # Now var1 holds VALUE1, and var2 is unset
52
+
53
+ This option is only allowed when a variable scope is created. An error will
54
+ be raised in the other cases.
55
+
56
+ When the ``block()`` is inside a :command:`foreach` or :command:`while`
57
+ command, the :command:`break` and :command:`continue` commands can be used
58
+ inside the block.
59
+
60
+ .. code-block:: cmake
61
+
62
+ while(TRUE)
63
+ block()
64
+ ...
65
+ # the break() command will terminate the while() command
66
+ break()
67
+ endblock()
68
+ endwhile()
69
+
70
+
71
+ See Also
72
+ ^^^^^^^^
73
+
74
+ * :command:`endblock`
75
+ * :command:`return`
76
+ * :command:`cmake_policy`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/break.rst ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ break
2
+ -----
3
+
4
+ Break from an enclosing foreach or while loop.
5
+
6
+ .. code-block:: cmake
7
+
8
+ break()
9
+
10
+ Breaks from an enclosing :command:`foreach` or :command:`while` loop.
11
+
12
+ See also the :command:`continue` command.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/build_command.rst ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ build_command
2
+ -------------
3
+
4
+ Get a command line to build the current project.
5
+ This is mainly intended for internal use by the :module:`CTest` module.
6
+
7
+ .. code-block:: cmake
8
+
9
+ build_command(<variable>
10
+ [CONFIGURATION <config>]
11
+ [PARALLEL_LEVEL <parallel>]
12
+ [TARGET <target>]
13
+ [PROJECT_NAME <projname>] # legacy, causes warning
14
+ )
15
+
16
+ Sets the given ``<variable>`` to a command-line string of the form::
17
+
18
+ <cmake> --build . [--config <config>] [--parallel <parallel>] [--target <target>...] [-- -i]
19
+
20
+ where ``<cmake>`` is the location of the :manual:`cmake(1)` command-line
21
+ tool, and ``<config>``, ``<parallel>`` and ``<target>`` are the values
22
+ provided to the ``CONFIGURATION``, ``PARALLEL_LEVEL`` and ``TARGET``
23
+ options, if any. The trailing ``-- -i`` option is added for
24
+ :ref:`Makefile Generators` if policy :policy:`CMP0061` is not set to
25
+ ``NEW``.
26
+
27
+ When invoked, this :option:`cmake --build` command line will launch the
28
+ underlying build system tool.
29
+
30
+ .. versionadded:: 3.21
31
+ The ``PARALLEL_LEVEL`` argument can be used to set the
32
+ :option:`--parallel <cmake--build --parallel>` flag.
33
+
34
+ .. code-block:: cmake
35
+
36
+ build_command(<cachevariable> <makecommand>)
37
+
38
+ This second signature is deprecated, but still available for backwards
39
+ compatibility. Use the first signature instead.
40
+
41
+ It sets the given ``<cachevariable>`` to a command-line string as
42
+ above but without the :option:`--target <cmake--build --target>` option.
43
+ The ``<makecommand>`` is ignored but should be the full path to
44
+ devenv, nmake, make or one of the end user build tools
45
+ for legacy invocations.
46
+
47
+ .. note::
48
+ In CMake versions prior to 3.0 this command returned a command
49
+ line that directly invokes the native build tool for the current
50
+ generator. Their implementation of the ``PROJECT_NAME`` option
51
+ had no useful effects, so CMake now warns on use of the option.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/build_name.rst ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ build_name
2
+ ----------
3
+
4
+ Disallowed since version 3.0. See CMake Policy :policy:`CMP0036`.
5
+
6
+ Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead.
7
+
8
+ .. code-block:: cmake
9
+
10
+ build_name(variable)
11
+
12
+ Sets the specified variable to a string representing the platform and
13
+ compiler settings. These values are now available through the
14
+ :variable:`CMAKE_SYSTEM` and
15
+ :variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>` variables.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_file_api.rst ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_file_api
2
+ --------------
3
+
4
+ .. versionadded:: 3.27
5
+
6
+ Enables interacting with the :manual:`CMake file API <cmake-file-api(7)>`.
7
+
8
+ .. signature::
9
+ cmake_file_api(QUERY ...)
10
+
11
+ The ``QUERY`` subcommand adds a file API query for the current CMake
12
+ invocation.
13
+
14
+ .. code-block:: cmake
15
+
16
+ cmake_file_api(
17
+ QUERY
18
+ API_VERSION <version>
19
+ [CODEMODEL <versions>...]
20
+ [CACHE <versions>...]
21
+ [CMAKEFILES <versions>...]
22
+ [TOOLCHAINS <versions>...]
23
+ )
24
+
25
+ The ``API_VERSION`` must always be given. Currently, the only supported
26
+ value for ``<version>`` is 1. See :ref:`file-api v1` for details of the
27
+ reply content and location.
28
+
29
+ Each of the optional keywords ``CODEMODEL``, ``CACHE``, ``CMAKEFILES`` and
30
+ ``TOOLCHAINS`` correspond to one of the object kinds that can be requested
31
+ by the project. The ``configureLog`` object kind cannot be set with this
32
+ command, since it must be set before CMake starts reading the top level
33
+ ``CMakeLists.txt`` file.
34
+
35
+ For each of the optional keywords, the ``<versions>`` list must contain one
36
+ or more version values of the form ``major`` or ``major.minor``, where
37
+ ``major`` and ``minor`` are integers. Projects should list the versions they
38
+ accept in their preferred order, as only the first supported value from the
39
+ list will be selected. The command will ignore versions with a ``major``
40
+ version higher than any major version it supports for that object kind.
41
+ It will raise an error if it encounters an invalid version number, or if none
42
+ of the requested versions is supported.
43
+
44
+ For each type of object kind requested, a query equivalent to a shared,
45
+ stateless query will be added internally. No query file will be created in
46
+ the file system. The reply *will* be written to the file system at
47
+ generation time.
48
+
49
+ It is not an error to add a query for the same thing more than once, whether
50
+ from query files or from multiple calls to ``cmake_file_api(QUERY)``.
51
+ The final set of queries will be a merged combination of all queries
52
+ specified on disk and queries submitted by the project.
53
+
54
+ Example
55
+ ^^^^^^^
56
+
57
+ A project may want to use replies from the file API at build time to implement
58
+ some form of verification task. Instead of relying on something outside of
59
+ CMake to create a query file, the project can use ``cmake_file_api(QUERY)``
60
+ to request the required information for the current run. It can then create
61
+ a custom command to run at build time, knowing that the requested information
62
+ should always be available.
63
+
64
+ .. code-block:: cmake
65
+
66
+ cmake_file_api(
67
+ QUERY
68
+ API_VERSION 1
69
+ CODEMODEL 2.3
70
+ TOOLCHAINS 1
71
+ )
72
+
73
+ add_custom_target(verify_project
74
+ COMMAND ${CMAKE_COMMAND}
75
+ -D BUILD_DIR=${CMAKE_BINARY_DIR}
76
+ -D CONFIG=$<CONFIG>
77
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/verify_project.cmake
78
+ )
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_host_system_information.rst ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_host_system_information
2
+ -----------------------------
3
+
4
+ Query various host system information.
5
+
6
+ Synopsis
7
+ ^^^^^^^^
8
+
9
+ .. parsed-literal::
10
+
11
+ `Query host system specific information`_
12
+ cmake_host_system_information(RESULT <variable> QUERY <key> ...)
13
+
14
+ `Query Windows registry`_
15
+ cmake_host_system_information(RESULT <variable> QUERY WINDOWS_REGISTRY <key> ...)
16
+
17
+ Query host system specific information
18
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
+
20
+ .. code-block:: cmake
21
+
22
+ cmake_host_system_information(RESULT <variable> QUERY <key> ...)
23
+
24
+ Queries system information of the host system on which cmake runs.
25
+ One or more ``<key>`` can be provided to select the information to be
26
+ queried. The list of queried values is stored in ``<variable>``.
27
+
28
+ ``<key>`` can be one of the following values:
29
+
30
+ ``NUMBER_OF_LOGICAL_CORES``
31
+ Number of logical cores
32
+
33
+ ``NUMBER_OF_PHYSICAL_CORES``
34
+ Number of physical cores
35
+
36
+ ``HOSTNAME``
37
+ Hostname
38
+
39
+ ``FQDN``
40
+ Fully qualified domain name
41
+
42
+ ``TOTAL_VIRTUAL_MEMORY``
43
+ Total virtual memory in MiB [#mebibytes]_
44
+
45
+ ``AVAILABLE_VIRTUAL_MEMORY``
46
+ Available virtual memory in MiB [#mebibytes]_
47
+
48
+ ``TOTAL_PHYSICAL_MEMORY``
49
+ Total physical memory in MiB [#mebibytes]_
50
+
51
+ ``AVAILABLE_PHYSICAL_MEMORY``
52
+ Available physical memory in MiB [#mebibytes]_
53
+
54
+ ``IS_64BIT``
55
+ .. versionadded:: 3.10
56
+
57
+ One if processor is 64Bit
58
+
59
+ ``HAS_FPU``
60
+ .. versionadded:: 3.10
61
+
62
+ One if processor has floating point unit
63
+
64
+ ``HAS_MMX``
65
+ .. versionadded:: 3.10
66
+
67
+ One if processor supports MMX instructions
68
+
69
+ ``HAS_MMX_PLUS``
70
+ .. versionadded:: 3.10
71
+
72
+ One if processor supports Ext. MMX instructions
73
+
74
+ ``HAS_SSE``
75
+ .. versionadded:: 3.10
76
+
77
+ One if processor supports SSE instructions
78
+
79
+ ``HAS_SSE2``
80
+ .. versionadded:: 3.10
81
+
82
+ One if processor supports SSE2 instructions
83
+
84
+ ``HAS_SSE_FP``
85
+ .. versionadded:: 3.10
86
+
87
+ One if processor supports SSE FP instructions
88
+
89
+ ``HAS_SSE_MMX``
90
+ .. versionadded:: 3.10
91
+
92
+ One if processor supports SSE MMX instructions
93
+
94
+ ``HAS_AMD_3DNOW``
95
+ .. versionadded:: 3.10
96
+
97
+ One if processor supports 3DNow instructions
98
+
99
+ ``HAS_AMD_3DNOW_PLUS``
100
+ .. versionadded:: 3.10
101
+
102
+ One if processor supports 3DNow+ instructions
103
+
104
+ ``HAS_IA64``
105
+ .. versionadded:: 3.10
106
+
107
+ One if IA64 processor emulating x86
108
+
109
+ ``HAS_SERIAL_NUMBER``
110
+ .. versionadded:: 3.10
111
+
112
+ One if processor has serial number
113
+
114
+ ``PROCESSOR_SERIAL_NUMBER``
115
+ .. versionadded:: 3.10
116
+
117
+ Processor serial number
118
+
119
+ ``PROCESSOR_NAME``
120
+ .. versionadded:: 3.10
121
+
122
+ Human readable processor name
123
+
124
+ ``PROCESSOR_DESCRIPTION``
125
+ .. versionadded:: 3.10
126
+
127
+ Human readable full processor description
128
+
129
+ ``OS_NAME``
130
+ .. versionadded:: 3.10
131
+
132
+ See :variable:`CMAKE_HOST_SYSTEM_NAME`
133
+
134
+ ``OS_RELEASE``
135
+ .. versionadded:: 3.10
136
+
137
+ The OS sub-type e.g. on Windows ``Professional``
138
+
139
+ ``OS_VERSION``
140
+ .. versionadded:: 3.10
141
+
142
+ The OS build ID
143
+
144
+ ``OS_PLATFORM``
145
+ .. versionadded:: 3.10
146
+
147
+ See :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`
148
+
149
+ ``DISTRIB_INFO``
150
+ .. versionadded:: 3.22
151
+
152
+ Read :file:`/etc/os-release` file and define the given ``<variable>``
153
+ into a list of read variables
154
+
155
+ ``DISTRIB_<name>``
156
+ .. versionadded:: 3.22
157
+
158
+ Get the ``<name>`` variable (see `man 5 os-release`_) if it exists in the
159
+ :file:`/etc/os-release` file
160
+
161
+ Example:
162
+
163
+ .. code-block:: cmake
164
+
165
+ cmake_host_system_information(RESULT PRETTY_NAME QUERY DISTRIB_PRETTY_NAME)
166
+ message(STATUS "${PRETTY_NAME}")
167
+
168
+ cmake_host_system_information(RESULT DISTRO QUERY DISTRIB_INFO)
169
+
170
+ foreach(VAR IN LISTS DISTRO)
171
+ message(STATUS "${VAR}=`${${VAR}}`")
172
+ endforeach()
173
+
174
+
175
+ Output::
176
+
177
+ -- Ubuntu 20.04.2 LTS
178
+ -- DISTRO_BUG_REPORT_URL=`https://bugs.launchpad.net/ubuntu/`
179
+ -- DISTRO_HOME_URL=`https://www.ubuntu.com/`
180
+ -- DISTRO_ID=`ubuntu`
181
+ -- DISTRO_ID_LIKE=`debian`
182
+ -- DISTRO_NAME=`Ubuntu`
183
+ -- DISTRO_PRETTY_NAME=`Ubuntu 20.04.2 LTS`
184
+ -- DISTRO_PRIVACY_POLICY_URL=`https://www.ubuntu.com/legal/terms-and-policies/privacy-policy`
185
+ -- DISTRO_SUPPORT_URL=`https://help.ubuntu.com/`
186
+ -- DISTRO_UBUNTU_CODENAME=`focal`
187
+ -- DISTRO_VERSION=`20.04.2 LTS (Focal Fossa)`
188
+ -- DISTRO_VERSION_CODENAME=`focal`
189
+ -- DISTRO_VERSION_ID=`20.04`
190
+
191
+ If :file:`/etc/os-release` file is not found, the command tries to gather OS
192
+ identification via fallback scripts. The fallback script can use `various
193
+ distribution-specific files`_ to collect OS identification data and map it
194
+ into `man 5 os-release`_ variables.
195
+
196
+ Fallback Interface Variables
197
+ """"""""""""""""""""""""""""
198
+
199
+ .. variable:: CMAKE_GET_OS_RELEASE_FALLBACK_SCRIPTS
200
+
201
+ In addition to the scripts shipped with CMake, a user may append full
202
+ paths to his script(s) to the this list. The script filename has the
203
+ following format: ``NNN-<name>.cmake``, where ``NNN`` is three digits
204
+ used to apply collected scripts in a specific order.
205
+
206
+ .. variable:: CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname>
207
+
208
+ Variables collected by the user provided fallback script
209
+ ought to be assigned to CMake variables using this naming
210
+ convention. Example, the ``ID`` variable from the manual becomes
211
+ ``CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID``.
212
+
213
+ .. variable:: CMAKE_GET_OS_RELEASE_FALLBACK_RESULT
214
+
215
+ The fallback script ought to store names of all assigned
216
+ ``CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname>`` variables in this list.
217
+
218
+ Example:
219
+
220
+ .. code-block:: cmake
221
+
222
+ # Try to detect some old distribution
223
+ # See also
224
+ # - http://linuxmafia.com/faq/Admin/release-files.html
225
+ #
226
+ if(NOT EXISTS "${CMAKE_SYSROOT}/etc/foobar-release")
227
+ return()
228
+ endif()
229
+ # Get the first string only
230
+ file(
231
+ STRINGS "${CMAKE_SYSROOT}/etc/foobar-release" CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT
232
+ LIMIT_COUNT 1
233
+ )
234
+ #
235
+ # Example:
236
+ #
237
+ # Foobar distribution release 1.2.3 (server)
238
+ #
239
+ if(CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT MATCHES "Foobar distribution release ([0-9\.]+) .*")
240
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME Foobar)
241
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME "${CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT}")
242
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID foobar)
243
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION ${CMAKE_MATCH_1})
244
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID ${CMAKE_MATCH_1})
245
+ list(
246
+ APPEND CMAKE_GET_OS_RELEASE_FALLBACK_RESULT
247
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME
248
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME
249
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID
250
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION
251
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID
252
+ )
253
+ endif()
254
+ unset(CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT)
255
+
256
+
257
+ .. rubric:: Footnotes
258
+
259
+ .. [#mebibytes] One MiB (mebibyte) is equal to 1024x1024 bytes.
260
+
261
+ .. _man 5 os-release: https://www.freedesktop.org/software/systemd/man/os-release.html
262
+ .. _various distribution-specific files: http://linuxmafia.com/faq/Admin/release-files.html
263
+
264
+ .. _Query Windows registry:
265
+
266
+ Query Windows registry
267
+ ^^^^^^^^^^^^^^^^^^^^^^
268
+
269
+ .. versionadded:: 3.24
270
+
271
+ ::
272
+
273
+ cmake_host_system_information(RESULT <variable>
274
+ QUERY WINDOWS_REGISTRY <key> [VALUE_NAMES|SUBKEYS|VALUE <name>]
275
+ [VIEW (64|32|64_32|32_64|HOST|TARGET|BOTH)]
276
+ [SEPARATOR <separator>]
277
+ [ERROR_VARIABLE <result>])
278
+
279
+ Performs query operations on local computer registry subkey. Returns a list of
280
+ subkeys or value names that are located under the specified subkey in the
281
+ registry or the data of the specified value name. The result of the queried
282
+ entity is stored in ``<variable>``.
283
+
284
+ .. note::
285
+
286
+ Querying registry for any other platforms than ``Windows``, including
287
+ ``CYGWIN``, will always returns an empty string and sets an error message in
288
+ the variable specified with sub-option ``ERROR_VARIABLE``.
289
+
290
+ ``<key>`` specify the full path of a subkey on the local computer. The
291
+ ``<key>`` must include a valid root key. Valid root keys for the local computer
292
+ are:
293
+
294
+ * ``HKLM`` or ``HKEY_LOCAL_MACHINE``
295
+ * ``HKCU`` or ``HKEY_CURRENT_USER``
296
+ * ``HKCR`` or ``HKEY_CLASSES_ROOT``
297
+ * ``HKU`` or ``HKEY_USERS``
298
+ * ``HKCC`` or ``HKEY_CURRENT_CONFIG``
299
+
300
+ And, optionally, the path to a subkey under the specified root key. The path
301
+ separator can be the slash or the backslash. ``<key>`` is not case sensitive.
302
+ For example:
303
+
304
+ .. code-block:: cmake
305
+
306
+ cmake_host_system_information(RESULT result QUERY WINDOWS_REGISTRY "HKLM")
307
+ cmake_host_system_information(RESULT result QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Kitware")
308
+ cmake_host_system_information(RESULT result QUERY WINDOWS_REGISTRY "HKCU\\SOFTWARE\\Kitware")
309
+
310
+ ``VALUE_NAMES``
311
+ Request the list of value names defined under ``<key>``. If a default value
312
+ is defined, it will be identified with the special name ``(default)``.
313
+
314
+ ``SUBKEYS``
315
+ Request the list of subkeys defined under ``<key>``.
316
+
317
+ ``VALUE <name>``
318
+ Request the data stored in value named ``<name>``. If ``VALUE`` is not
319
+ specified or argument is the special name ``(default)``, the content of the
320
+ default value, if any, will be returned.
321
+
322
+ .. code-block:: cmake
323
+
324
+ # query default value for HKLM/SOFTWARE/Kitware key
325
+ cmake_host_system_information(RESULT result
326
+ QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Kitware")
327
+
328
+ # query default value for HKLM/SOFTWARE/Kitware key using special value name
329
+ cmake_host_system_information(RESULT result
330
+ QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Kitware"
331
+ VALUE "(default)")
332
+
333
+ Supported types are:
334
+
335
+ * ``REG_SZ``.
336
+ * ``REG_EXPAND_SZ``. The returned data is expanded.
337
+ * ``REG_MULTI_SZ``. The returned is expressed as a CMake list. See also
338
+ ``SEPARATOR`` sub-option.
339
+ * ``REG_DWORD``.
340
+ * ``REG_QWORD``.
341
+
342
+ For all other types, an empty string is returned.
343
+
344
+ ``VIEW``
345
+ Specify which registry views must be queried. When not specified, ``BOTH``
346
+ view is used.
347
+
348
+ ``64``
349
+ Query the 64bit registry. On ``32bit Windows``, returns always an empty
350
+ string.
351
+
352
+ ``32``
353
+ Query the 32bit registry.
354
+
355
+ ``64_32``
356
+ For ``VALUE`` sub-option or default value, query the registry using view
357
+ ``64``, and if the request failed, query the registry using view ``32``.
358
+ For ``VALUE_NAMES`` and ``SUBKEYS`` sub-options, query both views (``64``
359
+ and ``32``) and merge the results (sorted and duplicates removed).
360
+
361
+ ``32_64``
362
+ For ``VALUE`` sub-option or default value, query the registry using view
363
+ ``32``, and if the request failed, query the registry using view ``64``.
364
+ For ``VALUE_NAMES`` and ``SUBKEYS`` sub-options, query both views (``32``
365
+ and ``64``) and merge the results (sorted and duplicates removed).
366
+
367
+ ``HOST``
368
+ Query the registry matching the architecture of the host: ``64`` on ``64bit
369
+ Windows`` and ``32`` on ``32bit Windows``.
370
+
371
+ ``TARGET``
372
+ Query the registry matching the architecture specified by
373
+ :variable:`CMAKE_SIZEOF_VOID_P` variable. If not defined, fallback to
374
+ ``HOST`` view.
375
+
376
+ ``BOTH``
377
+ Query both views (``32`` and ``64``). The order depends of the following
378
+ rules: If :variable:`CMAKE_SIZEOF_VOID_P` variable is defined. Use the
379
+ following view depending of the content of this variable:
380
+
381
+ * ``8``: ``64_32``
382
+ * ``4``: ``32_64``
383
+
384
+ If :variable:`CMAKE_SIZEOF_VOID_P` variable is not defined, rely on
385
+ architecture of the host:
386
+
387
+ * ``64bit``: ``64_32``
388
+ * ``32bit``: ``32``
389
+
390
+ ``SEPARATOR``
391
+ Specify the separator character for ``REG_MULTI_SZ`` type. When not
392
+ specified, the character ``\0`` is used.
393
+
394
+ ``ERROR_VARIABLE <result>``
395
+ Returns any error raised during query operation. In case of success, the
396
+ variable holds an empty string.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_language.rst ADDED
@@ -0,0 +1,508 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_language
2
+ --------------
3
+
4
+ .. versionadded:: 3.18
5
+
6
+ Call meta-operations on CMake commands.
7
+
8
+ Synopsis
9
+ ^^^^^^^^
10
+
11
+ .. parsed-literal::
12
+
13
+ cmake_language(`CALL`_ <command> [<arg>...])
14
+ cmake_language(`EVAL`_ CODE <code>...)
15
+ cmake_language(`DEFER`_ <options>... CALL <command> [<arg>...])
16
+ cmake_language(`SET_DEPENDENCY_PROVIDER`_ <command> SUPPORTED_METHODS <methods>...)
17
+ cmake_language(`GET_MESSAGE_LOG_LEVEL`_ <out-var>)
18
+
19
+ Introduction
20
+ ^^^^^^^^^^^^
21
+
22
+ This command will call meta-operations on built-in CMake commands or
23
+ those created via the :command:`macro` or :command:`function` commands.
24
+
25
+ ``cmake_language`` does not introduce a new variable or policy scope.
26
+
27
+ Calling Commands
28
+ ^^^^^^^^^^^^^^^^
29
+
30
+ .. signature::
31
+ cmake_language(CALL <command> [<arg>...])
32
+
33
+ Calls the named ``<command>`` with the given arguments (if any).
34
+ For example, the code:
35
+
36
+ .. code-block:: cmake
37
+
38
+ set(message_command "message")
39
+ cmake_language(CALL ${message_command} STATUS "Hello World!")
40
+
41
+ is equivalent to
42
+
43
+ .. code-block:: cmake
44
+
45
+ message(STATUS "Hello World!")
46
+
47
+ .. note::
48
+ To ensure consistency of the code, the following commands are not allowed:
49
+
50
+ * ``if`` / ``elseif`` / ``else`` / ``endif``
51
+ * ``block`` / ``endblock``
52
+ * ``while`` / ``endwhile``
53
+ * ``foreach`` / ``endforeach``
54
+ * ``function`` / ``endfunction``
55
+ * ``macro`` / ``endmacro``
56
+
57
+ Evaluating Code
58
+ ^^^^^^^^^^^^^^^
59
+
60
+ .. signature::
61
+ cmake_language(EVAL CODE <code>...)
62
+ :target: EVAL
63
+
64
+ Evaluates the ``<code>...`` as CMake code.
65
+
66
+ For example, the code:
67
+
68
+ .. code-block:: cmake
69
+
70
+ set(A TRUE)
71
+ set(B TRUE)
72
+ set(C TRUE)
73
+ set(condition "(A AND B) OR C")
74
+
75
+ cmake_language(EVAL CODE "
76
+ if (${condition})
77
+ message(STATUS TRUE)
78
+ else()
79
+ message(STATUS FALSE)
80
+ endif()"
81
+ )
82
+
83
+ is equivalent to
84
+
85
+ .. code-block:: cmake
86
+
87
+ set(A TRUE)
88
+ set(B TRUE)
89
+ set(C TRUE)
90
+ set(condition "(A AND B) OR C")
91
+
92
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/eval.cmake "
93
+ if (${condition})
94
+ message(STATUS TRUE)
95
+ else()
96
+ message(STATUS FALSE)
97
+ endif()"
98
+ )
99
+
100
+ include(${CMAKE_CURRENT_BINARY_DIR}/eval.cmake)
101
+
102
+ Deferring Calls
103
+ ^^^^^^^^^^^^^^^
104
+
105
+ .. versionadded:: 3.19
106
+
107
+ .. signature::
108
+ cmake_language(DEFER <options>... CALL <command> [<arg>...])
109
+
110
+ Schedules a call to the named ``<command>`` with the given arguments (if any)
111
+ to occur at a later time. By default, deferred calls are executed as if
112
+ written at the end of the current directory's ``CMakeLists.txt`` file,
113
+ except that they run even after a :command:`return` call. Variable
114
+ references in arguments are evaluated at the time the deferred call is
115
+ executed.
116
+
117
+ The options are:
118
+
119
+ ``DIRECTORY <dir>``
120
+ Schedule the call for the end of the given directory instead of the
121
+ current directory. The ``<dir>`` may reference either a source
122
+ directory or its corresponding binary directory. Relative paths are
123
+ treated as relative to the current source directory.
124
+
125
+ The given directory must be known to CMake, being either the top-level
126
+ directory or one added by :command:`add_subdirectory`. Furthermore,
127
+ the given directory must not yet be finished processing. This means
128
+ it can be the current directory or one of its ancestors.
129
+
130
+ ``ID <id>``
131
+ Specify an identification for the deferred call.
132
+ The ``<id>`` may not be empty and may not begin with a capital letter ``A-Z``.
133
+ The ``<id>`` may begin with an underscore (``_``) only if it was generated
134
+ automatically by an earlier call that used ``ID_VAR`` to get the id.
135
+
136
+ ``ID_VAR <var>``
137
+ Specify a variable in which to store the identification for the
138
+ deferred call. If ``ID <id>`` is not given, a new identification
139
+ will be generated and the generated id will start with an underscore (``_``).
140
+
141
+ The currently scheduled list of deferred calls may be retrieved:
142
+
143
+ .. code-block:: cmake
144
+
145
+ cmake_language(DEFER [DIRECTORY <dir>] GET_CALL_IDS <var>)
146
+
147
+ This will store in ``<var>`` a :ref:`semicolon-separated list <CMake Language
148
+ Lists>` of deferred call ids. The ids are for the directory scope in which
149
+ the calls have been deferred to (i.e. where they will be executed), which can
150
+ be different to the scope in which they were created. The ``DIRECTORY``
151
+ option can be used to specify the scope for which to retrieve the call ids.
152
+ If that option is not given, the call ids for the current directory scope
153
+ will be returned.
154
+
155
+ Details of a specific call may be retrieved from its id:
156
+
157
+ .. code-block:: cmake
158
+
159
+ cmake_language(DEFER [DIRECTORY <dir>] GET_CALL <id> <var>)
160
+
161
+ This will store in ``<var>`` a :ref:`semicolon-separated list <CMake Language
162
+ Lists>` in which the first element is the name of the command to be
163
+ called, and the remaining elements are its unevaluated arguments (any
164
+ contained ``;`` characters are included literally and cannot be distinguished
165
+ from multiple arguments). If multiple calls are scheduled with the same id,
166
+ this retrieves the first one. If no call is scheduled with the given id in
167
+ the specified ``DIRECTORY`` scope (or the current directory scope if no
168
+ ``DIRECTORY`` option is given), this stores an empty string in the variable.
169
+
170
+ Deferred calls may be canceled by their id:
171
+
172
+ .. code-block:: cmake
173
+
174
+ cmake_language(DEFER [DIRECTORY <dir>] CANCEL_CALL <id>...)
175
+
176
+ This cancels all deferred calls matching any of the given ids in the specified
177
+ ``DIRECTORY`` scope (or the current directory scope if no ``DIRECTORY`` option
178
+ is given). Unknown ids are silently ignored.
179
+
180
+ Deferred Call Examples
181
+ """"""""""""""""""""""
182
+
183
+ For example, the code:
184
+
185
+ .. code-block:: cmake
186
+
187
+ cmake_language(DEFER CALL message "${deferred_message}")
188
+ cmake_language(DEFER ID_VAR id CALL message "Canceled Message")
189
+ cmake_language(DEFER CANCEL_CALL ${id})
190
+ message("Immediate Message")
191
+ set(deferred_message "Deferred Message")
192
+
193
+ prints::
194
+
195
+ Immediate Message
196
+ Deferred Message
197
+
198
+ The ``Cancelled Message`` is never printed because its command is
199
+ canceled. The ``deferred_message`` variable reference is not evaluated
200
+ until the call site, so it can be set after the deferred call is scheduled.
201
+
202
+ In order to evaluate variable references immediately when scheduling a
203
+ deferred call, wrap it using ``cmake_language(EVAL)``. However, note that
204
+ arguments will be re-evaluated in the deferred call, though that can be
205
+ avoided by using bracket arguments. For example:
206
+
207
+ .. code-block:: cmake
208
+
209
+ set(deferred_message "Deferred Message 1")
210
+ set(re_evaluated [[${deferred_message}]])
211
+ cmake_language(EVAL CODE "
212
+ cmake_language(DEFER CALL message [[${deferred_message}]])
213
+ cmake_language(DEFER CALL message \"${re_evaluated}\")
214
+ ")
215
+ message("Immediate Message")
216
+ set(deferred_message "Deferred Message 2")
217
+
218
+ also prints::
219
+
220
+ Immediate Message
221
+ Deferred Message 1
222
+ Deferred Message 2
223
+
224
+ .. _dependency_providers:
225
+
226
+ Dependency Providers
227
+ ^^^^^^^^^^^^^^^^^^^^
228
+
229
+ .. versionadded:: 3.24
230
+
231
+ .. note:: A high-level introduction to this feature can be found in the
232
+ :ref:`Using Dependencies Guide <dependency_providers_overview>`.
233
+
234
+ .. signature::
235
+ cmake_language(SET_DEPENDENCY_PROVIDER <command>
236
+ SUPPORTED_METHODS <methods>...)
237
+
238
+ When a call is made to :command:`find_package` or
239
+ :command:`FetchContent_MakeAvailable`, the call may be forwarded to a
240
+ dependency provider which then has the opportunity to fulfill the request.
241
+ If the request is for one of the ``<methods>`` specified when the provider
242
+ was set, CMake calls the provider's ``<command>`` with a set of
243
+ method-specific arguments. If the provider does not fulfill the request,
244
+ or if the provider doesn't support the request's method, or no provider
245
+ is set, the built-in :command:`find_package` or
246
+ :command:`FetchContent_MakeAvailable` implementation is used to fulfill
247
+ the request in the usual way.
248
+
249
+ One or more of the following values can be specified for the ``<methods>``
250
+ when setting the provider:
251
+
252
+ ``FIND_PACKAGE``
253
+ The provider command accepts :command:`find_package` requests.
254
+
255
+ ``FETCHCONTENT_MAKEAVAILABLE_SERIAL``
256
+ The provider command accepts :command:`FetchContent_MakeAvailable`
257
+ requests. It expects each dependency to be fed to the provider command
258
+ one at a time, not the whole list in one go.
259
+
260
+ Only one provider can be set at any point in time. If a provider is already
261
+ set when ``cmake_language(SET_DEPENDENCY_PROVIDER)`` is called, the new
262
+ provider replaces the previously set one. The specified ``<command>`` must
263
+ already exist when ``cmake_language(SET_DEPENDENCY_PROVIDER)`` is called.
264
+ As a special case, providing an empty string for the ``<command>`` and no
265
+ ``<methods>`` will discard any previously set provider.
266
+
267
+ The dependency provider can only be set while processing one of the files
268
+ specified by the :variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variable.
269
+ Thus, dependency providers can only be set as part of the first call to
270
+ :command:`project`. Calling ``cmake_language(SET_DEPENDENCY_PROVIDER)``
271
+ outside of that context will result in an error.
272
+
273
+ .. note::
274
+ The choice of dependency provider should always be under the user's control.
275
+ As a convenience, a project may choose to provide a file that users can
276
+ list in their :variable:`CMAKE_PROJECT_TOP_LEVEL_INCLUDES` variable, but
277
+ the use of such a file should always be the user's choice.
278
+
279
+ Provider commands
280
+ """""""""""""""""
281
+
282
+ Providers define a single ``<command>`` to accept requests. The name of
283
+ the command should be specific to that provider, not something overly
284
+ generic that another provider might also use. This enables users to compose
285
+ different providers in their own custom provider. The recommended form is
286
+ ``xxx_provide_dependency()``, where ``xxx`` is the provider-specific part
287
+ (e.g. ``vcpkg_provide_dependency()``, ``conan_provide_dependency()``,
288
+ ``ourcompany_provide_dependency()``, and so on).
289
+
290
+ .. code-block:: cmake
291
+
292
+ xxx_provide_dependency(<method> [<method-specific-args>...])
293
+
294
+ Because some methods expect certain variables to be set in the calling scope,
295
+ the provider command should typically be implemented as a macro rather than a
296
+ function. This ensures it does not introduce a new variable scope.
297
+
298
+ The arguments CMake passes to the dependency provider depend on the type of
299
+ request. The first argument is always the method, and it will only ever
300
+ be one of the ``<methods>`` that was specified when setting the provider.
301
+
302
+ ``FIND_PACKAGE``
303
+ The ``<method-specific-args>`` will be everything passed to the
304
+ :command:`find_package` call that requested the dependency. The first of
305
+ these ``<method-specific-args>`` will therefore always be the name of the
306
+ dependency. Dependency names are case-sensitive for this method because
307
+ :command:`find_package` treats them case-sensitively too.
308
+
309
+ If the provider command fulfills the request, it must set the same variable
310
+ that :command:`find_package` expects to be set. For a dependency named
311
+ ``depName``, the provider must set ``depName_FOUND`` to true if it fulfilled
312
+ the request. If the provider returns without setting this variable, CMake
313
+ will assume the request was not fulfilled and will fall back to the
314
+ built-in implementation.
315
+
316
+ If the provider needs to call the built-in :command:`find_package`
317
+ implementation as part of its processing, it can do so by including the
318
+ ``BYPASS_PROVIDER`` keyword as one of the arguments.
319
+
320
+ ``FETCHCONTENT_MAKEAVAILABE_SERIAL``
321
+ The ``<method-specific-args>`` will be everything passed to the
322
+ :command:`FetchContent_Declare` call that corresponds to the requested
323
+ dependency, with the following exceptions:
324
+
325
+ * If ``SOURCE_DIR`` or ``BINARY_DIR`` were not part of the original
326
+ declared arguments, they will be added with their default values.
327
+ * If :variable:`FETCHCONTENT_TRY_FIND_PACKAGE_MODE` is set to ``NEVER``,
328
+ any ``FIND_PACKAGE_ARGS`` will be omitted.
329
+ * The ``OVERRIDE_FIND_PACKAGE`` keyword is always omitted.
330
+
331
+ The first of the ``<method-specific-args>`` will always be the name of the
332
+ dependency. Dependency names are case-insensitive for this method because
333
+ :module:`FetchContent` also treats them case-insensitively.
334
+
335
+ If the provider fulfills the request, it should call
336
+ :command:`FetchContent_SetPopulated`, passing the name of the dependency as
337
+ the first argument. The ``SOURCE_DIR`` and ``BINARY_DIR`` arguments to that
338
+ command should only be given if the provider makes the dependency's source
339
+ and build directories available in exactly the same way as the built-in
340
+ :command:`FetchContent_MakeAvailable` command.
341
+
342
+ If the provider returns without calling :command:`FetchContent_SetPopulated`
343
+ for the named dependency, CMake will assume the request was not fulfilled
344
+ and will fall back to the built-in implementation.
345
+
346
+ Note that empty arguments may be significant for this method (e.g. an empty
347
+ string following a ``GIT_SUBMODULES`` keyword). Therefore, if forwarding
348
+ these arguments on to another command, extra care must be taken to avoid such
349
+ arguments being silently dropped.
350
+
351
+ If ``FETCHCONTENT_SOURCE_DIR_<uppercaseDepName>`` is set, then the
352
+ dependency provider will never see requests for the ``<depName>`` dependency
353
+ for this method. When the user sets such a variable, they are explicitly
354
+ overriding where to get that dependency from and are taking on the
355
+ responsibility that their overriding version meets any requirements for that
356
+ dependency and is compatible with whatever else in the project uses it.
357
+ Depending on the value of :variable:`FETCHCONTENT_TRY_FIND_PACKAGE_MODE`
358
+ and whether the ``OVERRIDE_FIND_PACKAGE`` option was given to
359
+ :command:`FetchContent_Declare`, having
360
+ ``FETCHCONTENT_SOURCE_DIR_<uppercaseDepName>`` set may also prevent the
361
+ dependency provider from seeing requests for a ``find_package(depName)``
362
+ call too.
363
+
364
+ Provider Examples
365
+ """""""""""""""""
366
+
367
+ This first example only intercepts :command:`find_package` calls. The
368
+ provider command runs an external tool which copies the relevant artifacts
369
+ into a provider-specific directory, if that tool knows about the dependency.
370
+ It then relies on the built-in implementation to then find those artifacts.
371
+ :command:`FetchContent_MakeAvailable` calls would not go through the provider.
372
+
373
+ .. code-block:: cmake
374
+ :caption: mycomp_provider.cmake
375
+
376
+ # Always ensure we have the policy settings this provider expects
377
+ cmake_minimum_required(VERSION 3.24)
378
+
379
+ set(MYCOMP_PROVIDER_INSTALL_DIR ${CMAKE_BINARY_DIR}/mycomp_packages
380
+ CACHE PATH "The directory this provider installs packages to"
381
+ )
382
+ # Tell the built-in implementation to look in our area first, unless
383
+ # the find_package() call uses NO_..._PATH options to exclude it
384
+ list(APPEND CMAKE_MODULE_PATH ${MYCOMP_PROVIDER_INSTALL_DIR}/cmake)
385
+ list(APPEND CMAKE_PREFIX_PATH ${MYCOMP_PROVIDER_INSTALL_DIR})
386
+
387
+ macro(mycomp_provide_dependency method package_name)
388
+ execute_process(
389
+ COMMAND some_tool ${package_name} --installdir ${MYCOMP_PROVIDER_INSTALL_DIR}
390
+ COMMAND_ERROR_IS_FATAL ANY
391
+ )
392
+ endmacro()
393
+
394
+ cmake_language(
395
+ SET_DEPENDENCY_PROVIDER mycomp_provide_dependency
396
+ SUPPORTED_METHODS FIND_PACKAGE
397
+ )
398
+
399
+ The user would then typically use the above file like so::
400
+
401
+ cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/path/to/mycomp_provider.cmake ...
402
+
403
+ The next example demonstrates a provider that accepts both methods, but
404
+ only handles one specific dependency. It enforces providing Google Test
405
+ using :module:`FetchContent`, but leaves all other dependencies to be
406
+ fulfilled by CMake's built-in implementation. It accepts a few different
407
+ names, which demonstrates one way of working around projects that hard-code
408
+ an unusual or undesirable way of adding this particular dependency to the
409
+ build. The example also demonstrates how to use the :command:`list` command
410
+ to preserve variables that may be overwritten by a call to
411
+ :command:`FetchContent_MakeAvailable`.
412
+
413
+ .. code-block:: cmake
414
+ :caption: mycomp_provider.cmake
415
+
416
+ cmake_minimum_required(VERSION 3.24)
417
+
418
+ # Because we declare this very early, it will take precedence over any
419
+ # details the project might declare later for the same thing
420
+ include(FetchContent)
421
+ FetchContent_Declare(
422
+ googletest
423
+ GIT_REPOSITORY https://github.com/google/googletest.git
424
+ GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release-1.11.0
425
+ )
426
+
427
+ # Both FIND_PACKAGE and FETCHCONTENT_MAKEAVAILABLE_SERIAL methods provide
428
+ # the package or dependency name as the first method-specific argument.
429
+ macro(mycomp_provide_dependency method dep_name)
430
+ if("${dep_name}" MATCHES "^(gtest|googletest)$")
431
+ # Save our current command arguments in case we are called recursively
432
+ list(APPEND mycomp_provider_args ${method} ${dep_name})
433
+
434
+ # This will forward to the built-in FetchContent implementation,
435
+ # which detects a recursive call for the same thing and avoids calling
436
+ # the provider again if dep_name is the same as the current call.
437
+ FetchContent_MakeAvailable(googletest)
438
+
439
+ # Restore our command arguments
440
+ list(POP_BACK mycomp_provider_args dep_name method)
441
+
442
+ # Tell the caller we fulfilled the request
443
+ if("${method}" STREQUAL "FIND_PACKAGE")
444
+ # We need to set this if we got here from a find_package() call
445
+ # since we used a different method to fulfill the request.
446
+ # This example assumes projects only use the gtest targets,
447
+ # not any of the variables the FindGTest module may define.
448
+ set(${dep_name}_FOUND TRUE)
449
+ elseif(NOT "${dep_name}" STREQUAL "googletest")
450
+ # We used the same method, but were given a different name to the
451
+ # one we populated with. Tell the caller about the name it used.
452
+ FetchContent_SetPopulated(${dep_name}
453
+ SOURCE_DIR "${googletest_SOURCE_DIR}"
454
+ BINARY_DIR "${googletest_BINARY_DIR}"
455
+ )
456
+ endif()
457
+ endif()
458
+ endmacro()
459
+
460
+ cmake_language(
461
+ SET_DEPENDENCY_PROVIDER mycomp_provide_dependency
462
+ SUPPORTED_METHODS
463
+ FIND_PACKAGE
464
+ FETCHCONTENT_MAKEAVAILABLE_SERIAL
465
+ )
466
+
467
+ The final example demonstrates how to modify arguments to a
468
+ :command:`find_package` call. It forces all such calls to have the
469
+ ``QUIET`` keyword. It uses the ``BYPASS_PROVIDER`` keyword to prevent
470
+ calling the provider command recursively for the same dependency.
471
+
472
+ .. code-block:: cmake
473
+ :caption: mycomp_provider.cmake
474
+
475
+ cmake_minimum_required(VERSION 3.24)
476
+
477
+ macro(mycomp_provide_dependency method)
478
+ find_package(${ARGN} BYPASS_PROVIDER QUIET)
479
+ endmacro()
480
+
481
+ cmake_language(
482
+ SET_DEPENDENCY_PROVIDER mycomp_provide_dependency
483
+ SUPPORTED_METHODS FIND_PACKAGE
484
+ )
485
+
486
+ Getting current message log level
487
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
488
+
489
+ .. versionadded:: 3.25
490
+
491
+ .. _query_message_log_level:
492
+
493
+ .. signature::
494
+ cmake_language(GET_MESSAGE_LOG_LEVEL <output_variable>)
495
+
496
+ Writes the current :command:`message` logging level
497
+ into the given ``<output_variable>``.
498
+
499
+ See :command:`message` for the possible logging levels.
500
+
501
+ The current message logging level can be set either using the
502
+ :option:`--log-level <cmake --log-level>`
503
+ command line option of the :manual:`cmake(1)` program or using
504
+ the :variable:`CMAKE_MESSAGE_LOG_LEVEL` variable.
505
+
506
+ If both the command line option and the variable are set, the command line
507
+ option takes precedence. If neither are set, the default logging level
508
+ is returned.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_minimum_required.rst ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required
2
+ ----------------------
3
+
4
+ Require a minimum version of cmake.
5
+
6
+ .. code-block:: cmake
7
+
8
+ cmake_minimum_required(VERSION <min>[...<policy_max>] [FATAL_ERROR])
9
+
10
+ .. versionadded:: 3.12
11
+ The optional ``<policy_max>`` version.
12
+
13
+ Sets the minimum required version of cmake for a project.
14
+ Also updates the policy settings as explained below.
15
+
16
+ ``<min>`` and the optional ``<policy_max>`` are each CMake versions of the
17
+ form ``major.minor[.patch[.tweak]]``, and the ``...`` is literal.
18
+
19
+ If the running version of CMake is lower than the ``<min>`` required
20
+ version it will stop processing the project and report an error.
21
+ The optional ``<policy_max>`` version, if specified, must be at least the
22
+ ``<min>`` version and affects policy settings as described in `Policy Settings`_.
23
+ If the running version of CMake is older than 3.12, the extra ``...``
24
+ dots will be seen as version component separators, resulting in the
25
+ ``...<max>`` part being ignored and preserving the pre-3.12 behavior
26
+ of basing policies on ``<min>``.
27
+
28
+ This command will set the value of the
29
+ :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable to ``<min>``.
30
+
31
+ The ``FATAL_ERROR`` option is accepted but ignored by CMake 2.6 and
32
+ higher. It should be specified so CMake versions 2.4 and lower fail
33
+ with an error instead of just a warning.
34
+
35
+ .. note::
36
+ Call the ``cmake_minimum_required()`` command at the beginning of
37
+ the top-level ``CMakeLists.txt`` file even before calling the
38
+ :command:`project` command. It is important to establish version
39
+ and policy settings before invoking other commands whose behavior
40
+ they may affect. See also policy :policy:`CMP0000`.
41
+
42
+ Calling ``cmake_minimum_required()`` inside a :command:`function`
43
+ limits some effects to the function scope when invoked. For example,
44
+ the :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable won't be set
45
+ in the calling scope. Functions do not introduce their own policy
46
+ scope though, so policy settings of the caller *will* be affected
47
+ (see below). Due to this mix of things that do and do not affect the
48
+ calling scope, calling ``cmake_minimum_required()`` inside a function
49
+ is generally discouraged.
50
+
51
+ .. _`Policy Settings`:
52
+
53
+ Policy Settings
54
+ ^^^^^^^^^^^^^^^
55
+
56
+ The ``cmake_minimum_required(VERSION)`` command implicitly invokes the
57
+ :command:`cmake_policy(VERSION)` command to specify that the current
58
+ project code is written for the given range of CMake versions.
59
+ All policies known to the running version of CMake and introduced
60
+ in the ``<min>`` (or ``<max>``, if specified) version or earlier will
61
+ be set to use ``NEW`` behavior. All policies introduced in later
62
+ versions will be unset. This effectively requests behavior preferred
63
+ as of a given CMake version and tells newer CMake versions to warn
64
+ about their new policies.
65
+
66
+ When a ``<min>`` version higher than 2.4 is specified the command
67
+ implicitly invokes
68
+
69
+ .. code-block:: cmake
70
+
71
+ cmake_policy(VERSION <min>[...<max>])
72
+
73
+ which sets CMake policies based on the range of versions specified.
74
+ When a ``<min>`` version 2.4 or lower is given the command implicitly
75
+ invokes
76
+
77
+ .. code-block:: cmake
78
+
79
+ cmake_policy(VERSION 2.4[...<max>])
80
+
81
+ which enables compatibility features for CMake 2.4 and lower.
82
+
83
+ .. include:: DEPRECATED_POLICY_VERSIONS.txt
84
+
85
+ See Also
86
+ ^^^^^^^^
87
+
88
+ * :command:`cmake_policy`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_parse_arguments.rst ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_parse_arguments
2
+ ---------------------
3
+
4
+ Parse function or macro arguments.
5
+
6
+ .. code-block:: cmake
7
+
8
+ cmake_parse_arguments(<prefix> <options> <one_value_keywords>
9
+ <multi_value_keywords> <args>...)
10
+
11
+ cmake_parse_arguments(PARSE_ARGV <N> <prefix> <options>
12
+ <one_value_keywords> <multi_value_keywords>)
13
+
14
+ .. versionadded:: 3.5
15
+ This command is implemented natively. Previously, it has been defined in the
16
+ module :module:`CMakeParseArguments`.
17
+
18
+ This command is for use in macros or functions.
19
+ It processes the arguments given to that macro or function,
20
+ and defines a set of variables which hold the values of the
21
+ respective options.
22
+
23
+ The first signature reads processes arguments passed in the ``<args>...``.
24
+ This may be used in either a :command:`macro` or a :command:`function`.
25
+
26
+ .. versionadded:: 3.7
27
+ The ``PARSE_ARGV`` signature is only for use in a :command:`function`
28
+ body. In this case the arguments that are parsed come from the
29
+ ``ARGV#`` variables of the calling function. The parsing starts with
30
+ the ``<N>``-th argument, where ``<N>`` is an unsigned integer.
31
+ This allows for the values to have special characters like ``;`` in them.
32
+
33
+ The ``<options>`` argument contains all options for the respective macro,
34
+ i.e. keywords which can be used when calling the macro without any value
35
+ following, like e.g. the ``OPTIONAL`` keyword of the :command:`install`
36
+ command.
37
+
38
+ The ``<one_value_keywords>`` argument contains all keywords for this macro
39
+ which are followed by one value, like e.g. ``DESTINATION`` keyword of the
40
+ :command:`install` command.
41
+
42
+ The ``<multi_value_keywords>`` argument contains all keywords for this
43
+ macro which can be followed by more than one value, like e.g. the
44
+ ``TARGETS`` or ``FILES`` keywords of the :command:`install` command.
45
+
46
+ .. versionchanged:: 3.5
47
+ All keywords shall be unique. I.e. every keyword shall only be specified
48
+ once in either ``<options>``, ``<one_value_keywords>`` or
49
+ ``<multi_value_keywords>``. A warning will be emitted if uniqueness is
50
+ violated.
51
+
52
+ When done, ``cmake_parse_arguments`` will consider for each of the
53
+ keywords listed in ``<options>``, ``<one_value_keywords>`` and
54
+ ``<multi_value_keywords>`` a variable composed of the given ``<prefix>``
55
+ followed by ``"_"`` and the name of the respective keyword. These
56
+ variables will then hold the respective value from the argument list
57
+ or be undefined if the associated option could not be found.
58
+ For the ``<options>`` keywords, these will always be defined,
59
+ to ``TRUE`` or ``FALSE``, whether the option is in the argument list or not.
60
+
61
+ All remaining arguments are collected in a variable
62
+ ``<prefix>_UNPARSED_ARGUMENTS`` that will be undefined if all arguments
63
+ were recognized. This can be checked afterwards to see
64
+ whether your macro was called with unrecognized parameters.
65
+
66
+ .. versionadded:: 3.15
67
+ ``<one_value_keywords>`` and ``<multi_value_keywords>`` that were given no
68
+ values at all are collected in a variable
69
+ ``<prefix>_KEYWORDS_MISSING_VALUES`` that will be undefined if all keywords
70
+ received values. This can be checked to see if there were keywords without
71
+ any values given.
72
+
73
+ Consider the following example macro, ``my_install()``, which takes similar
74
+ arguments to the real :command:`install` command:
75
+
76
+ .. code-block:: cmake
77
+
78
+ macro(my_install)
79
+ set(options OPTIONAL FAST)
80
+ set(oneValueArgs DESTINATION RENAME)
81
+ set(multiValueArgs TARGETS CONFIGURATIONS)
82
+ cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
83
+ "${multiValueArgs}" ${ARGN} )
84
+
85
+ # ...
86
+
87
+ Assume ``my_install()`` has been called like this:
88
+
89
+ .. code-block:: cmake
90
+
91
+ my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub CONFIGURATIONS)
92
+
93
+ After the ``cmake_parse_arguments`` call the macro will have set or undefined
94
+ the following variables::
95
+
96
+ MY_INSTALL_OPTIONAL = TRUE
97
+ MY_INSTALL_FAST = FALSE # was not used in call to my_install
98
+ MY_INSTALL_DESTINATION = "bin"
99
+ MY_INSTALL_RENAME <UNDEFINED> # was not used
100
+ MY_INSTALL_TARGETS = "foo;bar"
101
+ MY_INSTALL_CONFIGURATIONS <UNDEFINED> # was not used
102
+ MY_INSTALL_UNPARSED_ARGUMENTS = "blub" # nothing expected after "OPTIONAL"
103
+ MY_INSTALL_KEYWORDS_MISSING_VALUES = "CONFIGURATIONS"
104
+ # No value for "CONFIGURATIONS" given
105
+
106
+ You can then continue and process these variables.
107
+
108
+ Keywords terminate lists of values, e.g. if directly after a
109
+ ``one_value_keyword`` another recognized keyword follows, this is
110
+ interpreted as the beginning of the new option. E.g.
111
+ ``my_install(TARGETS foo DESTINATION OPTIONAL)`` would result in
112
+ ``MY_INSTALL_DESTINATION`` set to ``"OPTIONAL"``, but as ``OPTIONAL``
113
+ is a keyword itself ``MY_INSTALL_DESTINATION`` will be empty (but added
114
+ to ``MY_INSTALL_KEYWORDS_MISSING_VALUES``) and ``MY_INSTALL_OPTIONAL`` will
115
+ therefore be set to ``TRUE``.
116
+
117
+ See Also
118
+ ^^^^^^^^
119
+
120
+ * :command:`function`
121
+ * :command:`macro`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_path.rst ADDED
@@ -0,0 +1,798 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_path
2
+ ----------
3
+
4
+ .. versionadded:: 3.20
5
+
6
+ This command is for the manipulation of paths. Only syntactic aspects of
7
+ paths are handled, there is no interaction of any kind with any underlying
8
+ file system. The path may represent a non-existing path or even one that
9
+ is not allowed to exist on the current file system or platform.
10
+ For operations that do interact with the filesystem, see the :command:`file`
11
+ command.
12
+
13
+ .. note::
14
+
15
+ The ``cmake_path`` command handles paths in the format of the build system
16
+ (i.e. the host platform), not the target system. When cross-compiling,
17
+ if the path contains elements that are not representable on the host
18
+ platform (e.g. a drive letter when the host is not Windows), the results
19
+ will be unpredictable.
20
+
21
+ Synopsis
22
+ ^^^^^^^^
23
+
24
+ .. parsed-literal::
25
+
26
+ `Conventions`_
27
+
28
+ `Path Structure And Terminology`_
29
+
30
+ `Normalization`_
31
+
32
+ `Decomposition`_
33
+ cmake_path(`GET`_ <path-var> :ref:`ROOT_NAME <GET_ROOT_NAME>` <out-var>)
34
+ cmake_path(`GET`_ <path-var> :ref:`ROOT_DIRECTORY <GET_ROOT_DIRECTORY>` <out-var>)
35
+ cmake_path(`GET`_ <path-var> :ref:`ROOT_PATH <GET_ROOT_PATH>` <out-var>)
36
+ cmake_path(`GET`_ <path-var> :ref:`FILENAME <GET_FILENAME>` <out-var>)
37
+ cmake_path(`GET`_ <path-var> :ref:`EXTENSION <GET_EXTENSION>` [LAST_ONLY] <out-var>)
38
+ cmake_path(`GET`_ <path-var> :ref:`STEM <GET_STEM>` [LAST_ONLY] <out-var>)
39
+ cmake_path(`GET`_ <path-var> :ref:`RELATIVE_PART <GET_RELATIVE_PART>` <out-var>)
40
+ cmake_path(`GET`_ <path-var> :ref:`PARENT_PATH <GET_PARENT_PATH>` <out-var>)
41
+
42
+ `Query`_
43
+ cmake_path(`HAS_ROOT_NAME`_ <path-var> <out-var>)
44
+ cmake_path(`HAS_ROOT_DIRECTORY`_ <path-var> <out-var>)
45
+ cmake_path(`HAS_ROOT_PATH`_ <path-var> <out-var>)
46
+ cmake_path(`HAS_FILENAME`_ <path-var> <out-var>)
47
+ cmake_path(`HAS_EXTENSION`_ <path-var> <out-var>)
48
+ cmake_path(`HAS_STEM`_ <path-var> <out-var>)
49
+ cmake_path(`HAS_RELATIVE_PART`_ <path-var> <out-var>)
50
+ cmake_path(`HAS_PARENT_PATH`_ <path-var> <out-var>)
51
+ cmake_path(`IS_ABSOLUTE`_ <path-var> <out-var>)
52
+ cmake_path(`IS_RELATIVE`_ <path-var> <out-var>)
53
+ cmake_path(`IS_PREFIX`_ <path-var> <input> [NORMALIZE] <out-var>)
54
+ cmake_path(`COMPARE`_ <input1> <OP> <input2> <out-var>)
55
+
56
+ `Modification`_
57
+ cmake_path(:ref:`SET <cmake_path-SET>` <path-var> [NORMALIZE] <input>)
58
+ cmake_path(`APPEND`_ <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
59
+ cmake_path(`APPEND_STRING`_ <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
60
+ cmake_path(`REMOVE_FILENAME`_ <path-var> [OUTPUT_VARIABLE <out-var>])
61
+ cmake_path(`REPLACE_FILENAME`_ <path-var> <input> [OUTPUT_VARIABLE <out-var>])
62
+ cmake_path(`REMOVE_EXTENSION`_ <path-var> [LAST_ONLY] [OUTPUT_VARIABLE <out-var>])
63
+ cmake_path(`REPLACE_EXTENSION`_ <path-var> [LAST_ONLY] <input> [OUTPUT_VARIABLE <out-var>])
64
+
65
+ `Generation`_
66
+ cmake_path(`NORMAL_PATH`_ <path-var> [OUTPUT_VARIABLE <out-var>])
67
+ cmake_path(`RELATIVE_PATH`_ <path-var> [BASE_DIRECTORY <input>] [OUTPUT_VARIABLE <out-var>])
68
+ cmake_path(`ABSOLUTE_PATH`_ <path-var> [BASE_DIRECTORY <input>] [NORMALIZE] [OUTPUT_VARIABLE <out-var>])
69
+
70
+ `Native Conversion`_
71
+ cmake_path(`NATIVE_PATH`_ <path-var> [NORMALIZE] <out-var>)
72
+ cmake_path(`CONVERT`_ <input> `TO_CMAKE_PATH_LIST`_ <out-var> [NORMALIZE])
73
+ cmake_path(`CONVERT`_ <input> `TO_NATIVE_PATH_LIST`_ <out-var> [NORMALIZE])
74
+
75
+ `Hashing`_
76
+ cmake_path(`HASH`_ <path-var> <out-var>)
77
+
78
+ Conventions
79
+ ^^^^^^^^^^^
80
+
81
+ The following conventions are used in this command's documentation:
82
+
83
+ ``<path-var>``
84
+ Always the name of a variable. For commands that expect a ``<path-var>``
85
+ as input, the variable must exist and it is expected to hold a single path.
86
+
87
+ ``<input>``
88
+ A string literal which may contain a path, path fragment, or multiple paths
89
+ with a special separator depending on the command. See the description of
90
+ each command to see how this is interpreted.
91
+
92
+ ``<input>...``
93
+ Zero or more string literal arguments.
94
+
95
+ ``<out-var>``
96
+ The name of a variable into which the result of a command will be written.
97
+
98
+
99
+ .. _Path Structure And Terminology:
100
+
101
+ Path Structure And Terminology
102
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
+
104
+ A path has the following structure (all components are optional, with some
105
+ constraints):
106
+
107
+ ::
108
+
109
+ root-name root-directory-separator (item-name directory-separator)* filename
110
+
111
+ ``root-name``
112
+ Identifies the root on a filesystem with multiple roots (such as ``"C:"``
113
+ or ``"//myserver"``). It is optional.
114
+
115
+ ``root-directory-separator``
116
+ A directory separator that, if present, indicates that this path is
117
+ absolute. If it is missing and the first element other than the
118
+ ``root-name`` is an ``item-name``, then the path is relative.
119
+
120
+ ``item-name``
121
+ A sequence of characters that aren't directory separators. This name may
122
+ identify a file, a hard link, a symbolic link, or a directory. Two special
123
+ cases are recognized:
124
+
125
+ * The item name consisting of a single dot character ``.`` is a
126
+ directory name that refers to the current directory.
127
+
128
+ * The item name consisting of two dot characters ``..`` is a
129
+ directory name that refers to the parent directory.
130
+
131
+ The ``(...)*`` pattern shown above is to indicate that there can be zero
132
+ or more item names, with multiple items separated by a
133
+ ``directory-separator``. The ``()*`` characters are not part of the path.
134
+
135
+ ``directory-separator``
136
+ The only recognized directory separator is a forward slash character ``/``.
137
+ If this character is repeated, it is treated as a single directory
138
+ separator. In other words, ``/usr///////lib`` is the same as ``/usr/lib``.
139
+
140
+ .. _FILENAME_DEF:
141
+ .. _EXTENSION_DEF:
142
+ .. _STEM_DEF:
143
+
144
+ ``filename``
145
+ A path has a ``filename`` if it does not end with a ``directory-separator``.
146
+ The ``filename`` is effectively the last ``item-name`` of the path, so it
147
+ can also be a hard link, symbolic link or a directory.
148
+
149
+ A ``filename`` can have an *extension*. By default, the extension is
150
+ defined as the sub-string beginning at the left-most period (including
151
+ the period) and until the end of the ``filename``. In commands that
152
+ accept a ``LAST_ONLY`` keyword, ``LAST_ONLY`` changes the interpretation
153
+ to the sub-string beginning at the right-most period.
154
+
155
+ The following exceptions apply to the above interpretation:
156
+
157
+ * If the first character in the ``filename`` is a period, that period is
158
+ ignored (i.e. a ``filename`` like ``".profile"`` is treated as having
159
+ no extension).
160
+
161
+ * If the ``filename`` is either ``.`` or ``..``, it has no extension.
162
+
163
+ The *stem* is the part of the ``filename`` before the extension.
164
+
165
+ Some commands refer to a ``root-path``. This is the concatenation of
166
+ ``root-name`` and ``root-directory-separator``, either or both of which can
167
+ be empty. A ``relative-part`` refers to the full path with any ``root-path``
168
+ removed.
169
+
170
+
171
+ Creating A Path Variable
172
+ ^^^^^^^^^^^^^^^^^^^^^^^^
173
+
174
+ While a path can be created with care using an ordinary :command:`set`
175
+ command, it is recommended to use :ref:`cmake_path(SET) <cmake_path-SET>`
176
+ instead, as it automatically converts the path to the required form where
177
+ required. The :ref:`cmake_path(APPEND) <APPEND>` subcommand may
178
+ be another suitable alternative where a path needs to be constructed by
179
+ joining fragments. The following example compares the three methods for
180
+ constructing the same path:
181
+
182
+ .. code-block:: cmake
183
+
184
+ set(path1 "${CMAKE_CURRENT_SOURCE_DIR}/data")
185
+
186
+ cmake_path(SET path2 "${CMAKE_CURRENT_SOURCE_DIR}/data")
187
+
188
+ cmake_path(APPEND path3 "${CMAKE_CURRENT_SOURCE_DIR}" "data")
189
+
190
+ `Modification`_ and `Generation`_ sub-commands can either store the result
191
+ in-place, or in a separate variable named after an ``OUTPUT_VARIABLE``
192
+ keyword. All other sub-commands store the result in a mandatory ``<out-var>``
193
+ variable.
194
+
195
+ .. _Normalization:
196
+
197
+ Normalization
198
+ ^^^^^^^^^^^^^
199
+
200
+ Some sub-commands support *normalizing* a path. The algorithm used to
201
+ normalize a path is as follows:
202
+
203
+ 1. If the path is empty, stop (the normalized form of an empty path is
204
+ also an empty path).
205
+ 2. Replace each ``directory-separator``, which may consist of multiple
206
+ separators, with a single ``/`` (``/a///b --> /a/b``).
207
+ 3. Remove each solitary period (``.``) and any immediately following
208
+ ``directory-separator`` (``/a/./b/. --> /a/b``).
209
+ 4. Remove each ``item-name`` (other than ``..``) that is immediately
210
+ followed by a ``directory-separator`` and a ``..``, along with any
211
+ immediately following ``directory-separator`` (``/a/b/../c --> a/c``).
212
+ 5. If there is a ``root-directory``, remove any ``..`` and any
213
+ ``directory-separators`` immediately following them. The parent of the
214
+ root directory is treated as still the root directory (``/../a --> /a``).
215
+ 6. If the last ``item-name`` is ``..``, remove any trailing
216
+ ``directory-separator`` (``../ --> ..``).
217
+ 7. If the path is empty by this stage, add a ``dot`` (normal form of ``./``
218
+ is ``.``).
219
+
220
+
221
+ .. _Path Decomposition:
222
+
223
+ Decomposition
224
+ ^^^^^^^^^^^^^
225
+
226
+ .. _GET:
227
+ .. _GET_ROOT_NAME:
228
+ .. _GET_ROOT_DIRECTORY:
229
+ .. _GET_ROOT_PATH:
230
+ .. _GET_FILENAME:
231
+ .. _GET_EXTENSION:
232
+ .. _GET_STEM:
233
+ .. _GET_RELATIVE_PART:
234
+ .. _GET_PARENT_PATH:
235
+
236
+ The following forms of the ``GET`` subcommand each retrieve a different
237
+ component or group of components from a path. See
238
+ `Path Structure And Terminology`_ for the meaning of each path component.
239
+
240
+ .. code-block:: cmake
241
+
242
+ cmake_path(GET <path-var> ROOT_NAME <out-var>)
243
+ cmake_path(GET <path-var> ROOT_DIRECTORY <out-var>)
244
+ cmake_path(GET <path-var> ROOT_PATH <out-var>)
245
+ cmake_path(GET <path-var> FILENAME <out-var>)
246
+ cmake_path(GET <path-var> EXTENSION [LAST_ONLY] <out-var>)
247
+ cmake_path(GET <path-var> STEM [LAST_ONLY] <out-var>)
248
+ cmake_path(GET <path-var> RELATIVE_PART <out-var>)
249
+ cmake_path(GET <path-var> PARENT_PATH <out-var>)
250
+
251
+ If a requested component is not present in the path, an empty string will be
252
+ stored in ``<out-var>``. For example, only Windows systems have the concept
253
+ of a ``root-name``, so when the host machine is non-Windows, the ``ROOT_NAME``
254
+ subcommand will always return an empty string.
255
+
256
+ For ``PARENT_PATH``, if the `HAS_RELATIVE_PART`_ subcommand returns false,
257
+ the result is a copy of ``<path-var>``. Note that this implies that a root
258
+ directory is considered to have a parent, with that parent being itself.
259
+ Where `HAS_RELATIVE_PART`_ returns true, the result will essentially be
260
+ ``<path-var>`` with one less element.
261
+
262
+ Root examples
263
+ """""""""""""
264
+
265
+ .. code-block:: cmake
266
+
267
+ set(path "c:/a")
268
+
269
+ cmake_path(GET path ROOT_NAME rootName)
270
+ cmake_path(GET path ROOT_DIRECTORY rootDir)
271
+ cmake_path(GET path ROOT_PATH rootPath)
272
+
273
+ message("Root name is \"${rootName}\"")
274
+ message("Root directory is \"${rootDir}\"")
275
+ message("Root path is \"${rootPath}\"")
276
+
277
+ ::
278
+
279
+ Root name is "c:"
280
+ Root directory is "/"
281
+ Root path is "c:/"
282
+
283
+ Filename examples
284
+ """""""""""""""""
285
+
286
+ .. code-block:: cmake
287
+
288
+ set(path "/a/b")
289
+ cmake_path(GET path FILENAME filename)
290
+ message("First filename is \"${filename}\"")
291
+
292
+ # Trailing slash means filename is empty
293
+ set(path "/a/b/")
294
+ cmake_path(GET path FILENAME filename)
295
+ message("Second filename is \"${filename}\"")
296
+
297
+ ::
298
+
299
+ First filename is "b"
300
+ Second filename is ""
301
+
302
+ Extension and stem examples
303
+ """""""""""""""""""""""""""
304
+
305
+ .. code-block:: cmake
306
+
307
+ set(path "name.ext1.ext2")
308
+
309
+ cmake_path(GET path EXTENSION fullExt)
310
+ cmake_path(GET path STEM fullStem)
311
+ message("Full extension is \"${fullExt}\"")
312
+ message("Full stem is \"${fullStem}\"")
313
+
314
+ # Effect of LAST_ONLY
315
+ cmake_path(GET path EXTENSION LAST_ONLY lastExt)
316
+ cmake_path(GET path STEM LAST_ONLY lastStem)
317
+ message("Last extension is \"${lastExt}\"")
318
+ message("Last stem is \"${lastStem}\"")
319
+
320
+ # Special cases
321
+ set(dotPath "/a/.")
322
+ set(dotDotPath "/a/..")
323
+ set(someMorePath "/a/.some.more")
324
+ cmake_path(GET dotPath EXTENSION dotExt)
325
+ cmake_path(GET dotPath STEM dotStem)
326
+ cmake_path(GET dotDotPath EXTENSION dotDotExt)
327
+ cmake_path(GET dotDotPath STEM dotDotStem)
328
+ cmake_path(GET dotMorePath EXTENSION someMoreExt)
329
+ cmake_path(GET dotMorePath STEM someMoreStem)
330
+ message("Dot extension is \"${dotExt}\"")
331
+ message("Dot stem is \"${dotStem}\"")
332
+ message("Dot-dot extension is \"${dotDotExt}\"")
333
+ message("Dot-dot stem is \"${dotDotStem}\"")
334
+ message(".some.more extension is \"${someMoreExt}\"")
335
+ message(".some.more stem is \"${someMoreStem}\"")
336
+
337
+ ::
338
+
339
+ Full extension is ".ext1.ext2"
340
+ Full stem is "name"
341
+ Last extension is ".ext2"
342
+ Last stem is "name.ext1"
343
+ Dot extension is ""
344
+ Dot stem is "."
345
+ Dot-dot extension is ""
346
+ Dot-dot stem is ".."
347
+ .some.more extension is ".more"
348
+ .some.more stem is ".some"
349
+
350
+ Relative part examples
351
+ """"""""""""""""""""""
352
+
353
+ .. code-block:: cmake
354
+
355
+ set(path "c:/a/b")
356
+ cmake_path(GET path RELATIVE_PART result)
357
+ message("Relative part is \"${result}\"")
358
+
359
+ set(path "c/d")
360
+ cmake_path(GET path RELATIVE_PART result)
361
+ message("Relative part is \"${result}\"")
362
+
363
+ set(path "/")
364
+ cmake_path(GET path RELATIVE_PART result)
365
+ message("Relative part is \"${result}\"")
366
+
367
+ ::
368
+
369
+ Relative part is "a/b"
370
+ Relative part is "c/d"
371
+ Relative part is ""
372
+
373
+ Path traversal examples
374
+ """""""""""""""""""""""
375
+
376
+ .. code-block:: cmake
377
+
378
+ set(path "c:/a/b")
379
+ cmake_path(GET path PARENT_PATH result)
380
+ message("Parent path is \"${result}\"")
381
+
382
+ set(path "c:/")
383
+ cmake_path(GET path PARENT_PATH result)
384
+ message("Parent path is \"${result}\"")
385
+
386
+ ::
387
+
388
+ Parent path is "c:/a"
389
+ Parent path is "c:/"
390
+
391
+
392
+ .. _Path Query:
393
+
394
+ Query
395
+ ^^^^^
396
+
397
+ Each of the ``GET`` subcommands has a corresponding ``HAS_...``
398
+ subcommand which can be used to discover whether a particular path
399
+ component is present. See `Path Structure And Terminology`_ for the
400
+ meaning of each path component.
401
+
402
+ .. _HAS_ROOT_NAME:
403
+ .. _HAS_ROOT_DIRECTORY:
404
+ .. _HAS_ROOT_PATH:
405
+ .. _HAS_FILENAME:
406
+ .. _HAS_EXTENSION:
407
+ .. _HAS_STEM:
408
+ .. _HAS_RELATIVE_PART:
409
+ .. _HAS_PARENT_PATH:
410
+
411
+ .. code-block:: cmake
412
+
413
+ cmake_path(HAS_ROOT_NAME <path-var> <out-var>)
414
+ cmake_path(HAS_ROOT_DIRECTORY <path-var> <out-var>)
415
+ cmake_path(HAS_ROOT_PATH <path-var> <out-var>)
416
+ cmake_path(HAS_FILENAME <path-var> <out-var>)
417
+ cmake_path(HAS_EXTENSION <path-var> <out-var>)
418
+ cmake_path(HAS_STEM <path-var> <out-var>)
419
+ cmake_path(HAS_RELATIVE_PART <path-var> <out-var>)
420
+ cmake_path(HAS_PARENT_PATH <path-var> <out-var>)
421
+
422
+ Each of the above follows the predictable pattern of setting ``<out-var>``
423
+ to true if the path has the associated component, or false otherwise.
424
+ Note the following special cases:
425
+
426
+ * For ``HAS_ROOT_PATH``, a true result will only be returned if at least one
427
+ of ``root-name`` or ``root-directory`` is non-empty.
428
+
429
+ * For ``HAS_PARENT_PATH``, the root directory is also considered to have a
430
+ parent, which will be itself. The result is true except if the path
431
+ consists of just a :ref:`filename <FILENAME_DEF>`.
432
+
433
+ .. _IS_ABSOLUTE:
434
+
435
+ .. code-block:: cmake
436
+
437
+ cmake_path(IS_ABSOLUTE <path-var> <out-var>)
438
+
439
+ Sets ``<out-var>`` to true if ``<path-var>`` is absolute. An absolute path
440
+ is a path that unambiguously identifies the location of a file without
441
+ reference to an additional starting location. On Windows, this means the
442
+ path must have both a ``root-name`` and a ``root-directory-separator`` to be
443
+ considered absolute. On other platforms, just a ``root-directory-separator``
444
+ is sufficient. Note that this means on Windows, ``IS_ABSOLUTE`` can be
445
+ false while ``HAS_ROOT_DIRECTORY`` can be true.
446
+
447
+ .. _IS_RELATIVE:
448
+
449
+ .. code-block:: cmake
450
+
451
+ cmake_path(IS_RELATIVE <path-var> <out-var>)
452
+
453
+ This will store the opposite of ``IS_ABSOLUTE`` in ``<out-var>``.
454
+
455
+ .. _IS_PREFIX:
456
+
457
+ .. code-block:: cmake
458
+
459
+ cmake_path(IS_PREFIX <path-var> <input> [NORMALIZE] <out-var>)
460
+
461
+ Checks if ``<path-var>`` is the prefix of ``<input>``.
462
+
463
+ When the ``NORMALIZE`` option is specified, ``<path-var>`` and ``<input>``
464
+ are :ref:`normalized <Normalization>` before the check.
465
+
466
+ .. code-block:: cmake
467
+
468
+ set(path "/a/b/c")
469
+ cmake_path(IS_PREFIX path "/a/b/c/d" result) # result = true
470
+ cmake_path(IS_PREFIX path "/a/b" result) # result = false
471
+ cmake_path(IS_PREFIX path "/x/y/z" result) # result = false
472
+
473
+ set(path "/a/b")
474
+ cmake_path(IS_PREFIX path "/a/c/../b" NORMALIZE result) # result = true
475
+
476
+ .. _Path COMPARE:
477
+ .. _COMPARE:
478
+
479
+ .. code-block:: cmake
480
+
481
+ cmake_path(COMPARE <input1> EQUAL <input2> <out-var>)
482
+ cmake_path(COMPARE <input1> NOT_EQUAL <input2> <out-var>)
483
+
484
+ Compares the lexical representations of two paths provided as string literals.
485
+ No normalization is performed on either path, except multiple consecutive
486
+ directory separators are effectively collapsed into a single separator.
487
+ Equality is determined according to the following pseudo-code logic:
488
+
489
+ ::
490
+
491
+ if(NOT <input1>.root_name() STREQUAL <input2>.root_name())
492
+ return FALSE
493
+
494
+ if(<input1>.has_root_directory() XOR <input2>.has_root_directory())
495
+ return FALSE
496
+
497
+ Return FALSE if a relative portion of <input1> is not lexicographically
498
+ equal to the relative portion of <input2>. This comparison is performed path
499
+ component-wise. If all of the components compare equal, then return TRUE.
500
+
501
+ .. note::
502
+ Unlike most other ``cmake_path()`` subcommands, the ``COMPARE`` subcommand
503
+ takes literal strings as input, not the names of variables.
504
+
505
+
506
+ .. _Path Modification:
507
+
508
+ Modification
509
+ ^^^^^^^^^^^^
510
+
511
+ .. _cmake_path-SET:
512
+
513
+ .. code-block:: cmake
514
+
515
+ cmake_path(SET <path-var> [NORMALIZE] <input>)
516
+
517
+ Assign the ``<input>`` path to ``<path-var>``. If ``<input>`` is a native
518
+ path, it is converted into a cmake-style path with forward-slashes
519
+ (``/``). On Windows, the long filename marker is taken into account.
520
+
521
+ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
522
+ <Normalization>` after the conversion.
523
+
524
+ For example:
525
+
526
+ .. code-block:: cmake
527
+
528
+ set(native_path "c:\\a\\b/..\\c")
529
+ cmake_path(SET path "${native_path}")
530
+ message("CMake path is \"${path}\"")
531
+
532
+ cmake_path(SET path NORMALIZE "${native_path}")
533
+ message("Normalized CMake path is \"${path}\"")
534
+
535
+ Output::
536
+
537
+ CMake path is "c:/a/b/../c"
538
+ Normalized CMake path is "c:/a/c"
539
+
540
+ .. _APPEND:
541
+
542
+ .. code-block:: cmake
543
+
544
+ cmake_path(APPEND <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
545
+
546
+ Append all the ``<input>`` arguments to the ``<path-var>`` using ``/`` as
547
+ the ``directory-separator``. Depending on the ``<input>``, the previous
548
+ contents of ``<path-var>`` may be discarded. For each ``<input>`` argument,
549
+ the following algorithm (pseudo-code) applies:
550
+
551
+ ::
552
+
553
+ # <path> is the contents of <path-var>
554
+
555
+ if(<input>.is_absolute() OR
556
+ (<input>.has_root_name() AND
557
+ NOT <input>.root_name() STREQUAL <path>.root_name()))
558
+ replace <path> with <input>
559
+ return()
560
+ endif()
561
+
562
+ if(<input>.has_root_directory())
563
+ remove any root-directory and the entire relative path from <path>
564
+ elseif(<path>.has_filename() OR
565
+ (NOT <path-var>.has_root_directory() OR <path>.is_absolute()))
566
+ append directory-separator to <path>
567
+ endif()
568
+
569
+ append <input> omitting any root-name to <path>
570
+
571
+ .. _APPEND_STRING:
572
+
573
+ .. code-block:: cmake
574
+
575
+ cmake_path(APPEND_STRING <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
576
+
577
+ Append all the ``<input>`` arguments to the ``<path-var>`` without adding any
578
+ ``directory-separator``.
579
+
580
+ .. _REMOVE_FILENAME:
581
+
582
+ .. code-block:: cmake
583
+
584
+ cmake_path(REMOVE_FILENAME <path-var> [OUTPUT_VARIABLE <out-var>])
585
+
586
+ Removes the :ref:`filename <FILENAME_DEF>` component (as returned by
587
+ :ref:`GET ... FILENAME <GET_FILENAME>`) from ``<path-var>``. After removal,
588
+ any trailing ``directory-separator`` is left alone, if present.
589
+
590
+ If ``OUTPUT_VARIABLE`` is not given, then after this function returns,
591
+ `HAS_FILENAME`_ returns false for ``<path-var>``.
592
+
593
+ For example:
594
+
595
+ .. code-block:: cmake
596
+
597
+ set(path "/a/b")
598
+ cmake_path(REMOVE_FILENAME path)
599
+ message("First path is \"${path}\"")
600
+
601
+ # filename is now already empty, the following removes nothing
602
+ cmake_path(REMOVE_FILENAME path)
603
+ message("Second path is \"${result}\"")
604
+
605
+ Output::
606
+
607
+ First path is "/a/"
608
+ Second path is "/a/"
609
+
610
+ .. _REPLACE_FILENAME:
611
+
612
+ .. code-block:: cmake
613
+
614
+ cmake_path(REPLACE_FILENAME <path-var> <input> [OUTPUT_VARIABLE <out-var>])
615
+
616
+ Replaces the :ref:`filename <FILENAME_DEF>` component from ``<path-var>``
617
+ with ``<input>``. If ``<path-var>`` has no filename component (i.e.
618
+ `HAS_FILENAME`_ returns false), the path is unchanged. The operation is
619
+ equivalent to the following:
620
+
621
+ .. code-block:: cmake
622
+
623
+ cmake_path(HAS_FILENAME path has_filename)
624
+ if(has_filename)
625
+ cmake_path(REMOVE_FILENAME path)
626
+ cmake_path(APPEND path input);
627
+ endif()
628
+
629
+ .. _REMOVE_EXTENSION:
630
+
631
+ .. code-block:: cmake
632
+
633
+ cmake_path(REMOVE_EXTENSION <path-var> [LAST_ONLY]
634
+ [OUTPUT_VARIABLE <out-var>])
635
+
636
+ Removes the :ref:`extension <EXTENSION_DEF>`, if any, from ``<path-var>``.
637
+
638
+ .. _REPLACE_EXTENSION:
639
+
640
+ .. code-block:: cmake
641
+
642
+ cmake_path(REPLACE_EXTENSION <path-var> [LAST_ONLY] <input>
643
+ [OUTPUT_VARIABLE <out-var>])
644
+
645
+ Replaces the :ref:`extension <EXTENSION_DEF>` with ``<input>``. Its effect
646
+ is equivalent to the following:
647
+
648
+ .. code-block:: cmake
649
+
650
+ cmake_path(REMOVE_EXTENSION path)
651
+ if(NOT "input" MATCHES "^\\.")
652
+ cmake_path(APPEND_STRING path ".")
653
+ endif()
654
+ cmake_path(APPEND_STRING path "input")
655
+
656
+
657
+ .. _Path Generation:
658
+
659
+ Generation
660
+ ^^^^^^^^^^
661
+
662
+ .. _NORMAL_PATH:
663
+
664
+ .. code-block:: cmake
665
+
666
+ cmake_path(NORMAL_PATH <path-var> [OUTPUT_VARIABLE <out-var>])
667
+
668
+ Normalize ``<path-var>`` according the steps described in :ref:`Normalization`.
669
+
670
+ .. _cmake_path-RELATIVE_PATH:
671
+ .. _RELATIVE_PATH:
672
+
673
+ .. code-block:: cmake
674
+
675
+ cmake_path(RELATIVE_PATH <path-var> [BASE_DIRECTORY <input>]
676
+ [OUTPUT_VARIABLE <out-var>])
677
+
678
+ Modifies ``<path-var>`` to make it relative to the ``BASE_DIRECTORY`` argument.
679
+ If ``BASE_DIRECTORY`` is not specified, the default base directory will be
680
+ :variable:`CMAKE_CURRENT_SOURCE_DIR`.
681
+
682
+ For reference, the algorithm used to compute the relative path is the same
683
+ as that used by C++
684
+ `std::filesystem::path::lexically_relative
685
+ <https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal>`_.
686
+
687
+ .. _ABSOLUTE_PATH:
688
+
689
+ .. code-block:: cmake
690
+
691
+ cmake_path(ABSOLUTE_PATH <path-var> [BASE_DIRECTORY <input>] [NORMALIZE]
692
+ [OUTPUT_VARIABLE <out-var>])
693
+
694
+ If ``<path-var>`` is a relative path (`IS_RELATIVE`_ is true), it is evaluated
695
+ relative to the given base directory specified by ``BASE_DIRECTORY`` option.
696
+ If ``BASE_DIRECTORY`` is not specified, the default base directory will be
697
+ :variable:`CMAKE_CURRENT_SOURCE_DIR`.
698
+
699
+ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
700
+ <Normalization>` after the path computation.
701
+
702
+ Because ``cmake_path()`` does not access the filesystem, symbolic links are
703
+ not resolved and any leading tilde is not expanded. To compute a real path
704
+ with symbolic links resolved and leading tildes expanded, use the
705
+ :command:`file(REAL_PATH)` command instead.
706
+
707
+ Native Conversion
708
+ ^^^^^^^^^^^^^^^^^
709
+
710
+ For commands in this section, *native* refers to the host platform, not the
711
+ target platform when cross-compiling.
712
+
713
+ .. _cmake_path-NATIVE_PATH:
714
+ .. _NATIVE_PATH:
715
+
716
+ .. code-block:: cmake
717
+
718
+ cmake_path(NATIVE_PATH <path-var> [NORMALIZE] <out-var>)
719
+
720
+ Converts a cmake-style ``<path-var>`` into a native path with
721
+ platform-specific slashes (``\`` on Windows hosts and ``/`` elsewhere).
722
+
723
+ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
724
+ <Normalization>` before the conversion.
725
+
726
+ .. _CONVERT:
727
+ .. _cmake_path-TO_CMAKE_PATH_LIST:
728
+ .. _TO_CMAKE_PATH_LIST:
729
+
730
+ .. code-block:: cmake
731
+
732
+ cmake_path(CONVERT <input> TO_CMAKE_PATH_LIST <out-var> [NORMALIZE])
733
+
734
+ Converts a native ``<input>`` path into a cmake-style path with forward
735
+ slashes (``/``). On Windows hosts, the long filename marker is taken into
736
+ account. The input can be a single path or a system search path like
737
+ ``$ENV{PATH}``. A search path will be converted to a cmake-style list
738
+ separated by ``;`` characters (on non-Windows platforms, this essentially
739
+ means ``:`` separators are replaced with ``;``). The result of the
740
+ conversion is stored in the ``<out-var>`` variable.
741
+
742
+ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
743
+ <Normalization>` before the conversion.
744
+
745
+ .. note::
746
+ Unlike most other ``cmake_path()`` subcommands, the ``CONVERT`` subcommand
747
+ takes a literal string as input, not the name of a variable.
748
+
749
+ .. _cmake_path-TO_NATIVE_PATH_LIST:
750
+ .. _TO_NATIVE_PATH_LIST:
751
+
752
+ .. code-block:: cmake
753
+
754
+ cmake_path(CONVERT <input> TO_NATIVE_PATH_LIST <out-var> [NORMALIZE])
755
+
756
+ Converts a cmake-style ``<input>`` path into a native path with
757
+ platform-specific slashes (``\`` on Windows hosts and ``/`` elsewhere).
758
+ The input can be a single path or a cmake-style list. A list will be
759
+ converted into a native search path (``;``-separated on Windows,
760
+ ``:``-separated on other platforms). The result of the conversion is
761
+ stored in the ``<out-var>`` variable.
762
+
763
+ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
764
+ <Normalization>` before the conversion.
765
+
766
+ .. note::
767
+ Unlike most other ``cmake_path()`` subcommands, the ``CONVERT`` subcommand
768
+ takes a literal string as input, not the name of a variable.
769
+
770
+ For example:
771
+
772
+ .. code-block:: cmake
773
+
774
+ set(paths "/a/b/c" "/x/y/z")
775
+ cmake_path(CONVERT "${paths}" TO_NATIVE_PATH_LIST native_paths)
776
+ message("Native path list is \"${native_paths}\"")
777
+
778
+ Output on Windows::
779
+
780
+ Native path list is "\a\b\c;\x\y\z"
781
+
782
+ Output on all other platforms::
783
+
784
+ Native path list is "/a/b/c:/x/y/z"
785
+
786
+ Hashing
787
+ ^^^^^^^
788
+
789
+ .. _HASH:
790
+
791
+ .. code-block:: cmake
792
+
793
+ cmake_path(HASH <path-var> <out-var>)
794
+
795
+ Compute a hash value of ``<path-var>`` such that for two paths ``p1`` and
796
+ ``p2`` that compare equal (:ref:`COMPARE ... EQUAL <COMPARE>`), the hash
797
+ value of ``p1`` is equal to the hash value of ``p2``. The path is always
798
+ :ref:`normalized <Normalization>` before the hash is computed.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/cmake_policy.rst ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_policy
2
+ ------------
3
+
4
+ Manage CMake Policy settings. See the :manual:`cmake-policies(7)`
5
+ manual for defined policies.
6
+
7
+ As CMake evolves it is sometimes necessary to change existing behavior
8
+ in order to fix bugs or improve implementations of existing features.
9
+ The CMake Policy mechanism is designed to help keep existing projects
10
+ building as new versions of CMake introduce changes in behavior. Each
11
+ new policy (behavioral change) is given an identifier of the form
12
+ ``CMP<NNNN>`` where ``<NNNN>`` is an integer index. Documentation
13
+ associated with each policy describes the ``OLD`` and ``NEW`` behavior
14
+ and the reason the policy was introduced. Projects may set each policy
15
+ to select the desired behavior. When CMake needs to know which behavior
16
+ to use it checks for a setting specified by the project. If no
17
+ setting is available the ``OLD`` behavior is assumed and a warning is
18
+ produced requesting that the policy be set.
19
+
20
+ Setting Policies by CMake Version
21
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22
+
23
+ The ``cmake_policy`` command is used to set policies to ``OLD`` or ``NEW``
24
+ behavior. While setting policies individually is supported, we
25
+ encourage projects to set policies based on CMake versions:
26
+
27
+ .. code-block:: cmake
28
+
29
+ cmake_policy(VERSION <min>[...<max>])
30
+
31
+ .. versionadded:: 3.12
32
+ The optional ``<max>`` version.
33
+
34
+ ``<min>`` and the optional ``<max>`` are each CMake versions of the form
35
+ ``major.minor[.patch[.tweak]]``, and the ``...`` is literal. The ``<min>``
36
+ version must be at least ``2.4`` and at most the running version of CMake.
37
+ The ``<max>`` version, if specified, must be at least the ``<min>`` version
38
+ but may exceed the running version of CMake. If the running version of
39
+ CMake is older than 3.12, the extra ``...`` dots will be seen as version
40
+ component separators, resulting in the ``...<max>`` part being ignored and
41
+ preserving the pre-3.12 behavior of basing policies on ``<min>``.
42
+
43
+ This specifies that the current CMake code is written for the given
44
+ range of CMake versions. All policies known to the running version of CMake
45
+ and introduced in the ``<min>`` (or ``<max>``, if specified) version
46
+ or earlier will be set to use ``NEW`` behavior. All policies
47
+ introduced in later versions will be unset (unless the
48
+ :variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>` variable sets a default).
49
+ This effectively requests behavior preferred as of a given CMake
50
+ version and tells newer CMake versions to warn about their new policies.
51
+
52
+ Note that the :command:`cmake_minimum_required(VERSION)`
53
+ command implicitly calls ``cmake_policy(VERSION)`` too.
54
+
55
+ .. include:: DEPRECATED_POLICY_VERSIONS.txt
56
+
57
+ Setting Policies Explicitly
58
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
+
60
+ .. code-block:: cmake
61
+
62
+ cmake_policy(SET CMP<NNNN> NEW)
63
+ cmake_policy(SET CMP<NNNN> OLD)
64
+
65
+ Tell CMake to use the ``OLD`` or ``NEW`` behavior for a given policy.
66
+ Projects depending on the old behavior of a given policy may silence a
67
+ policy warning by setting the policy state to ``OLD``. Alternatively
68
+ one may fix the project to work with the new behavior and set the
69
+ policy state to ``NEW``.
70
+
71
+ .. include:: ../policy/DEPRECATED.txt
72
+
73
+ Checking Policy Settings
74
+ ^^^^^^^^^^^^^^^^^^^^^^^^
75
+
76
+ .. code-block:: cmake
77
+
78
+ cmake_policy(GET CMP<NNNN> <variable>)
79
+
80
+ Check whether a given policy is set to ``OLD`` or ``NEW`` behavior.
81
+ The output ``<variable>`` value will be ``OLD`` or ``NEW`` if the
82
+ policy is set, and empty otherwise.
83
+
84
+ CMake Policy Stack
85
+ ^^^^^^^^^^^^^^^^^^
86
+
87
+ CMake keeps policy settings on a stack, so changes made by the
88
+ ``cmake_policy`` command affect only the top of the stack. A new entry on
89
+ the policy stack is managed automatically for each subdirectory to
90
+ protect its parents and siblings. CMake also manages a new entry for
91
+ scripts loaded by :command:`include` and :command:`find_package` commands
92
+ except when invoked with the ``NO_POLICY_SCOPE`` option
93
+ (see also policy :policy:`CMP0011`).
94
+ The ``cmake_policy`` command provides an interface to manage custom
95
+ entries on the policy stack:
96
+
97
+ .. code-block:: cmake
98
+
99
+ cmake_policy(PUSH)
100
+ cmake_policy(POP)
101
+
102
+ Each ``PUSH`` must have a matching ``POP`` to erase any changes.
103
+ This is useful to make temporary changes to policy settings.
104
+ Calls to the :command:`cmake_minimum_required(VERSION)`,
105
+ ``cmake_policy(VERSION)``, or ``cmake_policy(SET)`` commands
106
+ influence only the current top of the policy stack.
107
+
108
+ .. versionadded:: 3.25
109
+ The :command:`block` and :command:`endblock` commands offer a more flexible
110
+ and more secure way to manage the policy stack. The pop action is done
111
+ automatically when the :command:`endblock` command is executed, so it avoid
112
+ to call the :command:`cmake_policy(POP)` command before each
113
+ :command:`return` command.
114
+
115
+ .. code-block:: cmake
116
+
117
+ # stack management with cmake_policy()
118
+ function(my_func)
119
+ cmake_policy(PUSH)
120
+ cmake_policy(SET ...)
121
+ if (<cond1>)
122
+ ...
123
+ cmake_policy(POP)
124
+ return()
125
+ elseif(<cond2>)
126
+ ...
127
+ cmake_policy(POP)
128
+ return()
129
+ endif()
130
+ ...
131
+ cmake_policy(POP)
132
+ endfunction()
133
+
134
+ # stack management with block()/endblock()
135
+ function(my_func)
136
+ block(SCOPE_FOR POLICIES)
137
+ cmake_policy(SET ...)
138
+ if (<cond1>)
139
+ ...
140
+ return()
141
+ elseif(<cond2>)
142
+ ...
143
+ return()
144
+ endif()
145
+ ...
146
+ endblock()
147
+ endfunction()
148
+
149
+ Commands created by the :command:`function` and :command:`macro`
150
+ commands record policy settings when they are created and
151
+ use the pre-record policies when they are invoked. If the function or
152
+ macro implementation sets policies, the changes automatically
153
+ propagate up through callers until they reach the closest nested
154
+ policy stack entry.
155
+
156
+ See Also
157
+ ^^^^^^^^
158
+
159
+ * :command:`cmake_minimum_required`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/configure_file.rst ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ configure_file
2
+ --------------
3
+
4
+ Copy a file to another location and modify its contents.
5
+
6
+ .. code-block:: cmake
7
+
8
+ configure_file(<input> <output>
9
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS |
10
+ FILE_PERMISSIONS <permissions>...]
11
+ [COPYONLY] [ESCAPE_QUOTES] [@ONLY]
12
+ [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
13
+
14
+ Copies an ``<input>`` file to an ``<output>`` file and substitutes
15
+ variable values referenced as ``@VAR@``, ``${VAR}``, ``$CACHE{VAR}`` or
16
+ ``$ENV{VAR}`` in the input file content. Each variable reference will be
17
+ replaced with the current value of the variable, or the empty string if
18
+ the variable is not defined. Furthermore, input lines of the form
19
+
20
+ .. code-block:: c
21
+
22
+ #cmakedefine VAR ...
23
+
24
+ will be replaced with either
25
+
26
+ .. code-block:: c
27
+
28
+ #define VAR ...
29
+
30
+ or
31
+
32
+ .. code-block:: c
33
+
34
+ /* #undef VAR */
35
+
36
+ depending on whether ``VAR`` is set in CMake to any value not considered
37
+ a false constant by the :command:`if` command. The "..." content on the
38
+ line after the variable name, if any, is processed as above.
39
+
40
+ Unlike lines of the form ``#cmakedefine VAR ...``, in lines of the form
41
+ ``#cmakedefine01 VAR``, ``VAR`` itself will expand to ``VAR 0`` or ``VAR 1``
42
+ rather than being assigned the value ``...``. Therefore, input lines of the form
43
+
44
+ .. code-block:: c
45
+
46
+ #cmakedefine01 VAR
47
+
48
+ will be replaced with either
49
+
50
+ .. code-block:: c
51
+
52
+ #define VAR 0
53
+
54
+ or
55
+
56
+ .. code-block:: c
57
+
58
+ #define VAR 1
59
+
60
+ Input lines of the form ``#cmakedefine01 VAR ...`` will expand
61
+ as ``#cmakedefine01 VAR ... 0`` or ``#cmakedefine01 VAR ... 1``,
62
+ which may lead to undefined behavior.
63
+
64
+ .. versionadded:: 3.10
65
+ The result lines (with the exception of the ``#undef`` comments) can be
66
+ indented using spaces and/or tabs between the ``#`` character
67
+ and the ``cmakedefine`` or ``cmakedefine01`` words. This whitespace
68
+ indentation will be preserved in the output lines:
69
+
70
+ .. code-block:: c
71
+
72
+ # cmakedefine VAR
73
+ # cmakedefine01 VAR
74
+
75
+ will be replaced, if ``VAR`` is defined, with
76
+
77
+ .. code-block:: c
78
+
79
+ # define VAR
80
+ # define VAR 1
81
+
82
+ If the input file is modified the build system will re-run CMake to
83
+ re-configure the file and generate the build system again.
84
+ The generated file is modified and its timestamp updated on subsequent
85
+ cmake runs only if its content is changed.
86
+
87
+ The arguments are:
88
+
89
+ ``<input>``
90
+ Path to the input file. A relative path is treated with respect to
91
+ the value of :variable:`CMAKE_CURRENT_SOURCE_DIR`. The input path
92
+ must be a file, not a directory.
93
+
94
+ ``<output>``
95
+ Path to the output file or directory. A relative path is treated
96
+ with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
97
+ If the path names an existing directory the output file is placed
98
+ in that directory with the same file name as the input file.
99
+ If the path contains non-existent directories, they are created.
100
+
101
+ ``NO_SOURCE_PERMISSIONS``
102
+ .. versionadded:: 3.19
103
+
104
+ Do not transfer the permissions of the input file to the output file.
105
+ The copied file permissions default to the standard 644 value
106
+ (-rw-r--r--).
107
+
108
+ ``USE_SOURCE_PERMISSIONS``
109
+ .. versionadded:: 3.20
110
+
111
+ Transfer the permissions of the input file to the output file.
112
+ This is already the default behavior if none of the three permissions-related
113
+ keywords are given (``NO_SOURCE_PERMISSIONS``, ``USE_SOURCE_PERMISSIONS``
114
+ or ``FILE_PERMISSIONS``). The ``USE_SOURCE_PERMISSIONS`` keyword mostly
115
+ serves as a way of making the intended behavior clearer at the call site.
116
+
117
+ ``FILE_PERMISSIONS <permissions>...``
118
+ .. versionadded:: 3.20
119
+
120
+ Ignore the input file's permissions and use the specified ``<permissions>``
121
+ for the output file instead.
122
+
123
+ ``COPYONLY``
124
+ Copy the file without replacing any variable references or other
125
+ content. This option may not be used with ``NEWLINE_STYLE``.
126
+
127
+ ``ESCAPE_QUOTES``
128
+ Escape any substituted quotes with backslashes (C-style).
129
+
130
+ ``@ONLY``
131
+ Restrict variable replacement to references of the form ``@VAR@``.
132
+ This is useful for configuring scripts that use ``${VAR}`` syntax.
133
+
134
+ ``NEWLINE_STYLE <style>``
135
+ Specify the newline style for the output file. Specify
136
+ ``UNIX`` or ``LF`` for ``\n`` newlines, or specify
137
+ ``DOS``, ``WIN32``, or ``CRLF`` for ``\r\n`` newlines.
138
+ This option may not be used with ``COPYONLY``.
139
+
140
+ Example
141
+ ^^^^^^^
142
+
143
+ Consider a source tree containing a ``foo.h.in`` file:
144
+
145
+ .. code-block:: c
146
+
147
+ #cmakedefine FOO_ENABLE
148
+ #cmakedefine FOO_STRING "@FOO_STRING@"
149
+
150
+ An adjacent ``CMakeLists.txt`` may use ``configure_file`` to
151
+ configure the header:
152
+
153
+ .. code-block:: cmake
154
+
155
+ option(FOO_ENABLE "Enable Foo" ON)
156
+ if(FOO_ENABLE)
157
+ set(FOO_STRING "foo")
158
+ endif()
159
+ configure_file(foo.h.in foo.h @ONLY)
160
+
161
+ This creates a ``foo.h`` in the build directory corresponding to
162
+ this source directory. If the ``FOO_ENABLE`` option is on, the
163
+ configured file will contain:
164
+
165
+ .. code-block:: c
166
+
167
+ #define FOO_ENABLE
168
+ #define FOO_STRING "foo"
169
+
170
+ Otherwise it will contain:
171
+
172
+ .. code-block:: c
173
+
174
+ /* #undef FOO_ENABLE */
175
+ /* #undef FOO_STRING */
176
+
177
+ One may then use the :command:`target_include_directories` command to
178
+ specify the output directory as an include directory:
179
+
180
+ .. code-block:: cmake
181
+
182
+ target_include_directories(<target> [SYSTEM] <INTERFACE|PUBLIC|PRIVATE> "${CMAKE_CURRENT_BINARY_DIR}")
183
+
184
+ so that sources may include the header as ``#include <foo.h>``.
185
+
186
+ See Also
187
+ ^^^^^^^^
188
+
189
+ * :command:`file(GENERATE)`
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/continue.rst ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ continue
2
+ --------
3
+
4
+ .. versionadded:: 3.2
5
+
6
+ Continue to the top of enclosing foreach or while loop.
7
+
8
+ .. code-block:: cmake
9
+
10
+ continue()
11
+
12
+ The ``continue()`` command allows a cmake script to abort the rest of the
13
+ current iteration of a :command:`foreach` or :command:`while` loop, and start
14
+ at the top of the next iteration.
15
+
16
+ See also the :command:`break` command.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/create_test_sourcelist.rst ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ create_test_sourcelist
2
+ ----------------------
3
+
4
+ Create a test driver and source list for building test programs.
5
+
6
+ .. code-block:: cmake
7
+
8
+ create_test_sourcelist(sourceListName driverName
9
+ test1 test2 test3
10
+ EXTRA_INCLUDE include.h
11
+ FUNCTION function)
12
+
13
+ A test driver is a program that links together many small tests into a
14
+ single executable. This is useful when building static executables
15
+ with large libraries to shrink the total required size. The list of
16
+ source files needed to build the test driver will be in
17
+ ``sourceListName``. ``driverName`` is the name of the test driver program.
18
+ The rest of the arguments consist of a list of test source files, can
19
+ be semicolon separated. Each test source file should have a function
20
+ in it that is the same name as the file with no extension (foo.cxx
21
+ should have int foo(int, char*[]);) ``driverName`` will be able to call
22
+ each of the tests by name on the command line. If ``EXTRA_INCLUDE`` is
23
+ specified, then the next argument is included into the generated file.
24
+ If ``FUNCTION`` is specified, then the next argument is taken as a
25
+ function name that is passed a pointer to ac and av. This can be used
26
+ to add extra command line processing to each test. The
27
+ ``CMAKE_TESTDRIVER_BEFORE_TESTMAIN`` cmake variable can be set to
28
+ have code that will be placed directly before calling the test main function.
29
+ ``CMAKE_TESTDRIVER_AFTER_TESTMAIN`` can be set to have code that
30
+ will be placed directly after the call to the test main function.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_build.rst ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_build
2
+ -----------
3
+
4
+ Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_build([BUILD <build-dir>] [APPEND]
9
+ [CONFIGURATION <config>]
10
+ [PARALLEL_LEVEL <parallel>]
11
+ [FLAGS <flags>]
12
+ [PROJECT_NAME <project-name>]
13
+ [TARGET <target-name>]
14
+ [NUMBER_ERRORS <num-err-var>]
15
+ [NUMBER_WARNINGS <num-warn-var>]
16
+ [RETURN_VALUE <result-var>]
17
+ [CAPTURE_CMAKE_ERROR <result-var>]
18
+ )
19
+
20
+ Build the project and store results in ``Build.xml``
21
+ for submission with the :command:`ctest_submit` command.
22
+
23
+ The :variable:`CTEST_BUILD_COMMAND` variable may be set to explicitly
24
+ specify the build command line. Otherwise the build command line is
25
+ computed automatically based on the options given.
26
+
27
+ The options are:
28
+
29
+ ``BUILD <build-dir>``
30
+ Specify the top-level build directory. If not given, the
31
+ :variable:`CTEST_BINARY_DIRECTORY` variable is used.
32
+
33
+ ``APPEND``
34
+ Mark ``Build.xml`` for append to results previously submitted to a
35
+ dashboard server since the last :command:`ctest_start` call.
36
+ Append semantics are defined by the dashboard server in use.
37
+ This does *not* cause results to be appended to a ``.xml`` file
38
+ produced by a previous call to this command.
39
+
40
+ ``CONFIGURATION <config>``
41
+ Specify the build configuration (e.g. ``Debug``). If not
42
+ specified the ``CTEST_BUILD_CONFIGURATION`` variable will be checked.
43
+ Otherwise the :option:`-C \<cfg\> <ctest -C>` option given to the
44
+ :manual:`ctest(1)` command will be used, if any.
45
+
46
+ ``PARALLEL_LEVEL <parallel>``
47
+ .. versionadded:: 3.21
48
+
49
+ Specify the parallel level of the underlying build system. If not
50
+ specified, the :envvar:`CMAKE_BUILD_PARALLEL_LEVEL` environment
51
+ variable will be checked.
52
+
53
+ ``FLAGS <flags>``
54
+ Pass additional arguments to the underlying build command.
55
+ If not specified the ``CTEST_BUILD_FLAGS`` variable will be checked.
56
+ This can, e.g., be used to trigger a parallel build using the
57
+ ``-j`` option of ``make``. See the :module:`ProcessorCount` module
58
+ for an example.
59
+
60
+ ``PROJECT_NAME <project-name>``
61
+ Ignored since CMake 3.0.
62
+
63
+ .. versionchanged:: 3.14
64
+ This value is no longer required.
65
+
66
+ ``TARGET <target-name>``
67
+ Specify the name of a target to build. If not specified the
68
+ ``CTEST_BUILD_TARGET`` variable will be checked. Otherwise the
69
+ default target will be built. This is the "all" target
70
+ (called ``ALL_BUILD`` in :ref:`Visual Studio Generators`).
71
+
72
+ ``NUMBER_ERRORS <num-err-var>``
73
+ Store the number of build errors detected in the given variable.
74
+
75
+ ``NUMBER_WARNINGS <num-warn-var>``
76
+ Store the number of build warnings detected in the given variable.
77
+
78
+ ``RETURN_VALUE <result-var>``
79
+ Store the return value of the native build tool in the given variable.
80
+
81
+ ``CAPTURE_CMAKE_ERROR <result-var>``
82
+ .. versionadded:: 3.7
83
+
84
+ Store in the ``<result-var>`` variable -1 if there are any errors running
85
+ the command and prevent ctest from returning non-zero if an error occurs.
86
+
87
+ ``QUIET``
88
+ .. versionadded:: 3.3
89
+
90
+ Suppress any CTest-specific non-error output that would have been
91
+ printed to the console otherwise. The summary of warnings / errors,
92
+ as well as the output from the native build tool is unaffected by
93
+ this option.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_configure.rst ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_configure
2
+ ---------------
3
+
4
+ Perform the :ref:`CTest Configure Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_configure([BUILD <build-dir>] [SOURCE <source-dir>] [APPEND]
9
+ [OPTIONS <options>] [RETURN_VALUE <result-var>] [QUIET]
10
+ [CAPTURE_CMAKE_ERROR <result-var>])
11
+
12
+ Configure the project build tree and record results in ``Configure.xml``
13
+ for submission with the :command:`ctest_submit` command.
14
+
15
+ The options are:
16
+
17
+ ``BUILD <build-dir>``
18
+ Specify the top-level build directory. If not given, the
19
+ :variable:`CTEST_BINARY_DIRECTORY` variable is used.
20
+
21
+ ``SOURCE <source-dir>``
22
+ Specify the source directory. If not given, the
23
+ :variable:`CTEST_SOURCE_DIRECTORY` variable is used.
24
+
25
+ ``APPEND``
26
+ Mark ``Configure.xml`` for append to results previously submitted to a
27
+ dashboard server since the last :command:`ctest_start` call.
28
+ Append semantics are defined by the dashboard server in use.
29
+ This does *not* cause results to be appended to a ``.xml`` file
30
+ produced by a previous call to this command.
31
+
32
+ ``OPTIONS <options>``
33
+ Specify command-line arguments to pass to the configuration tool.
34
+
35
+ ``RETURN_VALUE <result-var>``
36
+ Store in the ``<result-var>`` variable the return value of the native
37
+ configuration tool.
38
+
39
+ ``CAPTURE_CMAKE_ERROR <result-var>``
40
+ .. versionadded:: 3.7
41
+
42
+ Store in the ``<result-var>`` variable -1 if there are any errors running
43
+ the command and prevent ctest from returning non-zero if an error occurs.
44
+
45
+ ``QUIET``
46
+ .. versionadded:: 3.3
47
+
48
+ Suppress any CTest-specific non-error messages that would have
49
+ otherwise been printed to the console. Output from the underlying
50
+ configure command is not affected.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_coverage.rst ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_coverage
2
+ --------------
3
+
4
+ Perform the :ref:`CTest Coverage Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_coverage([BUILD <build-dir>] [APPEND]
9
+ [LABELS <label>...]
10
+ [RETURN_VALUE <result-var>]
11
+ [CAPTURE_CMAKE_ERROR <result-var>]
12
+ [QUIET]
13
+ )
14
+
15
+ Collect coverage tool results and stores them in ``Coverage.xml``
16
+ for submission with the :command:`ctest_submit` command.
17
+
18
+ The options are:
19
+
20
+ ``BUILD <build-dir>``
21
+ Specify the top-level build directory. If not given, the
22
+ :variable:`CTEST_BINARY_DIRECTORY` variable is used.
23
+
24
+ ``APPEND``
25
+ Mark ``Coverage.xml`` for append to results previously submitted to a
26
+ dashboard server since the last :command:`ctest_start` call.
27
+ Append semantics are defined by the dashboard server in use.
28
+ This does *not* cause results to be appended to a ``.xml`` file
29
+ produced by a previous call to this command.
30
+
31
+ ``LABELS``
32
+ Filter the coverage report to include only source files labeled
33
+ with at least one of the labels specified.
34
+
35
+ ``RETURN_VALUE <result-var>``
36
+ Store in the ``<result-var>`` variable ``0`` if coverage tools
37
+ ran without error and non-zero otherwise.
38
+
39
+ ``CAPTURE_CMAKE_ERROR <result-var>``
40
+ .. versionadded:: 3.7
41
+
42
+ Store in the ``<result-var>`` variable -1 if there are any errors running
43
+ the command and prevent ctest from returning non-zero if an error occurs.
44
+
45
+ ``QUIET``
46
+ .. versionadded:: 3.3
47
+
48
+ Suppress any CTest-specific non-error output that would have been
49
+ printed to the console otherwise. The summary indicating how many
50
+ lines of code were covered is unaffected by this option.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_empty_binary_directory.rst ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_empty_binary_directory
2
+ ----------------------------
3
+
4
+ empties the binary directory
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_empty_binary_directory(<directory>)
9
+
10
+ Removes a binary directory. This command will perform some checks
11
+ prior to deleting the directory in an attempt to avoid malicious or
12
+ accidental directory deletion.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_memcheck.rst ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_memcheck
2
+ --------------
3
+
4
+ Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_memcheck([BUILD <build-dir>] [APPEND]
9
+ [START <start-number>]
10
+ [END <end-number>]
11
+ [STRIDE <stride-number>]
12
+ [EXCLUDE <exclude-regex>]
13
+ [INCLUDE <include-regex>]
14
+ [EXCLUDE_LABEL <label-exclude-regex>]
15
+ [INCLUDE_LABEL <label-include-regex>]
16
+ [EXCLUDE_FIXTURE <regex>]
17
+ [EXCLUDE_FIXTURE_SETUP <regex>]
18
+ [EXCLUDE_FIXTURE_CLEANUP <regex>]
19
+ [PARALLEL_LEVEL <level>]
20
+ [RESOURCE_SPEC_FILE <file>]
21
+ [TEST_LOAD <threshold>]
22
+ [SCHEDULE_RANDOM <ON|OFF>]
23
+ [STOP_ON_FAILURE]
24
+ [STOP_TIME <time-of-day>]
25
+ [RETURN_VALUE <result-var>]
26
+ [CAPTURE_CMAKE_ERROR <result-var>]
27
+ [REPEAT <mode>:<n>]
28
+ [OUTPUT_JUNIT <file>]
29
+ [DEFECT_COUNT <defect-count-var>]
30
+ [QUIET]
31
+ )
32
+
33
+
34
+ Run tests with a dynamic analysis tool and store results in
35
+ ``MemCheck.xml`` for submission with the :command:`ctest_submit`
36
+ command.
37
+
38
+ Most options are the same as those for the :command:`ctest_test` command.
39
+
40
+ The options unique to this command are:
41
+
42
+ ``DEFECT_COUNT <defect-count-var>``
43
+ .. versionadded:: 3.8
44
+
45
+ Store in the ``<defect-count-var>`` the number of defects found.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_read_custom_files.rst ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_read_custom_files
2
+ -----------------------
3
+
4
+ read CTestCustom files.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_read_custom_files(<directory>...)
9
+
10
+ Read all the CTestCustom.ctest or CTestCustom.cmake files from the
11
+ given directory.
12
+
13
+ By default, invoking :manual:`ctest(1)` without a script will read custom
14
+ files from the binary directory.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_run_script.rst ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_run_script
2
+ ----------------
3
+
4
+ runs a :option:`ctest -S` script
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_run_script([NEW_PROCESS] script_file_name script_file_name1
9
+ script_file_name2 ... [RETURN_VALUE var])
10
+
11
+ Runs a script or scripts much like if it was run from :option:`ctest -S`.
12
+ If no argument is provided then the current script is run using the current
13
+ settings of the variables. If ``NEW_PROCESS`` is specified then each
14
+ script will be run in a separate process.If ``RETURN_VALUE`` is specified
15
+ the return value of the last script run will be put into ``var``.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_sleep.rst ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_sleep
2
+ -----------
3
+
4
+ sleeps for some amount of time
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_sleep(<seconds>)
9
+
10
+ Sleep for given number of seconds.
11
+
12
+ .. code-block:: cmake
13
+
14
+ ctest_sleep(<time1> <duration> <time2>)
15
+
16
+ Sleep for t=(time1 + duration - time2) seconds if t > 0.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_start.rst ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_start
2
+ -----------
3
+
4
+ Starts the testing for a given model
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_start(<model> [<source> [<binary>]] [GROUP <group>] [QUIET])
9
+
10
+ ctest_start([<model> [<source> [<binary>]]] [GROUP <group>] APPEND [QUIET])
11
+
12
+ Starts the testing for a given model. The command should be called
13
+ after the binary directory is initialized.
14
+
15
+ The parameters are as follows:
16
+
17
+ ``<model>``
18
+ Set the dashboard model. Must be one of ``Experimental``, ``Continuous``, or
19
+ ``Nightly``. This parameter is required unless ``APPEND`` is specified.
20
+
21
+ ``<source>``
22
+ Set the source directory. If not specified, the value of
23
+ :variable:`CTEST_SOURCE_DIRECTORY` is used instead.
24
+
25
+ ``<binary>``
26
+ Set the binary directory. If not specified, the value of
27
+ :variable:`CTEST_BINARY_DIRECTORY` is used instead.
28
+
29
+ ``GROUP <group>``
30
+ If ``GROUP`` is used, the submissions will go to the specified group on the
31
+ CDash server. If no ``GROUP`` is specified, the name of the model is used by
32
+ default.
33
+
34
+ .. versionchanged:: 3.16
35
+ This replaces the deprecated option ``TRACK``. Despite the name
36
+ change its behavior is unchanged.
37
+
38
+ ``APPEND``
39
+ If ``APPEND`` is used, the existing ``TAG`` is used rather than creating a new
40
+ one based on the current time stamp. If you use ``APPEND``, you can omit the
41
+ ``<model>`` and ``GROUP <group>`` parameters, because they will be read from
42
+ the generated ``TAG`` file. For example:
43
+
44
+ .. code-block:: cmake
45
+
46
+ ctest_start(Experimental GROUP GroupExperimental)
47
+
48
+ Later, in another :option:`ctest -S` script:
49
+
50
+ .. code-block:: cmake
51
+
52
+ ctest_start(APPEND)
53
+
54
+ When the second script runs ``ctest_start(APPEND)``, it will read the
55
+ ``Experimental`` model and ``GroupExperimental`` group from the ``TAG`` file
56
+ generated by the first ``ctest_start()`` command. Please note that if you
57
+ call ``ctest_start(APPEND)`` and specify a different model or group than
58
+ in the first ``ctest_start()`` command, a warning will be issued, and the
59
+ new model and group will be used.
60
+
61
+ ``QUIET``
62
+ .. versionadded:: 3.3
63
+
64
+ If ``QUIET`` is used, CTest will suppress any non-error messages that it
65
+ otherwise would have printed to the console.
66
+
67
+ The parameters for ``ctest_start()`` can be issued in any order, with the
68
+ exception that ``<model>``, ``<source>``, and ``<binary>`` have to appear
69
+ in that order with respect to each other. The following are all valid and
70
+ equivalent:
71
+
72
+ .. code-block:: cmake
73
+
74
+ ctest_start(Experimental path/to/source path/to/binary GROUP SomeGroup QUIET APPEND)
75
+
76
+ ctest_start(GROUP SomeGroup Experimental QUIET path/to/source APPEND path/to/binary)
77
+
78
+ ctest_start(APPEND QUIET Experimental path/to/source GROUP SomeGroup path/to/binary)
79
+
80
+ However, for the sake of readability, it is recommended that you order your
81
+ parameters in the order listed at the top of this page.
82
+
83
+ If the :variable:`CTEST_CHECKOUT_COMMAND` variable (or the
84
+ :variable:`CTEST_CVS_CHECKOUT` variable) is set, its content is treated as
85
+ command-line. The command is invoked with the current working directory set
86
+ to the parent of the source directory, even if the source directory already
87
+ exists. This can be used to create the source tree from a version control
88
+ repository.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_submit.rst ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_submit
2
+ ------------
3
+
4
+ Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_submit([PARTS <part>...] [FILES <file>...]
9
+ [SUBMIT_URL <url>]
10
+ [BUILD_ID <result-var>]
11
+ [HTTPHEADER <header>]
12
+ [RETRY_COUNT <count>]
13
+ [RETRY_DELAY <delay>]
14
+ [RETURN_VALUE <result-var>]
15
+ [CAPTURE_CMAKE_ERROR <result-var>]
16
+ [QUIET]
17
+ )
18
+
19
+ Submit results to a dashboard server.
20
+ By default all available parts are submitted.
21
+
22
+ The options are:
23
+
24
+ ``PARTS <part>...``
25
+ Specify a subset of parts to submit. Valid part names are::
26
+
27
+ Start = nothing
28
+ Update = ctest_update results, in Update.xml
29
+ Configure = ctest_configure results, in Configure.xml
30
+ Build = ctest_build results, in Build.xml
31
+ Test = ctest_test results, in Test.xml
32
+ Coverage = ctest_coverage results, in Coverage.xml
33
+ MemCheck = ctest_memcheck results, in DynamicAnalysis.xml and
34
+ DynamicAnalysis-Test.xml
35
+ Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml
36
+ ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES
37
+ Upload = Files prepared for upload by ctest_upload(), in Upload.xml
38
+ Submit = nothing
39
+ Done = Build is complete, in Done.xml
40
+
41
+ ``FILES <file>...``
42
+ Specify an explicit list of specific files to be submitted.
43
+ Each individual file must exist at the time of the call.
44
+
45
+ ``SUBMIT_URL <url>``
46
+ .. versionadded:: 3.14
47
+
48
+ The ``http`` or ``https`` URL of the dashboard server to send the submission
49
+ to. If not given, the :variable:`CTEST_SUBMIT_URL` variable is used.
50
+
51
+ ``BUILD_ID <result-var>``
52
+ .. versionadded:: 3.15
53
+
54
+ Store in the ``<result-var>`` variable the ID assigned to this build by
55
+ CDash.
56
+
57
+ ``HTTPHEADER <HTTP-header>``
58
+ .. versionadded:: 3.9
59
+
60
+ Specify HTTP header to be included in the request to CDash during submission.
61
+ For example, CDash can be configured to only accept submissions from
62
+ authenticated clients. In this case, you should provide a bearer token in your
63
+ header:
64
+
65
+ .. code-block:: cmake
66
+
67
+ ctest_submit(HTTPHEADER "Authorization: Bearer <auth-token>")
68
+
69
+ This suboption can be repeated several times for multiple headers.
70
+
71
+ ``RETRY_COUNT <count>``
72
+ Specify how many times to retry a timed-out submission.
73
+
74
+ ``RETRY_DELAY <delay>``
75
+ Specify how long (in seconds) to wait after a timed-out submission
76
+ before attempting to re-submit.
77
+
78
+ ``RETURN_VALUE <result-var>``
79
+ Store in the ``<result-var>`` variable ``0`` for success and
80
+ non-zero on failure.
81
+
82
+ ``CAPTURE_CMAKE_ERROR <result-var>``
83
+ .. versionadded:: 3.13
84
+
85
+ Store in the ``<result-var>`` variable -1 if there are any errors running
86
+ the command and prevent ctest from returning non-zero if an error occurs.
87
+
88
+ ``QUIET``
89
+ .. versionadded:: 3.3
90
+
91
+ Suppress all non-error messages that would have otherwise been
92
+ printed to the console.
93
+
94
+ Submit to CDash Upload API
95
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
96
+
97
+ .. versionadded:: 3.2
98
+
99
+ .. code-block:: cmake
100
+
101
+ ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
102
+ [SUBMIT_URL <url>]
103
+ [BUILD_ID <result-var>]
104
+ [HTTPHEADER <header>]
105
+ [RETRY_COUNT <count>]
106
+ [RETRY_DELAY <delay>]
107
+ [RETURN_VALUE <result-var>]
108
+ [QUIET])
109
+
110
+ This second signature is used to upload files to CDash via the CDash
111
+ file upload API. The API first sends a request to upload to CDash along
112
+ with a content hash of the file. If CDash does not already have the file,
113
+ then it is uploaded. Along with the file, a CDash type string is specified
114
+ to tell CDash which handler to use to process the data.
115
+
116
+ This signature interprets options in the same way as the first one.
117
+
118
+ .. versionadded:: 3.8
119
+ Added the ``RETRY_COUNT``, ``RETRY_DELAY``, ``QUIET`` options.
120
+
121
+ .. versionadded:: 3.9
122
+ Added the ``HTTPHEADER`` option.
123
+
124
+ .. versionadded:: 3.13
125
+ Added the ``RETURN_VALUE`` option.
126
+
127
+ .. versionadded:: 3.14
128
+ Added the ``SUBMIT_URL`` option.
129
+
130
+ .. versionadded:: 3.15
131
+ Added the ``BUILD_ID`` option.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_test.rst ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_test
2
+ ----------
3
+
4
+ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_test([BUILD <build-dir>] [APPEND]
9
+ [START <start-number>]
10
+ [END <end-number>]
11
+ [STRIDE <stride-number>]
12
+ [EXCLUDE <exclude-regex>]
13
+ [INCLUDE <include-regex>]
14
+ [EXCLUDE_LABEL <label-exclude-regex>]
15
+ [INCLUDE_LABEL <label-include-regex>]
16
+ [EXCLUDE_FIXTURE <regex>]
17
+ [EXCLUDE_FIXTURE_SETUP <regex>]
18
+ [EXCLUDE_FIXTURE_CLEANUP <regex>]
19
+ [PARALLEL_LEVEL <level>]
20
+ [RESOURCE_SPEC_FILE <file>]
21
+ [TEST_LOAD <threshold>]
22
+ [SCHEDULE_RANDOM <ON|OFF>]
23
+ [STOP_ON_FAILURE]
24
+ [STOP_TIME <time-of-day>]
25
+ [RETURN_VALUE <result-var>]
26
+ [CAPTURE_CMAKE_ERROR <result-var>]
27
+ [REPEAT <mode>:<n>]
28
+ [OUTPUT_JUNIT <file>]
29
+ [QUIET]
30
+ )
31
+
32
+ ..
33
+ NOTE If updating the argument list here, please also update the argument
34
+ list documentation for :command:`ctest_memcheck` as well.
35
+
36
+ Run tests in the project build tree and store results in
37
+ ``Test.xml`` for submission with the :command:`ctest_submit` command.
38
+
39
+ The options are:
40
+
41
+ ``BUILD <build-dir>``
42
+ Specify the top-level build directory. If not given, the
43
+ :variable:`CTEST_BINARY_DIRECTORY` variable is used.
44
+
45
+ ``APPEND``
46
+ Mark ``Test.xml`` for append to results previously submitted to a
47
+ dashboard server since the last :command:`ctest_start` call.
48
+ Append semantics are defined by the dashboard server in use.
49
+ This does *not* cause results to be appended to a ``.xml`` file
50
+ produced by a previous call to this command.
51
+
52
+ ``START <start-number>``
53
+ Specify the beginning of a range of test numbers.
54
+
55
+ ``END <end-number>``
56
+ Specify the end of a range of test numbers.
57
+
58
+ ``STRIDE <stride-number>``
59
+ Specify the stride by which to step across a range of test numbers.
60
+
61
+ ``EXCLUDE <exclude-regex>``
62
+ Specify a regular expression matching test names to exclude.
63
+
64
+ ``INCLUDE <include-regex>``
65
+ Specify a regular expression matching test names to include.
66
+ Tests not matching this expression are excluded.
67
+
68
+ ``EXCLUDE_LABEL <label-exclude-regex>``
69
+ Specify a regular expression matching test labels to exclude.
70
+
71
+ ``INCLUDE_LABEL <label-include-regex>``
72
+ Specify a regular expression matching test labels to include.
73
+ Tests not matching this expression are excluded.
74
+
75
+ ``EXCLUDE_FIXTURE <regex>``
76
+ .. versionadded:: 3.7
77
+
78
+ If a test in the set of tests to be executed requires a particular fixture,
79
+ that fixture's setup and cleanup tests would normally be added to the test
80
+ set automatically. This option prevents adding setup or cleanup tests for
81
+ fixtures matching the ``<regex>``. Note that all other fixture behavior is
82
+ retained, including test dependencies and skipping tests that have fixture
83
+ setup tests that fail.
84
+
85
+ ``EXCLUDE_FIXTURE_SETUP <regex>``
86
+ .. versionadded:: 3.7
87
+
88
+ Same as ``EXCLUDE_FIXTURE`` except only matching setup tests are excluded.
89
+
90
+ ``EXCLUDE_FIXTURE_CLEANUP <regex>``
91
+ .. versionadded:: 3.7
92
+
93
+ Same as ``EXCLUDE_FIXTURE`` except only matching cleanup tests are excluded.
94
+
95
+ ``PARALLEL_LEVEL <level>``
96
+ Specify a positive number representing the number of tests to
97
+ be run in parallel.
98
+
99
+ ``RESOURCE_SPEC_FILE <file>``
100
+ .. versionadded:: 3.16
101
+
102
+ Specify a
103
+ :ref:`resource specification file <ctest-resource-specification-file>`. See
104
+ :ref:`ctest-resource-allocation` for more information.
105
+
106
+ ``TEST_LOAD <threshold>``
107
+ .. versionadded:: 3.4
108
+
109
+ While running tests in parallel, try not to start tests when they
110
+ may cause the CPU load to pass above a given threshold. If not
111
+ specified the :variable:`CTEST_TEST_LOAD` variable will be checked,
112
+ and then the :option:`--test-load <ctest --test-load>` command-line
113
+ argument to :manual:`ctest(1)`. See also the ``TestLoad`` setting
114
+ in the :ref:`CTest Test Step`.
115
+
116
+ ``REPEAT <mode>:<n>``
117
+ .. versionadded:: 3.17
118
+
119
+ Run tests repeatedly based on the given ``<mode>`` up to ``<n>`` times.
120
+ The modes are:
121
+
122
+ ``UNTIL_FAIL``
123
+ Require each test to run ``<n>`` times without failing in order to pass.
124
+ This is useful in finding sporadic failures in test cases.
125
+
126
+ ``UNTIL_PASS``
127
+ Allow each test to run up to ``<n>`` times in order to pass.
128
+ Repeats tests if they fail for any reason.
129
+ This is useful in tolerating sporadic failures in test cases.
130
+
131
+ ``AFTER_TIMEOUT``
132
+ Allow each test to run up to ``<n>`` times in order to pass.
133
+ Repeats tests only if they timeout.
134
+ This is useful in tolerating sporadic timeouts in test cases
135
+ on busy machines.
136
+
137
+ ``SCHEDULE_RANDOM <ON|OFF>``
138
+ Launch tests in a random order. This may be useful for detecting
139
+ implicit test dependencies.
140
+
141
+ ``STOP_ON_FAILURE``
142
+ .. versionadded:: 3.18
143
+
144
+ Stop the execution of the tests once one has failed.
145
+
146
+ ``STOP_TIME <time-of-day>``
147
+ Specify a time of day at which the tests should all stop running.
148
+
149
+ ``RETURN_VALUE <result-var>``
150
+ Store in the ``<result-var>`` variable ``0`` if all tests passed.
151
+ Store non-zero if anything went wrong.
152
+
153
+ ``CAPTURE_CMAKE_ERROR <result-var>``
154
+ .. versionadded:: 3.7
155
+
156
+ Store in the ``<result-var>`` variable -1 if there are any errors running
157
+ the command and prevent ctest from returning non-zero if an error occurs.
158
+
159
+ ``OUTPUT_JUNIT <file>``
160
+ .. versionadded:: 3.21
161
+
162
+ Write test results to ``<file>`` in JUnit XML format. If ``<file>`` is a
163
+ relative path, it will be placed in the build directory. If ``<file>``
164
+ already exists, it will be overwritten. Note that the resulting JUnit XML
165
+ file is **not** uploaded to CDash because it would be redundant with
166
+ CTest's ``Test.xml`` file.
167
+
168
+ ``QUIET``
169
+ .. versionadded:: 3.3
170
+
171
+ Suppress any CTest-specific non-error messages that would have otherwise
172
+ been printed to the console. Output from the underlying test command is not
173
+ affected. Summary info detailing the percentage of passing tests is also
174
+ unaffected by the ``QUIET`` option.
175
+
176
+ See also the :variable:`CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE`,
177
+ :variable:`CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE` and
178
+ :variable:`CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variables, along with their
179
+ corresponding :manual:`ctest(1)` command line options
180
+ :option:`--test-output-size-passed <ctest --test-output-size-passed>`,
181
+ :option:`--test-output-size-failed <ctest --test-output-size-failed>`, and
182
+ :option:`--test-output-truncation <ctest --test-output-truncation>`.
183
+
184
+ .. _`Additional Test Measurements`:
185
+
186
+ Additional Test Measurements
187
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188
+
189
+ CTest can parse the output of your tests for extra measurements to report
190
+ to CDash.
191
+
192
+ When run as a :ref:`Dashboard Client`, CTest will include these custom
193
+ measurements in the ``Test.xml`` file that gets uploaded to CDash.
194
+
195
+ Check the `CDash test measurement documentation
196
+ <https://github.com/Kitware/CDash/blob/master/docs/test_measurements.md>`_
197
+ for more information on the types of test measurements that CDash recognizes.
198
+
199
+ .. versionadded: 3.22
200
+ CTest can parse custom measurements from tags named
201
+ ``<CTestMeasurement>`` or ``<CTestMeasurementFile>``. The older names
202
+ ``<DartMeasurement>`` and ``<DartMeasurementFile>`` are still supported.
203
+
204
+ The following example demonstrates how to output a variety of custom test
205
+ measurements.
206
+
207
+ .. code-block:: c++
208
+
209
+ std::cout <<
210
+ "<CTestMeasurement type=\"numeric/double\" name=\"score\">28.3</CTestMeasurement>"
211
+ << std::endl;
212
+
213
+ std::cout <<
214
+ "<CTestMeasurement type=\"text/string\" name=\"color\">red</CTestMeasurement>"
215
+ << std::endl;
216
+
217
+ std::cout <<
218
+ "<CTestMeasurement type=\"text/link\" name=\"CMake URL\">https://cmake.org</CTestMeasurement>"
219
+ << std::endl;
220
+
221
+ std::cout <<
222
+ "<CTestMeasurement type=\"text/preformatted\" name=\"Console Output\">" <<
223
+ "line 1.\n" <<
224
+ " \033[31;1m line 2. Bold red, and indented!\033[0;0ml\n" <<
225
+ "line 3. Not bold or indented...\n" <<
226
+ "</CTestMeasurement>" << std::endl;
227
+
228
+ Image Measurements
229
+ """"""""""""""""""
230
+
231
+ The following example demonstrates how to upload test images to CDash.
232
+
233
+ .. code-block:: c++
234
+
235
+ std::cout <<
236
+ "<CTestMeasurementFile type=\"image/jpg\" name=\"TestImage\">" <<
237
+ "/dir/to/test_img.jpg</CTestMeasurementFile>" << std::endl;
238
+
239
+ std::cout <<
240
+ "<CTestMeasurementFile type=\"image/gif\" name=\"ValidImage\">" <<
241
+ "/dir/to/valid_img.gif</CTestMeasurementFile>" << std::endl;
242
+
243
+ std::cout <<
244
+ "<CTestMeasurementFile type=\"image/png\" name=\"AlgoResult\">" <<
245
+ "/dir/to/img.png</CTestMeasurementFile>"
246
+ << std::endl;
247
+
248
+ Images will be displayed together in an interactive comparison mode on CDash
249
+ if they are provided with two or more of the following names.
250
+
251
+ * ``TestImage``
252
+ * ``ValidImage``
253
+ * ``BaselineImage``
254
+ * ``DifferenceImage2``
255
+
256
+ By convention, ``TestImage`` is the image generated by your test, and
257
+ ``ValidImage`` (or ``BaselineImage``) is basis of comparison used to determine
258
+ if the test passed or failed.
259
+
260
+ If another image name is used it will be displayed by CDash as a static image
261
+ separate from the interactive comparison UI.
262
+
263
+ Attached Files
264
+ """"""""""""""
265
+
266
+ .. versionadded:: 3.21
267
+
268
+ The following example demonstrates how to upload non-image files to CDash.
269
+
270
+ .. code-block:: c++
271
+
272
+ std::cout <<
273
+ "<CTestMeasurementFile type=\"file\" name=\"TestInputData1\">" <<
274
+ "/dir/to/data1.csv</CTestMeasurementFile>\n" <<
275
+ "<CTestMeasurementFile type=\"file\" name=\"TestInputData2\">" <<
276
+ "/dir/to/data2.csv</CTestMeasurementFile>" << std::endl;
277
+
278
+ If the name of the file to upload is known at configure time, you can use the
279
+ :prop_test:`ATTACHED_FILES` or :prop_test:`ATTACHED_FILES_ON_FAIL` test
280
+ properties instead.
281
+
282
+ Custom Details
283
+ """"""""""""""
284
+
285
+ .. versionadded:: 3.21
286
+
287
+ The following example demonstrates how to specify a custom value for the
288
+ ``Test Details`` field displayed on CDash.
289
+
290
+ .. code-block:: c++
291
+
292
+ std::cout <<
293
+ "<CTestDetails>My Custom Details Value</CTestDetails>" << std::endl;
294
+
295
+ .. _`Additional Labels`:
296
+
297
+ Additional Labels
298
+ """""""""""""""""
299
+
300
+ .. versionadded:: 3.22
301
+
302
+ The following example demonstrates how to add additional labels to a test
303
+ at runtime.
304
+
305
+ .. code-block:: c++
306
+
307
+ std::cout <<
308
+ "<CTestLabel>Custom Label 1</CTestLabel>\n" <<
309
+ "<CTestLabel>Custom Label 2</CTestLabel>" << std::endl;
310
+
311
+ Use the :prop_test:`LABELS` test property instead for labels that can be
312
+ determined at configure time.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_update.rst ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_update
2
+ ------------
3
+
4
+ Perform the :ref:`CTest Update Step` as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_update([SOURCE <source-dir>]
9
+ [RETURN_VALUE <result-var>]
10
+ [CAPTURE_CMAKE_ERROR <result-var>]
11
+ [QUIET])
12
+
13
+ Update the source tree from version control and record results in
14
+ ``Update.xml`` for submission with the :command:`ctest_submit` command.
15
+
16
+ The options are:
17
+
18
+ ``SOURCE <source-dir>``
19
+ Specify the source directory. If not given, the
20
+ :variable:`CTEST_SOURCE_DIRECTORY` variable is used.
21
+
22
+ ``RETURN_VALUE <result-var>``
23
+ Store in the ``<result-var>`` variable the number of files
24
+ updated or ``-1`` on error.
25
+
26
+ ``CAPTURE_CMAKE_ERROR <result-var>``
27
+ .. versionadded:: 3.13
28
+
29
+ Store in the ``<result-var>`` variable -1 if there are any errors running
30
+ the command and prevent ctest from returning non-zero if an error occurs.
31
+
32
+ ``QUIET``
33
+ .. versionadded:: 3.3
34
+
35
+ Tell CTest to suppress most non-error messages that it would
36
+ have otherwise printed to the console. CTest will still report
37
+ the new revision of the repository and any conflicting files
38
+ that were found.
39
+
40
+ The update always follows the version control branch currently checked
41
+ out in the source directory. See the :ref:`CTest Update Step`
42
+ documentation for information about variables that change the behavior
43
+ of ``ctest_update()``.
toolchain/cmake-3.27.9-linux-x86_64/share/cmake-3.27/Help/command/ctest_upload.rst ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ctest_upload
2
+ ------------
3
+
4
+ Upload files to a dashboard server as a :ref:`Dashboard Client`.
5
+
6
+ .. code-block:: cmake
7
+
8
+ ctest_upload(FILES <file>... [QUIET] [CAPTURE_CMAKE_ERROR <result-var>])
9
+
10
+ The options are:
11
+
12
+ ``FILES <file>...``
13
+ Specify a list of files to be sent along with the build results to the
14
+ dashboard server.
15
+
16
+ ``QUIET``
17
+ .. versionadded:: 3.3
18
+
19
+ Suppress any CTest-specific non-error output that would have been
20
+ printed to the console otherwise.
21
+
22
+ ``CAPTURE_CMAKE_ERROR <result-var>``
23
+ .. versionadded:: 3.7
24
+
25
+ Store in the ``<result-var>`` variable -1 if there are any errors running
26
+ the command and prevent ctest from returning non-zero if an error occurs.