ZTWHHH commited on
Commit
2fea3bb
·
verified ·
1 Parent(s): 1f8009f

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. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/FIND_XXX.txt +253 -0
  2. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/FIND_XXX_ORDER.txt +12 -0
  3. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/SUPPORTED_LANGUAGES.txt +25 -0
  4. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_compile_definitions.rst +33 -0
  5. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_custom_command.rst +699 -0
  6. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_definitions.rst +38 -0
  7. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_executable.rst +123 -0
  8. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_link_options.rst +44 -0
  9. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/aux_source_directory.rst +24 -0
  10. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/break.rst +12 -0
  11. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/build_command.rst +51 -0
  12. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/build_name.rst +15 -0
  13. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/cmake_file_api.rst +78 -0
  14. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/cmake_host_system_information.rst +403 -0
  15. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/cmake_path.rst +798 -0
  16. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/configure_file.rst +203 -0
  17. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/ctest_build.rst +93 -0
  18. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/ctest_configure.rst +50 -0
  19. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/ctest_coverage.rst +50 -0
  20. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/ctest_memcheck.rst +45 -0
  21. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/ctest_read_custom_files.rst +14 -0
  22. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/ctest_upload.rst +26 -0
  23. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/elseif.rst +11 -0
  24. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/enable_testing.rst +20 -0
  25. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/endfunction.rst +14 -0
  26. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/endmacro.rst +14 -0
  27. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/file.rst +1342 -0
  28. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/find_library.rst +96 -0
  29. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/find_path.rst +52 -0
  30. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/fltk_wrap_ui.rst +14 -0
  31. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/get_cmake_property.rst +23 -0
  32. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/install_targets.rst +19 -0
  33. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/list.rst +334 -0
  34. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/return.rst +92 -0
  35. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/set_directory_properties.rst +23 -0
  36. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/set_tests_properties.rst +36 -0
  37. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/site_name.rst +12 -0
  38. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/target_link_libraries.rst +432 -0
  39. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/target_precompile_headers.rst +133 -0
  40. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/unset.rst +41 -0
  41. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/utility_source.rst +24 -0
  42. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/variable_watch.rst +48 -0
  43. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/while.rst +33 -0
  44. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/ANDROID_NATIVE_LIB_DIRECTORIES.rst +18 -0
  45. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/AUTOMOC_EXECUTABLE.rst +17 -0
  46. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/BUILD_RPATH.rst +36 -0
  47. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/BUILD_WITH_INSTALL_RPATH.rst +15 -0
  48. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/BUNDLE_EXTENSION.rst +8 -0
  49. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/COMPILE_PDB_NAME.rst +13 -0
  50. openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/C_EXTENSIONS.rst +21 -0
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/FIND_XXX.txt ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
215
+ |SYSTEM_ENVIRONMENT_PATH_WINDOWS_XXX|
216
+
217
+ 6. Search cmake variables defined in the Platform files
218
+ for the current system. The searching of ``CMAKE_INSTALL_PREFIX`` and
219
+ ``CMAKE_STAGING_PREFIX`` can be
220
+ skipped if ``NO_CMAKE_INSTALL_PREFIX`` is passed or by setting the
221
+ :variable:`CMAKE_FIND_USE_INSTALL_PREFIX` to ``FALSE``. All these locations
222
+ can be skipped if ``NO_CMAKE_SYSTEM_PATH`` is passed or by setting the
223
+ :variable:`CMAKE_FIND_USE_CMAKE_SYSTEM_PATH` to ``FALSE``.
224
+
225
+ * |CMAKE_SYSTEM_PREFIX_PATH_XXX|
226
+ * |CMAKE_SYSTEM_XXX_PATH|
227
+ * |CMAKE_SYSTEM_XXX_MAC_PATH|
228
+
229
+ The platform paths that these variables contain are locations that
230
+ typically include installed software. An example being ``/usr/local`` for
231
+ UNIX based platforms.
232
+
233
+ 7. Search the paths specified by the PATHS option
234
+ or in the short-hand version of the command.
235
+ These are typically hard-coded guesses.
236
+
237
+ The :variable:`CMAKE_IGNORE_PATH`, :variable:`CMAKE_IGNORE_PREFIX_PATH`,
238
+ :variable:`CMAKE_SYSTEM_IGNORE_PATH` and
239
+ :variable:`CMAKE_SYSTEM_IGNORE_PREFIX_PATH` variables can also cause some
240
+ of the above locations to be ignored.
241
+
242
+ .. versionadded:: 3.16
243
+ Added ``CMAKE_FIND_USE_<CATEGORY>_PATH`` variables to globally disable
244
+ various search locations.
245
+
246
+ .. |FIND_ARGS_XXX| replace:: <VAR> NAMES name
247
+
248
+ On macOS the :variable:`CMAKE_FIND_FRAMEWORK` and
249
+ :variable:`CMAKE_FIND_APPBUNDLE` variables determine the order of
250
+ preference between Apple-style and unix-style package components.
251
+
252
+ .. include:: FIND_XXX_ROOT.txt
253
+ .. include:: FIND_XXX_ORDER.txt
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_custom_command.rst ADDED
@@ -0,0 +1,699 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ .. _`add_custom_command(OUTPUT)`:
9
+
10
+ Generating Files
11
+ ^^^^^^^^^^^^^^^^
12
+
13
+ The first signature is for adding a custom command to produce an output:
14
+
15
+ .. code-block:: cmake
16
+
17
+ add_custom_command(OUTPUT output1 [output2 ...]
18
+ COMMAND command1 [ARGS] [args1...]
19
+ [COMMAND command2 [ARGS] [args2...] ...]
20
+ [MAIN_DEPENDENCY depend]
21
+ [DEPENDS [depends...]]
22
+ [BYPRODUCTS [files...]]
23
+ [IMPLICIT_DEPENDS <lang1> depend1
24
+ [<lang2> depend2] ...]
25
+ [WORKING_DIRECTORY dir]
26
+ [COMMENT comment]
27
+ [DEPFILE depfile]
28
+ [JOB_POOL job_pool]
29
+ [JOB_SERVER_AWARE <bool>]
30
+ [VERBATIM] [APPEND] [USES_TERMINAL]
31
+ [CODEGEN]
32
+ [COMMAND_EXPAND_LISTS]
33
+ [DEPENDS_EXPLICIT_ONLY])
34
+
35
+ This defines a command to generate specified ``OUTPUT`` file(s).
36
+ A target created in the same directory (``CMakeLists.txt`` file)
37
+ that specifies any output of the custom command as a source file
38
+ is given a rule to generate the file using the command at build time.
39
+
40
+ Do not list the output in more than one independent target that
41
+ may build in parallel or the instances of the rule may conflict.
42
+ Instead, use the :command:`add_custom_target` command to drive the
43
+ command and make the other targets depend on that one. See the
44
+ `Example: Generating Files for Multiple Targets`_ below.
45
+
46
+ The options are:
47
+
48
+ ``APPEND``
49
+ Append the ``COMMAND`` and ``DEPENDS`` option values to the custom
50
+ command for the first output specified. There must have already
51
+ been a previous call to this command with the same output.
52
+
53
+ If the previous call specified the output via a generator expression,
54
+ the output specified by the current call must match in at least one
55
+ configuration after evaluating generator expressions. In this case,
56
+ the appended commands and dependencies apply to all configurations.
57
+
58
+ The ``COMMENT``, ``MAIN_DEPENDENCY``, and ``WORKING_DIRECTORY``
59
+ options are currently ignored when ``APPEND`` is given, but may be
60
+ used in the future.
61
+
62
+ ``BYPRODUCTS``
63
+ .. versionadded:: 3.2
64
+
65
+ Specify the files the command is expected to produce but whose
66
+ modification time may or may not be newer than the dependencies.
67
+ If a byproduct name is a relative path it will be interpreted
68
+ relative to the build tree directory corresponding to the
69
+ current source directory.
70
+ Each byproduct file will be marked with the :prop_sf:`GENERATED`
71
+ source file property automatically.
72
+
73
+ *See policy* :policy:`CMP0058` *for the motivation behind this feature.*
74
+
75
+ Explicit specification of byproducts is supported by the
76
+ :generator:`Ninja` generator to tell the ``ninja`` build tool
77
+ how to regenerate byproducts when they are missing. It is
78
+ also useful when other build rules (e.g. custom commands)
79
+ depend on the byproducts. Ninja requires a build rule for any
80
+ generated file on which another rule depends even if there are
81
+ order-only dependencies to ensure the byproducts will be
82
+ available before their dependents build.
83
+
84
+ The :ref:`Makefile Generators` will remove ``BYPRODUCTS`` and other
85
+ :prop_sf:`GENERATED` files during ``make clean``.
86
+
87
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
88
+ All byproducts must be set in the first call to
89
+ ``add_custom_command(OUTPUT...)`` for the output files.
90
+
91
+ .. versionadded:: 3.20
92
+ Arguments to ``BYPRODUCTS`` may use a restricted set of
93
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
94
+ :ref:`Target-dependent expressions <Target-Dependent Expressions>`
95
+ are not permitted.
96
+
97
+ .. versionchanged:: 3.28
98
+ In targets using :ref:`file sets`, custom command byproducts are now
99
+ considered private unless they are listed in a non-private file set.
100
+ See policy :policy:`CMP0154`.
101
+
102
+ ``COMMAND``
103
+ Specify the command-line(s) to execute at build time.
104
+ At least one ``COMMAND`` would normally be given, but certain patterns
105
+ may omit it, such as adding commands in separate calls using `APPEND`.
106
+
107
+ If more than one ``COMMAND`` is specified, they will be executed in order,
108
+ but *not* necessarily composed into a stateful shell or batch script.
109
+ To run a full script, use the :command:`configure_file` command or the
110
+ :command:`file(GENERATE)` command to create it, and then specify
111
+ a ``COMMAND`` to launch it.
112
+
113
+ The optional ``ARGS`` argument is for backward compatibility and
114
+ will be ignored.
115
+
116
+ If ``COMMAND`` specifies an executable target name (created by the
117
+ :command:`add_executable` command), it will automatically be replaced
118
+ by the location of the executable created at build time if either of
119
+ the following is true:
120
+
121
+ * The target is not being cross-compiled (i.e. the
122
+ :variable:`CMAKE_CROSSCOMPILING` variable is not set to true).
123
+ * .. versionadded:: 3.6
124
+ The target is being cross-compiled and an emulator is provided (i.e.
125
+ its :prop_tgt:`CROSSCOMPILING_EMULATOR` target property is set).
126
+ In this case, the contents of :prop_tgt:`CROSSCOMPILING_EMULATOR` will be
127
+ prepended to the command before the location of the target executable.
128
+
129
+ If neither of the above conditions are met, it is assumed that the
130
+ command name is a program to be found on the ``PATH`` at build time.
131
+
132
+ Arguments to ``COMMAND`` may use
133
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
134
+ Use the :genex:`TARGET_FILE` generator expression to refer to the location
135
+ of a target later in the command line (i.e. as a command argument rather
136
+ than as the command to execute).
137
+
138
+ Whenever one of the following target based generator expressions are used as
139
+ a command to execute or is mentioned in a command argument, a target-level
140
+ dependency will be added automatically so that the mentioned target will be
141
+ built before any target using this custom command
142
+ (see policy :policy:`CMP0112`).
143
+
144
+ * ``TARGET_FILE``
145
+ * ``TARGET_LINKER_FILE``
146
+ * ``TARGET_SONAME_FILE``
147
+ * ``TARGET_PDB_FILE``
148
+
149
+ This target-level dependency does NOT add a file-level dependency that would
150
+ cause the custom command to re-run whenever the executable is recompiled.
151
+ List target names with the ``DEPENDS`` option to add such file-level
152
+ dependencies.
153
+
154
+
155
+ ``COMMENT``
156
+ Display the given message before the commands are executed at
157
+ build time. This will be ignored if ``APPEND`` is given, although a future
158
+ version may use it.
159
+
160
+ .. versionadded:: 3.26
161
+ Arguments to ``COMMENT`` may use
162
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
163
+
164
+ ``DEPENDS``
165
+ Specify files on which the command depends. Each argument is converted
166
+ to a dependency as follows:
167
+
168
+ 1. If the argument is the name of a target (created by the
169
+ :command:`add_custom_target`, :command:`add_executable`, or
170
+ :command:`add_library` command) a target-level dependency is
171
+ created to make sure the target is built before any target
172
+ using this custom command. Additionally, if the target is an
173
+ executable or library, a file-level dependency is created to
174
+ cause the custom command to re-run whenever the target is
175
+ recompiled.
176
+
177
+ 2. If the argument is an absolute path, a file-level dependency
178
+ is created on that path.
179
+
180
+ 3. If the argument is the name of a source file that has been
181
+ added to a target or on which a source file property has been set,
182
+ a file-level dependency is created on that source file.
183
+
184
+ 4. If the argument is a relative path and it exists in the current
185
+ source directory, a file-level dependency is created on that
186
+ file in the current source directory.
187
+
188
+ 5. Otherwise, a file-level dependency is created on that path relative
189
+ to the current binary directory.
190
+
191
+ If any dependency is an ``OUTPUT`` of another custom command in the same
192
+ directory (``CMakeLists.txt`` file), CMake automatically brings the other
193
+ custom command into the target in which this command is built.
194
+
195
+ .. versionadded:: 3.16
196
+ A target-level dependency is added if any dependency is listed as
197
+ ``BYPRODUCTS`` of a target or any of its build events in the same
198
+ directory to ensure the byproducts will be available.
199
+
200
+ If ``DEPENDS`` is not specified, the command will run whenever
201
+ the ``OUTPUT`` is missing; if the command does not actually
202
+ create the ``OUTPUT``, the rule will always run.
203
+
204
+ .. versionadded:: 3.1
205
+ Arguments to ``DEPENDS`` may use
206
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
207
+
208
+ ``COMMAND_EXPAND_LISTS``
209
+ .. versionadded:: 3.8
210
+
211
+ Lists in ``COMMAND`` arguments will be expanded, including those
212
+ created with
213
+ :manual:`generator expressions <cmake-generator-expressions(7)>`,
214
+ allowing ``COMMAND`` arguments such as
215
+ ``${CC} "-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>" foo.cc``
216
+ to be properly expanded.
217
+
218
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
219
+ If the appended commands need this option to be set, it must be set on the
220
+ first call to ``add_custom_command(OUTPUT...)`` for the output files.
221
+
222
+ ``CODEGEN``
223
+ .. versionadded:: 3.31
224
+
225
+ Adds the custom command to a global ``codegen`` target that can be
226
+ used to execute the custom command while avoiding the majority of the
227
+ build graph.
228
+
229
+ This option is supported only by :ref:`Ninja Generators` and
230
+ :ref:`Makefile Generators`, and is ignored by other generators.
231
+ Furthermore, this option is allowed only if policy :policy:`CMP0171`
232
+ is set to ``NEW``.
233
+
234
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
235
+ It can only be set on the first call to ``add_custom_command(OUTPUT...)``
236
+ for the output files.
237
+
238
+ ``IMPLICIT_DEPENDS``
239
+ Request scanning of implicit dependencies of an input file.
240
+ The language given specifies the programming language whose
241
+ corresponding dependency scanner should be used.
242
+ Currently only ``C`` and ``CXX`` language scanners are supported.
243
+ The language has to be specified for every file in the
244
+ ``IMPLICIT_DEPENDS`` list. Dependencies discovered from the
245
+ scanning are added to those of the custom command at build time.
246
+ Note that the ``IMPLICIT_DEPENDS`` option is currently supported
247
+ only for Makefile generators and will be ignored by other generators.
248
+
249
+ .. note::
250
+
251
+ This option cannot be specified at the same time as ``DEPFILE`` option.
252
+
253
+ ``JOB_POOL``
254
+ .. versionadded:: 3.15
255
+
256
+ Specify a :prop_gbl:`pool <JOB_POOLS>` for the :generator:`Ninja`
257
+ generator. Incompatible with ``USES_TERMINAL``, which implies
258
+ the ``console`` pool.
259
+ Using a pool that is not defined by :prop_gbl:`JOB_POOLS` causes
260
+ an error by ninja at build time.
261
+
262
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
263
+ Job pools can only be specified in the first call to
264
+ ``add_custom_command(OUTPUT...)`` for the output files.
265
+
266
+ ``JOB_SERVER_AWARE``
267
+ .. versionadded:: 3.28
268
+
269
+ Specify that the command is GNU Make job server aware.
270
+
271
+ For the :generator:`Unix Makefiles`, :generator:`MSYS Makefiles`, and
272
+ :generator:`MinGW Makefiles` generators this will add the ``+`` prefix to the
273
+ recipe line. See the `GNU Make Documentation`_ for more information.
274
+
275
+ This option is silently ignored by other generators.
276
+
277
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
278
+ Job server awareness can only be specified in the first call to
279
+ ``add_custom_command(OUTPUT...)`` for the output files.
280
+
281
+ .. _`GNU Make Documentation`: https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
282
+
283
+ ``MAIN_DEPENDENCY``
284
+ Specify the primary input source file to the command. This is
285
+ treated just like any value given to the ``DEPENDS`` option
286
+ but also suggests to Visual Studio generators where to hang
287
+ the custom command. Each source file may have at most one command
288
+ specifying it as its main dependency. A compile command (i.e. for a
289
+ library or an executable) counts as an implicit main dependency which
290
+ gets silently overwritten by a custom command specification.
291
+
292
+ This option is currently ignored if ``APPEND`` is given, but a future
293
+ version may use it.
294
+
295
+ ``OUTPUT``
296
+ Specify the output files the command is expected to produce.
297
+ Each output file will be marked with the :prop_sf:`GENERATED`
298
+ source file property automatically.
299
+ If the output of the custom command is not actually created
300
+ as a file on disk it should be marked with the :prop_sf:`SYMBOLIC`
301
+ source file property.
302
+
303
+ If an output file name is a relative path, its absolute path is
304
+ determined by interpreting it relative to:
305
+
306
+ 1. the build directory corresponding to the current source directory
307
+ (:variable:`CMAKE_CURRENT_BINARY_DIR`), or
308
+
309
+ 2. the current source directory (:variable:`CMAKE_CURRENT_SOURCE_DIR`).
310
+
311
+ The path in the build directory is preferred unless the path in the
312
+ source tree is mentioned as an absolute source file path elsewhere
313
+ in the current directory.
314
+
315
+ The output file path may not contain ``<`` or ``>`` characters.
316
+
317
+ .. versionadded:: 3.20
318
+ Arguments to ``OUTPUT`` may use a restricted set of
319
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
320
+ :ref:`Target-dependent expressions <Target-Dependent Expressions>`
321
+ are not permitted.
322
+
323
+ .. versionchanged:: 3.28
324
+ In targets using :ref:`file sets`, custom command outputs are now
325
+ considered private unless they are listed in a non-private file set.
326
+ See policy :policy:`CMP0154`.
327
+
328
+ .. versionchanged:: 3.30
329
+ The output file path may now use ``#`` characters, except
330
+ when using the :generator:`Borland Makefiles` generator.
331
+
332
+ ``USES_TERMINAL``
333
+ .. versionadded:: 3.2
334
+
335
+ The command will be given direct access to the terminal if possible.
336
+ With the :generator:`Ninja` generator, this places the command in
337
+ the ``console`` :prop_gbl:`pool <JOB_POOLS>`.
338
+
339
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
340
+ If the appended commands need access to the terminal, it must be set on
341
+ the first call to ``add_custom_command(OUTPUT...)`` for the output files.
342
+
343
+ ``VERBATIM``
344
+ All arguments to the commands will be escaped properly for the
345
+ build tool so that the invoked command receives each argument
346
+ unchanged. Note that one level of escapes is still used by the
347
+ CMake language processor before add_custom_command even sees the
348
+ arguments. Use of ``VERBATIM`` is recommended as it enables
349
+ correct behavior. When ``VERBATIM`` is not given the behavior
350
+ is platform specific because there is no protection of
351
+ tool-specific special characters.
352
+
353
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
354
+ If the appended commands need to be treated as ``VERBATIM``, it must be set
355
+ on the first call to ``add_custom_command(OUTPUT...)`` for the output files.
356
+
357
+ ``WORKING_DIRECTORY``
358
+ Execute the command with the given current working directory.
359
+ If it is a relative path, it will be interpreted relative to the
360
+ build tree directory corresponding to the current source directory.
361
+
362
+ This option is currently ignored if ``APPEND`` is given, but a future
363
+ version may use it.
364
+
365
+ .. versionadded:: 3.13
366
+ Arguments to ``WORKING_DIRECTORY`` may use
367
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
368
+
369
+ ``DEPFILE``
370
+ .. versionadded:: 3.7
371
+
372
+ Specify a depfile which holds dependencies for the custom command. It is
373
+ usually emitted by the custom command itself. This keyword may only be used
374
+ if the generator supports it, as detailed below.
375
+
376
+ The expected format, compatible with what is generated by ``gcc`` with the
377
+ option ``-M``, is independent of the generator or platform.
378
+
379
+ The formal syntax, as specified using
380
+ `BNF <https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form>`_ notation with
381
+ the regular extensions, is the following:
382
+
383
+ .. raw:: latex
384
+
385
+ \begin{small}
386
+
387
+ .. productionlist:: depfile
388
+ depfile: `rule`*
389
+ rule: `targets` (':' (`separator` `dependencies`?)?)? `eol`
390
+ targets: `target` (`separator` `target`)* `separator`*
391
+ target: `pathname`
392
+ dependencies: `dependency` (`separator` `dependency`)* `separator`*
393
+ dependency: `pathname`
394
+ separator: (`space` | `line_continue`)+
395
+ line_continue: '\' `eol`
396
+ space: ' ' | '\t'
397
+ pathname: `character`+
398
+ character: `std_character` | `dollar` | `hash` | `whitespace`
399
+ std_character: <any character except '$', '#' or ' '>
400
+ dollar: '$$'
401
+ hash: '\#'
402
+ whitespace: '\ '
403
+ eol: '\r'? '\n'
404
+
405
+ .. raw:: latex
406
+
407
+ \end{small}
408
+
409
+ .. note::
410
+
411
+ As part of ``pathname``, any slash and backslash is interpreted as
412
+ a directory separator.
413
+
414
+ .. versionadded:: 3.7
415
+ The :generator:`Ninja` generator supports ``DEPFILE`` since the keyword
416
+ was first added.
417
+
418
+ .. versionadded:: 3.17
419
+ Added the :generator:`Ninja Multi-Config` generator, which included
420
+ support for the ``DEPFILE`` keyword.
421
+
422
+ .. versionadded:: 3.20
423
+ Added support for :ref:`Makefile Generators`.
424
+
425
+ .. note::
426
+
427
+ ``DEPFILE`` cannot be specified at the same time as the
428
+ ``IMPLICIT_DEPENDS`` option for :ref:`Makefile Generators`.
429
+
430
+ .. versionadded:: 3.21
431
+ Added support for :ref:`Visual Studio Generators` with VS 2012 and above,
432
+ and for the :generator:`Xcode` generator. Support for
433
+ :manual:`generator expressions <cmake-generator-expressions(7)>` was also
434
+ added.
435
+
436
+ .. versionadded:: 3.29
437
+ The :ref:`Ninja Generators` will now incorporate the dependencies into its
438
+ "deps log" database if the file is not listed in ``OUTPUTS`` or
439
+ ``BYPRODUCTS``.
440
+
441
+ Using ``DEPFILE`` with generators other than those listed above is an error.
442
+
443
+ If the ``DEPFILE`` argument is relative, it should be relative to
444
+ :variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the
445
+ ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`.
446
+ See policy :policy:`CMP0116`, which is always ``NEW`` for
447
+ :ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
448
+ and the :generator:`Xcode` generator.
449
+
450
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
451
+ Depfiles can only be set on the first call to
452
+ ``add_custom_command(OUTPUT...)`` for the output files.
453
+
454
+ ``DEPENDS_EXPLICIT_ONLY``
455
+
456
+ .. versionadded:: 3.27
457
+
458
+ Indicates that the command's ``DEPENDS`` argument represents all files
459
+ required by the command and implicit dependencies are not required.
460
+
461
+ Without this option, if any target uses the output of the custom command,
462
+ CMake will consider that target's dependencies as implicit dependencies for
463
+ the custom command in case this custom command requires files implicitly
464
+ created by those targets.
465
+
466
+ This option can be enabled on all custom commands by setting
467
+ :variable:`CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to ``ON``.
468
+
469
+ This keyword cannot be used with ``APPEND`` (see policy :policy:`CMP0175`).
470
+ It can only be set on the first call to ``add_custom_command(OUTPUT...)``
471
+ for the output files.
472
+
473
+ Only the :ref:`Ninja Generators` actually use this information to remove
474
+ unnecessary implicit dependencies.
475
+
476
+ See also the :prop_tgt:`OPTIMIZE_DEPENDENCIES` target property, which may
477
+ provide another way for reducing the impact of target dependencies in some
478
+ scenarios.
479
+
480
+ Examples: Generating Files
481
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
482
+
483
+ Custom commands may be used to generate source files.
484
+ For example, the code:
485
+
486
+ .. code-block:: cmake
487
+
488
+ add_custom_command(
489
+ OUTPUT out.c
490
+ COMMAND someTool -i ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
491
+ -o out.c
492
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
493
+ VERBATIM)
494
+ add_library(myLib out.c)
495
+
496
+ adds a custom command to run ``someTool`` to generate ``out.c`` and then
497
+ compile the generated source as part of a library. The generation rule
498
+ will re-run whenever ``in.txt`` changes.
499
+
500
+ .. versionadded:: 3.20
501
+ One may use generator expressions to specify per-configuration outputs.
502
+ For example, the code:
503
+
504
+ .. code-block:: cmake
505
+
506
+ add_custom_command(
507
+ OUTPUT "out-$<CONFIG>.c"
508
+ COMMAND someTool -i ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
509
+ -o "out-$<CONFIG>.c"
510
+ -c "$<CONFIG>"
511
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/in.txt
512
+ VERBATIM)
513
+ add_library(myLib "out-$<CONFIG>.c")
514
+
515
+ adds a custom command to run ``someTool`` to generate ``out-<config>.c``,
516
+ where ``<config>`` is the build configuration, and then compile the generated
517
+ source as part of a library.
518
+
519
+ .. versionadded:: 3.31
520
+ Use the ``CODEGEN`` option to add a custom command's outputs to the builtin
521
+ ``codegen`` target. This is useful to make generated code available for
522
+ static analysis without building the entire project. For example:
523
+
524
+ .. code-block:: cmake
525
+
526
+ add_executable(someTool someTool.c)
527
+
528
+ add_custom_command(
529
+ OUTPUT out.c
530
+ COMMAND someTool -o out.c
531
+ CODEGEN)
532
+
533
+ add_library(myLib out.c)
534
+
535
+ A user may build the ``codegen`` target to generate ``out.c``.
536
+ ``someTool`` is built as dependency, but ``myLib`` is not built at all.
537
+
538
+ Example: Generating Files for Multiple Targets
539
+ """"""""""""""""""""""""""""""""""""""""""""""
540
+
541
+ If multiple independent targets need the same custom command output,
542
+ it must be attached to a single custom target on which they all depend.
543
+ Consider the following example:
544
+
545
+ .. code-block:: cmake
546
+
547
+ add_custom_command(
548
+ OUTPUT table.csv
549
+ COMMAND makeTable -i ${CMAKE_CURRENT_SOURCE_DIR}/input.dat
550
+ -o table.csv
551
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/input.dat
552
+ VERBATIM)
553
+ add_custom_target(generate_table_csv DEPENDS table.csv)
554
+
555
+ add_custom_command(
556
+ OUTPUT foo.cxx
557
+ COMMAND genFromTable -i table.csv -case foo -o foo.cxx
558
+ DEPENDS table.csv # file-level dependency
559
+ generate_table_csv # target-level dependency
560
+ VERBATIM)
561
+ add_library(foo foo.cxx)
562
+
563
+ add_custom_command(
564
+ OUTPUT bar.cxx
565
+ COMMAND genFromTable -i table.csv -case bar -o bar.cxx
566
+ DEPENDS table.csv # file-level dependency
567
+ generate_table_csv # target-level dependency
568
+ VERBATIM)
569
+ add_library(bar bar.cxx)
570
+
571
+ Output ``foo.cxx`` is needed only by target ``foo`` and output ``bar.cxx``
572
+ is needed only by target ``bar``, but *both* targets need ``table.csv``,
573
+ transitively. Since ``foo`` and ``bar`` are independent targets that may
574
+ build concurrently, we prevent them from racing to generate ``table.csv``
575
+ by placing its custom command in a separate target, ``generate_table_csv``.
576
+ The custom commands generating ``foo.cxx`` and ``bar.cxx`` each specify a
577
+ target-level dependency on ``generate_table_csv``, so the targets using them,
578
+ ``foo`` and ``bar``, will not build until after target ``generate_table_csv``
579
+ is built.
580
+
581
+ .. _`add_custom_command(TARGET)`:
582
+
583
+ Build Events
584
+ ^^^^^^^^^^^^
585
+
586
+ The second signature adds a custom command to a target such as a
587
+ library or executable. This is useful for performing an operation
588
+ before or after building the target. The command becomes part of the
589
+ target and will only execute when the target itself is built. If the
590
+ target is already built, the command will not execute.
591
+
592
+ .. code-block:: cmake
593
+
594
+ add_custom_command(TARGET <target>
595
+ PRE_BUILD | PRE_LINK | POST_BUILD
596
+ COMMAND command1 [ARGS] [args1...]
597
+ [COMMAND command2 [ARGS] [args2...] ...]
598
+ [BYPRODUCTS [files...]]
599
+ [WORKING_DIRECTORY dir]
600
+ [COMMENT comment]
601
+ [VERBATIM]
602
+ [COMMAND_EXPAND_LISTS]
603
+ [USES_TERMINAL])
604
+
605
+ This defines a new command that will be associated with building the
606
+ specified ``<target>``. The ``<target>`` must be defined in the current
607
+ directory; targets defined in other directories may not be specified.
608
+
609
+ When the command will happen is determined by which
610
+ of the following is specified:
611
+
612
+ ``PRE_BUILD``
613
+ This option has unique behavior for the :ref:`Visual Studio Generators`.
614
+ When using one of the Visual Studio generators, the command will run before
615
+ any other rules are executed within the target. With all other generators,
616
+ this option behaves the same as ``PRE_LINK`` instead. Because of this,
617
+ it is recommended to avoid using ``PRE_BUILD`` except when it is known that
618
+ a Visual Studio generator is being used.
619
+ ``PRE_LINK``
620
+ Run after sources have been compiled but before linking the binary
621
+ or running the librarian or archiver tool of a static library.
622
+ This is not defined for targets created by the
623
+ :command:`add_custom_target` command.
624
+ ``POST_BUILD``
625
+ Run after all other rules within the target have been executed.
626
+
627
+ Projects should always specify one of the above three keywords when using
628
+ the ``TARGET`` form. See policy :policy:`CMP0175`.
629
+
630
+ All other keywords shown in the signature above have the same meaning as they
631
+ do for the :command:`add_custom_command(OUTPUT)` form of the command.
632
+ At least one ``COMMAND`` must be given, see policy :policy:`CMP0175`.
633
+
634
+ .. note::
635
+ Because generator expressions can be used in custom commands,
636
+ it is possible to define ``COMMAND`` lines or whole custom commands
637
+ which evaluate to empty strings for certain configurations.
638
+ For :ref:`Visual Studio Generators` these command
639
+ lines or custom commands will be omitted for the specific
640
+ configuration and no "empty-string-command" will be added.
641
+
642
+ This allows adding individual build events for every configuration.
643
+
644
+ .. versionadded:: 3.21
645
+ Support for target-dependent generator expressions.
646
+
647
+ .. versionadded:: 3.29
648
+ The ``<target>`` may be an :ref:`ALIAS target <Alias Targets>`.
649
+
650
+ Examples: Build Events
651
+ ^^^^^^^^^^^^^^^^^^^^^^
652
+
653
+ A ``POST_BUILD`` event may be used to post-process a binary after linking.
654
+ For example, the code:
655
+
656
+ .. code-block:: cmake
657
+
658
+ add_executable(myExe myExe.c)
659
+ add_custom_command(
660
+ TARGET myExe POST_BUILD
661
+ COMMAND someHasher -i "$<TARGET_FILE:myExe>"
662
+ -o "$<TARGET_FILE:myExe>.hash"
663
+ VERBATIM)
664
+
665
+ will run ``someHasher`` to produce a ``.hash`` file next to the executable
666
+ after linking.
667
+
668
+ .. versionadded:: 3.20
669
+ One may use generator expressions to specify per-configuration byproducts.
670
+ For example, the code:
671
+
672
+ .. code-block:: cmake
673
+
674
+ add_library(myPlugin MODULE myPlugin.c)
675
+ add_custom_command(
676
+ TARGET myPlugin POST_BUILD
677
+ COMMAND someHasher -i "$<TARGET_FILE:myPlugin>"
678
+ --as-code "myPlugin-hash-$<CONFIG>.c"
679
+ BYPRODUCTS "myPlugin-hash-$<CONFIG>.c"
680
+ VERBATIM)
681
+ add_executable(myExe myExe.c "myPlugin-hash-$<CONFIG>.c")
682
+
683
+ will run ``someHasher`` after linking ``myPlugin``, e.g. to produce a ``.c``
684
+ file containing code to check the hash of ``myPlugin`` that the ``myExe``
685
+ executable can use to verify it before loading.
686
+
687
+ Ninja Multi-Config
688
+ ^^^^^^^^^^^^^^^^^^
689
+
690
+ .. versionadded:: 3.20
691
+
692
+ ``add_custom_command`` supports the :generator:`Ninja Multi-Config`
693
+ generator's cross-config capabilities. See the generator documentation
694
+ for more information.
695
+
696
+ See Also
697
+ ^^^^^^^^
698
+
699
+ * :command:`add_custom_target`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/add_executable.rst ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ .. signature::
14
+ add_executable(<name> <options>... <sources>...)
15
+ :target: normal
16
+
17
+ Add an executable target called ``<name>`` to be built from the source
18
+ files listed in the command invocation.
19
+
20
+ The options are:
21
+
22
+ ``WIN32``
23
+ Set the :prop_tgt:`WIN32_EXECUTABLE` target property automatically.
24
+ See documentation of that target property for details.
25
+
26
+ ``MACOSX_BUNDLE``
27
+ Set the :prop_tgt:`MACOSX_BUNDLE` target property automatically.
28
+ See documentation of that target property for details.
29
+
30
+ ``EXCLUDE_FROM_ALL``
31
+ Set the :prop_tgt:`EXCLUDE_FROM_ALL` target property automatically.
32
+ See documentation of that target property for details.
33
+
34
+ The ``<name>`` corresponds to the logical target name and must be globally
35
+ unique within a project. The actual file name of the executable built is
36
+ constructed based on conventions of the native platform (such as
37
+ ``<name>.exe`` or just ``<name>``).
38
+
39
+ .. versionadded:: 3.1
40
+ Source arguments to ``add_executable`` may use "generator expressions" with
41
+ the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
42
+ manual for available expressions.
43
+
44
+ .. versionadded:: 3.11
45
+ The source files can be omitted if they are added later using
46
+ :command:`target_sources`.
47
+
48
+ By default the executable file will be created in the build tree
49
+ directory corresponding to the source tree directory in which the
50
+ command was invoked. See documentation of the
51
+ :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target property to change this
52
+ location. See documentation of the :prop_tgt:`OUTPUT_NAME` target property
53
+ to change the ``<name>`` part of the final file name.
54
+
55
+ See the :manual:`cmake-buildsystem(7)` manual for more on defining
56
+ buildsystem properties.
57
+
58
+ See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are
59
+ pre-processed, and you want to have the original sources reachable from
60
+ within IDE.
61
+
62
+ Imported Executables
63
+ ^^^^^^^^^^^^^^^^^^^^
64
+
65
+ .. signature::
66
+ add_executable(<name> IMPORTED [GLOBAL])
67
+ :target: IMPORTED
68
+
69
+ Add an :ref:`IMPORTED executable target <Imported Targets>` to reference
70
+ an executable file located outside the project. The target name may be
71
+ referenced like any target built within the project, except that by
72
+ default it is visible only in the directory in which it is created,
73
+ and below.
74
+
75
+ The options are:
76
+
77
+ ``GLOBAL``
78
+ Make the target name globally visible.
79
+
80
+ No rules are generated to build imported targets, and the :prop_tgt:`IMPORTED`
81
+ target property is ``True``. Imported executables are useful for convenient
82
+ reference from commands like :command:`add_custom_command`.
83
+
84
+ Details about the imported executable are specified by setting properties
85
+ whose names begin in ``IMPORTED_``. The most important such property is
86
+ :prop_tgt:`IMPORTED_LOCATION` (and its per-configuration version
87
+ :prop_tgt:`IMPORTED_LOCATION_<CONFIG>`) which specifies the location of
88
+ the main executable file on disk. See documentation of the ``IMPORTED_*``
89
+ properties for more information.
90
+
91
+ Alias Executables
92
+ ^^^^^^^^^^^^^^^^^
93
+
94
+ .. signature::
95
+ add_executable(<name> ALIAS <target>)
96
+ :target: ALIAS
97
+
98
+ Creates an :ref:`Alias Target <Alias Targets>`, such that ``<name>`` can
99
+ be used to refer to ``<target>`` in subsequent commands. The ``<name>``
100
+ does not appear in the generated buildsystem as a make target. The
101
+ ``<target>`` may not be an ``ALIAS``.
102
+
103
+ .. versionadded:: 3.11
104
+ An ``ALIAS`` can target a ``GLOBAL`` :ref:`Imported Target <Imported Targets>`
105
+
106
+ .. versionadded:: 3.18
107
+ An ``ALIAS`` can target a non-``GLOBAL`` Imported Target. Such alias is
108
+ scoped to the directory in which it is created and subdirectories.
109
+ The :prop_tgt:`ALIAS_GLOBAL` target property can be used to check if the
110
+ alias is global or not.
111
+
112
+ ``ALIAS`` targets can be used as targets to read properties
113
+ from, executables for custom commands and custom targets. They can also be
114
+ tested for existence with the regular :command:`if(TARGET)` subcommand.
115
+ The ``<name>`` may not be used to modify properties of ``<target>``, that
116
+ is, it may not be used as the operand of :command:`set_property`,
117
+ :command:`set_target_properties`, :command:`target_link_libraries` etc.
118
+ An ``ALIAS`` target may not be installed or exported.
119
+
120
+ See Also
121
+ ^^^^^^^^
122
+
123
+ * :command:`add_library`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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
+ )
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/cmake_host_system_information.rst ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ``MSYSTEM_PREFIX``
150
+ .. versionadded:: 3.28
151
+
152
+ Available only on Windows hosts. In a MSYS or MinGW development
153
+ environment that sets the ``MSYSTEM`` environment variable, this
154
+ is its installation prefix. Otherwise, this is the empty string.
155
+
156
+ ``DISTRIB_INFO``
157
+ .. versionadded:: 3.22
158
+
159
+ Read :file:`/etc/os-release` file and define the given ``<variable>``
160
+ into a list of read variables
161
+
162
+ ``DISTRIB_<name>``
163
+ .. versionadded:: 3.22
164
+
165
+ Get the ``<name>`` variable (see `man 5 os-release`_) if it exists in the
166
+ :file:`/etc/os-release` file
167
+
168
+ Example:
169
+
170
+ .. code-block:: cmake
171
+
172
+ cmake_host_system_information(RESULT PRETTY_NAME QUERY DISTRIB_PRETTY_NAME)
173
+ message(STATUS "${PRETTY_NAME}")
174
+
175
+ cmake_host_system_information(RESULT DISTRO QUERY DISTRIB_INFO)
176
+
177
+ foreach(VAR IN LISTS DISTRO)
178
+ message(STATUS "${VAR}=`${${VAR}}`")
179
+ endforeach()
180
+
181
+
182
+ Output::
183
+
184
+ -- Ubuntu 20.04.2 LTS
185
+ -- DISTRO_BUG_REPORT_URL=`https://bugs.launchpad.net/ubuntu/`
186
+ -- DISTRO_HOME_URL=`https://www.ubuntu.com/`
187
+ -- DISTRO_ID=`ubuntu`
188
+ -- DISTRO_ID_LIKE=`debian`
189
+ -- DISTRO_NAME=`Ubuntu`
190
+ -- DISTRO_PRETTY_NAME=`Ubuntu 20.04.2 LTS`
191
+ -- DISTRO_PRIVACY_POLICY_URL=`https://www.ubuntu.com/legal/terms-and-policies/privacy-policy`
192
+ -- DISTRO_SUPPORT_URL=`https://help.ubuntu.com/`
193
+ -- DISTRO_UBUNTU_CODENAME=`focal`
194
+ -- DISTRO_VERSION=`20.04.2 LTS (Focal Fossa)`
195
+ -- DISTRO_VERSION_CODENAME=`focal`
196
+ -- DISTRO_VERSION_ID=`20.04`
197
+
198
+ If :file:`/etc/os-release` file is not found, the command tries to gather OS
199
+ identification via fallback scripts. The fallback script can use `various
200
+ distribution-specific files`_ to collect OS identification data and map it
201
+ into `man 5 os-release`_ variables.
202
+
203
+ Fallback Interface Variables
204
+ """"""""""""""""""""""""""""
205
+
206
+ .. variable:: CMAKE_GET_OS_RELEASE_FALLBACK_SCRIPTS
207
+
208
+ In addition to the scripts shipped with CMake, a user may append full
209
+ paths to his script(s) to the this list. The script filename has the
210
+ following format: ``NNN-<name>.cmake``, where ``NNN`` is three digits
211
+ used to apply collected scripts in a specific order.
212
+
213
+ .. variable:: CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname>
214
+
215
+ Variables collected by the user provided fallback script
216
+ ought to be assigned to CMake variables using this naming
217
+ convention. Example, the ``ID`` variable from the manual becomes
218
+ ``CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID``.
219
+
220
+ .. variable:: CMAKE_GET_OS_RELEASE_FALLBACK_RESULT
221
+
222
+ The fallback script ought to store names of all assigned
223
+ ``CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname>`` variables in this list.
224
+
225
+ Example:
226
+
227
+ .. code-block:: cmake
228
+
229
+ # Try to detect some old distribution
230
+ # See also
231
+ # - http://linuxmafia.com/faq/Admin/release-files.html
232
+ #
233
+ if(NOT EXISTS "${CMAKE_SYSROOT}/etc/foobar-release")
234
+ return()
235
+ endif()
236
+ # Get the first string only
237
+ file(
238
+ STRINGS "${CMAKE_SYSROOT}/etc/foobar-release" CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT
239
+ LIMIT_COUNT 1
240
+ )
241
+ #
242
+ # Example:
243
+ #
244
+ # Foobar distribution release 1.2.3 (server)
245
+ #
246
+ if(CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT MATCHES "Foobar distribution release ([0-9\.]+) .*")
247
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME Foobar)
248
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME "${CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT}")
249
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID foobar)
250
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION ${CMAKE_MATCH_1})
251
+ set(CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID ${CMAKE_MATCH_1})
252
+ list(
253
+ APPEND CMAKE_GET_OS_RELEASE_FALLBACK_RESULT
254
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME
255
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME
256
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID
257
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION
258
+ CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID
259
+ )
260
+ endif()
261
+ unset(CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT)
262
+
263
+
264
+ .. rubric:: Footnotes
265
+
266
+ .. [#mebibytes] One MiB (mebibyte) is equal to 1024x1024 bytes.
267
+
268
+ .. _man 5 os-release: https://www.freedesktop.org/software/systemd/man/latest/os-release.html
269
+ .. _various distribution-specific files: http://linuxmafia.com/faq/Admin/release-files.html
270
+
271
+ .. _Query Windows registry:
272
+
273
+ Query Windows registry
274
+ ^^^^^^^^^^^^^^^^^^^^^^
275
+
276
+ .. versionadded:: 3.24
277
+
278
+ ::
279
+
280
+ cmake_host_system_information(RESULT <variable>
281
+ QUERY WINDOWS_REGISTRY <key> [VALUE_NAMES|SUBKEYS|VALUE <name>]
282
+ [VIEW (64|32|64_32|32_64|HOST|TARGET|BOTH)]
283
+ [SEPARATOR <separator>]
284
+ [ERROR_VARIABLE <result>])
285
+
286
+ Performs query operations on local computer registry subkey. Returns a list of
287
+ subkeys or value names that are located under the specified subkey in the
288
+ registry or the data of the specified value name. The result of the queried
289
+ entity is stored in ``<variable>``.
290
+
291
+ .. note::
292
+
293
+ Querying registry for any other platforms than ``Windows``, including
294
+ ``CYGWIN``, will always returns an empty string and sets an error message in
295
+ the variable specified with sub-option ``ERROR_VARIABLE``.
296
+
297
+ ``<key>`` specify the full path of a subkey on the local computer. The
298
+ ``<key>`` must include a valid root key. Valid root keys for the local computer
299
+ are:
300
+
301
+ * ``HKLM`` or ``HKEY_LOCAL_MACHINE``
302
+ * ``HKCU`` or ``HKEY_CURRENT_USER``
303
+ * ``HKCR`` or ``HKEY_CLASSES_ROOT``
304
+ * ``HKU`` or ``HKEY_USERS``
305
+ * ``HKCC`` or ``HKEY_CURRENT_CONFIG``
306
+
307
+ And, optionally, the path to a subkey under the specified root key. The path
308
+ separator can be the slash or the backslash. ``<key>`` is not case sensitive.
309
+ For example:
310
+
311
+ .. code-block:: cmake
312
+
313
+ cmake_host_system_information(RESULT result QUERY WINDOWS_REGISTRY "HKLM")
314
+ cmake_host_system_information(RESULT result QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Kitware")
315
+ cmake_host_system_information(RESULT result QUERY WINDOWS_REGISTRY "HKCU\\SOFTWARE\\Kitware")
316
+
317
+ ``VALUE_NAMES``
318
+ Request the list of value names defined under ``<key>``. If a default value
319
+ is defined, it will be identified with the special name ``(default)``.
320
+
321
+ ``SUBKEYS``
322
+ Request the list of subkeys defined under ``<key>``.
323
+
324
+ ``VALUE <name>``
325
+ Request the data stored in value named ``<name>``. If ``VALUE`` is not
326
+ specified or argument is the special name ``(default)``, the content of the
327
+ default value, if any, will be returned.
328
+
329
+ .. code-block:: cmake
330
+
331
+ # query default value for HKLM/SOFTWARE/Kitware key
332
+ cmake_host_system_information(RESULT result
333
+ QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Kitware")
334
+
335
+ # query default value for HKLM/SOFTWARE/Kitware key using special value name
336
+ cmake_host_system_information(RESULT result
337
+ QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Kitware"
338
+ VALUE "(default)")
339
+
340
+ Supported types are:
341
+
342
+ * ``REG_SZ``.
343
+ * ``REG_EXPAND_SZ``. The returned data is expanded.
344
+ * ``REG_MULTI_SZ``. The returned is expressed as a CMake list. See also
345
+ ``SEPARATOR`` sub-option.
346
+ * ``REG_DWORD``.
347
+ * ``REG_QWORD``.
348
+
349
+ For all other types, an empty string is returned.
350
+
351
+ ``VIEW``
352
+ Specify which registry views must be queried. When not specified, ``BOTH``
353
+ view is used.
354
+
355
+ ``64``
356
+ Query the 64bit registry. On ``32bit Windows``, returns always an empty
357
+ string.
358
+
359
+ ``32``
360
+ Query the 32bit registry.
361
+
362
+ ``64_32``
363
+ For ``VALUE`` sub-option or default value, query the registry using view
364
+ ``64``, and if the request failed, query the registry using view ``32``.
365
+ For ``VALUE_NAMES`` and ``SUBKEYS`` sub-options, query both views (``64``
366
+ and ``32``) and merge the results (sorted and duplicates removed).
367
+
368
+ ``32_64``
369
+ For ``VALUE`` sub-option or default value, query the registry using view
370
+ ``32``, and if the request failed, query the registry using view ``64``.
371
+ For ``VALUE_NAMES`` and ``SUBKEYS`` sub-options, query both views (``32``
372
+ and ``64``) and merge the results (sorted and duplicates removed).
373
+
374
+ ``HOST``
375
+ Query the registry matching the architecture of the host: ``64`` on ``64bit
376
+ Windows`` and ``32`` on ``32bit Windows``.
377
+
378
+ ``TARGET``
379
+ Query the registry matching the architecture specified by
380
+ :variable:`CMAKE_SIZEOF_VOID_P` variable. If not defined, fallback to
381
+ ``HOST`` view.
382
+
383
+ ``BOTH``
384
+ Query both views (``32`` and ``64``). The order depends of the following
385
+ rules: If :variable:`CMAKE_SIZEOF_VOID_P` variable is defined. Use the
386
+ following view depending of the content of this variable:
387
+
388
+ * ``8``: ``64_32``
389
+ * ``4``: ``32_64``
390
+
391
+ If :variable:`CMAKE_SIZEOF_VOID_P` variable is not defined, rely on
392
+ architecture of the host:
393
+
394
+ * ``64bit``: ``64_32``
395
+ * ``32bit``: ``32``
396
+
397
+ ``SEPARATOR``
398
+ Specify the separator character for ``REG_MULTI_SZ`` type. When not
399
+ specified, the character ``\0`` is used.
400
+
401
+ ``ERROR_VARIABLE <result>``
402
+ Returns any error raised during query operation. In case of success, the
403
+ variable holds an empty string.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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 \"${path}\"")
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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/configure_file.rst ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ configure_file
2
+ --------------
3
+
4
+ .. only:: html
5
+
6
+ .. contents::
7
+
8
+ Copy a file to another location and modify its contents.
9
+
10
+ .. code-block:: cmake
11
+
12
+ configure_file(<input> <output>
13
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS |
14
+ FILE_PERMISSIONS <permissions>...]
15
+ [COPYONLY] [ESCAPE_QUOTES] [@ONLY]
16
+ [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
17
+
18
+ Copies an ``<input>`` file to an ``<output>`` file while performing
19
+ `transformations`_ of the input file content.
20
+
21
+ If the input file is modified the build system will re-run CMake to
22
+ re-configure the file and generate the build system again.
23
+ The generated file is modified and its timestamp updated on subsequent
24
+ cmake runs only if its content is changed.
25
+
26
+ Options
27
+ ^^^^^^^
28
+
29
+ The options are:
30
+
31
+ ``<input>``
32
+ Path to the input file. A relative path is treated with respect to
33
+ the value of :variable:`CMAKE_CURRENT_SOURCE_DIR`. The input path
34
+ must be a file, not a directory.
35
+
36
+ ``<output>``
37
+ Path to the output file or directory. A relative path is treated
38
+ with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
39
+ If the path names an existing directory the output file is placed
40
+ in that directory with the same file name as the input file.
41
+ If the path contains non-existent directories, they are created.
42
+
43
+ ``NO_SOURCE_PERMISSIONS``
44
+ .. versionadded:: 3.19
45
+
46
+ Do not transfer the permissions of the input file to the output file.
47
+ The copied file permissions default to the standard 644 value
48
+ (-rw-r--r--).
49
+
50
+ ``USE_SOURCE_PERMISSIONS``
51
+ .. versionadded:: 3.20
52
+
53
+ Transfer the permissions of the input file to the output file.
54
+ This is already the default behavior if none of the three permissions-related
55
+ keywords are given (``NO_SOURCE_PERMISSIONS``, ``USE_SOURCE_PERMISSIONS``
56
+ or ``FILE_PERMISSIONS``). The ``USE_SOURCE_PERMISSIONS`` keyword mostly
57
+ serves as a way of making the intended behavior clearer at the call site.
58
+
59
+ ``FILE_PERMISSIONS <permissions>...``
60
+ .. versionadded:: 3.20
61
+
62
+ Ignore the input file's permissions and use the specified ``<permissions>``
63
+ for the output file instead.
64
+
65
+ ``COPYONLY``
66
+ Copy the file without replacing any variable references or other
67
+ content. This option may not be used with ``NEWLINE_STYLE``.
68
+
69
+ ``ESCAPE_QUOTES``
70
+ Escape any substituted quotes with backslashes (C-style).
71
+
72
+ ``@ONLY``
73
+ Restrict variable replacement to references of the form ``@VAR@``.
74
+ This is useful for configuring scripts that use ``${VAR}`` syntax.
75
+
76
+ ``NEWLINE_STYLE <style>``
77
+ Specify the newline style for the output file. Specify
78
+ ``UNIX`` or ``LF`` for ``\n`` newlines, or specify
79
+ ``DOS``, ``WIN32``, or ``CRLF`` for ``\r\n`` newlines.
80
+ This option may not be used with ``COPYONLY``.
81
+
82
+ Transformations
83
+ ^^^^^^^^^^^^^^^
84
+
85
+ :ref:`Variables <CMake Language Variables>` referenced in the input
86
+ file content as ``@VAR@``, ``${VAR}``, ``$CACHE{VAR}``, and
87
+ :ref:`environment variables <CMake Language Environment Variables>`
88
+ referenced as ``$ENV{VAR}``, will each be replaced with the current value
89
+ of the variable, or the empty string if the variable is not defined.
90
+ Furthermore, input lines of the form
91
+
92
+ .. code-block:: c
93
+
94
+ #cmakedefine VAR ...
95
+
96
+ will be replaced with either
97
+
98
+ .. code-block:: c
99
+
100
+ #define VAR ...
101
+
102
+ or
103
+
104
+ .. code-block:: c
105
+
106
+ /* #undef VAR */
107
+
108
+ depending on whether ``VAR`` is set in CMake to any value not considered
109
+ a false constant by the :command:`if` command. The "..." content on the
110
+ line after the variable name, if any, is processed as above.
111
+
112
+ Unlike lines of the form ``#cmakedefine VAR ...``, in lines of the form
113
+ ``#cmakedefine01 VAR``, ``VAR`` itself will expand to ``VAR 0`` or ``VAR 1``
114
+ rather than being assigned the value ``...``. Therefore, input lines of the form
115
+
116
+ .. code-block:: c
117
+
118
+ #cmakedefine01 VAR
119
+
120
+ will be replaced with either
121
+
122
+ .. code-block:: c
123
+
124
+ #define VAR 0
125
+
126
+ or
127
+
128
+ .. code-block:: c
129
+
130
+ #define VAR 1
131
+
132
+ Input lines of the form ``#cmakedefine01 VAR ...`` will expand
133
+ as ``#cmakedefine01 VAR ... 0`` or ``#cmakedefine01 VAR ... 1``,
134
+ which may lead to undefined behavior.
135
+
136
+ .. versionadded:: 3.10
137
+ The result lines (with the exception of the ``#undef`` comments) can be
138
+ indented using spaces and/or tabs between the ``#`` character
139
+ and the ``cmakedefine`` or ``cmakedefine01`` words. This whitespace
140
+ indentation will be preserved in the output lines:
141
+
142
+ .. code-block:: c
143
+
144
+ # cmakedefine VAR
145
+ # cmakedefine01 VAR
146
+
147
+ will be replaced, if ``VAR`` is defined, with
148
+
149
+ .. code-block:: c
150
+
151
+ # define VAR
152
+ # define VAR 1
153
+
154
+ Example
155
+ ^^^^^^^
156
+
157
+ Consider a source tree containing a ``foo.h.in`` file:
158
+
159
+ .. code-block:: c
160
+
161
+ #cmakedefine FOO_ENABLE
162
+ #cmakedefine FOO_STRING "@FOO_STRING@"
163
+
164
+ An adjacent ``CMakeLists.txt`` may use ``configure_file`` to
165
+ configure the header:
166
+
167
+ .. code-block:: cmake
168
+
169
+ option(FOO_ENABLE "Enable Foo" ON)
170
+ if(FOO_ENABLE)
171
+ set(FOO_STRING "foo")
172
+ endif()
173
+ configure_file(foo.h.in foo.h @ONLY)
174
+
175
+ This creates a ``foo.h`` in the build directory corresponding to
176
+ this source directory. If the ``FOO_ENABLE`` option is on, the
177
+ configured file will contain:
178
+
179
+ .. code-block:: c
180
+
181
+ #define FOO_ENABLE
182
+ #define FOO_STRING "foo"
183
+
184
+ Otherwise it will contain:
185
+
186
+ .. code-block:: c
187
+
188
+ /* #undef FOO_ENABLE */
189
+ /* #undef FOO_STRING */
190
+
191
+ One may then use the :command:`target_include_directories` command to
192
+ specify the output directory as an include directory:
193
+
194
+ .. code-block:: cmake
195
+
196
+ target_include_directories(<target> [SYSTEM] <INTERFACE|PUBLIC|PRIVATE> "${CMAKE_CURRENT_BINARY_DIR}")
197
+
198
+ so that sources may include the header as ``#include <foo.h>``.
199
+
200
+ See Also
201
+ ^^^^^^^^
202
+
203
+ * :command:`file(GENERATE)`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/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.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/elseif.rst ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ elseif
2
+ ------
3
+
4
+ Starts an elseif portion of an if block.
5
+
6
+ .. code-block:: cmake
7
+
8
+ elseif(<condition>)
9
+
10
+ See the :command:`if` command, especially for the syntax and logic
11
+ of the ``<condition>``.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/enable_testing.rst ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ enable_testing
2
+ --------------
3
+
4
+ Enable testing for current directory and below.
5
+
6
+ .. code-block:: cmake
7
+
8
+ enable_testing()
9
+
10
+ Enables testing for this directory and below.
11
+
12
+ This command should be in the source directory root
13
+ because ctest expects to find a test file in the build
14
+ directory root.
15
+
16
+ This command is automatically invoked when the :module:`CTest`
17
+ module is included, except if the ``BUILD_TESTING`` option is
18
+ turned off.
19
+
20
+ See also the :command:`add_test` command.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/endfunction.rst ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ endfunction
2
+ -----------
3
+
4
+ Ends a list of commands in a function block.
5
+
6
+ .. code-block:: cmake
7
+
8
+ endfunction([<name>])
9
+
10
+ See the :command:`function` command.
11
+
12
+ The optional ``<name>`` argument is supported for backward compatibility
13
+ only. If used it must be a verbatim repeat of the ``<name>`` argument
14
+ of the opening ``function`` command.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/endmacro.rst ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ endmacro
2
+ --------
3
+
4
+ Ends a list of commands in a macro block.
5
+
6
+ .. code-block:: cmake
7
+
8
+ endmacro([<name>])
9
+
10
+ See the :command:`macro` command.
11
+
12
+ The optional ``<name>`` argument is supported for backward compatibility
13
+ only. If used it must be a verbatim repeat of the ``<name>`` argument
14
+ of the opening ``macro`` command.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/file.rst ADDED
@@ -0,0 +1,1342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ file
2
+ ----
3
+
4
+ File manipulation command.
5
+
6
+ This command is dedicated to file and path manipulation requiring access to the
7
+ filesystem.
8
+
9
+ For other path manipulation, handling only syntactic aspects, have a look at
10
+ :command:`cmake_path` command.
11
+
12
+ .. note::
13
+
14
+ The sub-commands `RELATIVE_PATH`_, `TO_CMAKE_PATH`_ and `TO_NATIVE_PATH`_ has
15
+ been superseded, respectively, by sub-commands
16
+ :ref:`RELATIVE_PATH <cmake_path-RELATIVE_PATH>`,
17
+ :ref:`CONVERT ... TO_CMAKE_PATH_LIST <cmake_path-TO_CMAKE_PATH_LIST>` and
18
+ :ref:`CONVERT ... TO_NATIVE_PATH_LIST <cmake_path-TO_NATIVE_PATH_LIST>` of
19
+ :command:`cmake_path` command.
20
+
21
+ Synopsis
22
+ ^^^^^^^^
23
+
24
+ .. parsed-literal::
25
+
26
+ `Reading`_
27
+ file(`READ`_ <filename> <out-var> [...])
28
+ file(`STRINGS`_ <filename> <out-var> [...])
29
+ file(`\<HASH\>`_ <filename> <out-var>)
30
+ file(`TIMESTAMP`_ <filename> <out-var> [...])
31
+
32
+ `Writing`_
33
+ file({`WRITE`_ | `APPEND`_} <filename> <content>...)
34
+ file({`TOUCH`_ | `TOUCH_NOCREATE`_} <file>...)
35
+ file(`GENERATE`_ OUTPUT <output-file> [...])
36
+ file(`CONFIGURE`_ OUTPUT <output-file> CONTENT <content> [...])
37
+
38
+ `Filesystem`_
39
+ file({`GLOB`_ | `GLOB_RECURSE`_} <out-var> [...] <globbing-expr>...)
40
+ file(`MAKE_DIRECTORY`_ <directories>...)
41
+ file({`REMOVE`_ | `REMOVE_RECURSE`_ } <files>...)
42
+ file(`RENAME`_ <oldname> <newname> [...])
43
+ file(`COPY_FILE`_ <oldname> <newname> [...])
44
+ file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...])
45
+ file(`SIZE`_ <filename> <out-var>)
46
+ file(`READ_SYMLINK`_ <linkname> <out-var>)
47
+ file(`CREATE_LINK`_ <original> <linkname> [...])
48
+ file(`CHMOD`_ <files>... <directories>... PERMISSIONS <permissions>... [...])
49
+ file(`CHMOD_RECURSE`_ <files>... <directories>... PERMISSIONS <permissions>... [...])
50
+
51
+ `Path Conversion`_
52
+ file(`REAL_PATH`_ <path> <out-var> [BASE_DIRECTORY <dir>] [EXPAND_TILDE])
53
+ file(`RELATIVE_PATH`_ <out-var> <directory> <file>)
54
+ file({`TO_CMAKE_PATH`_ | `TO_NATIVE_PATH`_} <path> <out-var>)
55
+
56
+ `Transfer`_
57
+ file(`DOWNLOAD`_ <url> [<file>] [...])
58
+ file(`UPLOAD`_ <file> <url> [...])
59
+
60
+ `Locking`_
61
+ file(`LOCK`_ <path> [...])
62
+
63
+ `Archiving`_
64
+ file(`ARCHIVE_CREATE`_ OUTPUT <archive> PATHS <paths>... [...])
65
+ file(`ARCHIVE_EXTRACT`_ INPUT <archive> [...])
66
+
67
+ `Handling Runtime Binaries`_
68
+ file(`GET_RUNTIME_DEPENDENCIES`_ [...])
69
+
70
+
71
+ Reading
72
+ ^^^^^^^
73
+
74
+ .. signature::
75
+ file(READ <filename> <variable>
76
+ [OFFSET <offset>] [LIMIT <max-in>] [HEX])
77
+
78
+ Read content from a file called ``<filename>`` and store it in a
79
+ ``<variable>``. Optionally start from the given ``<offset>`` and
80
+ read at most ``<max-in>`` bytes. The ``HEX`` option causes data to
81
+ be converted to a hexadecimal representation (useful for binary data).
82
+ If the ``HEX`` option is specified, letters in the output
83
+ (``a`` through ``f``) are in lowercase.
84
+
85
+ .. signature::
86
+ file(STRINGS <filename> <variable> <options>...)
87
+
88
+ Parse a list of ASCII strings from ``<filename>`` and store it in
89
+ ``<variable>``. Binary data in the file are ignored. Carriage return
90
+ (``\r``, CR) characters are ignored. The options are:
91
+
92
+ ``LENGTH_MAXIMUM <max-len>``
93
+ Consider only strings of at most a given length.
94
+
95
+ ``LENGTH_MINIMUM <min-len>``
96
+ Consider only strings of at least a given length.
97
+
98
+ ``LIMIT_COUNT <max-num>``
99
+ Limit the number of distinct strings to be extracted.
100
+
101
+ ``LIMIT_INPUT <max-in>``
102
+ Limit the number of input bytes to read from the file.
103
+
104
+ ``LIMIT_OUTPUT <max-out>``
105
+ Limit the number of total bytes to store in the ``<variable>``.
106
+
107
+ ``NEWLINE_CONSUME``
108
+ Treat newline characters (``\n``, LF) as part of string content
109
+ instead of terminating at them.
110
+
111
+ ``NO_HEX_CONVERSION``
112
+ Intel Hex and Motorola S-record files are automatically converted to
113
+ binary while reading unless this option is given.
114
+
115
+ ``REGEX <regex>``
116
+ Consider only strings that match the given regular expression,
117
+ as described under :ref:`string(REGEX) <Regex Specification>`.
118
+
119
+ .. versionchanged:: 3.29
120
+ Capture groups from the last match in the file are stored in
121
+ :variable:`CMAKE_MATCH_<n>`, similar to
122
+ :command:`string(REGEX MATCHALL)`. See policy :policy:`CMP0159`.
123
+
124
+ ``ENCODING <encoding-type>``
125
+ .. versionadded:: 3.1
126
+
127
+ Consider strings of a given encoding. Currently supported encodings are:
128
+ ``UTF-8``, ``UTF-16LE``, ``UTF-16BE``, ``UTF-32LE``, ``UTF-32BE``.
129
+ If the ``ENCODING`` option is not provided and the file
130
+ has a Byte Order Mark, the ``ENCODING`` option will be defaulted
131
+ to respect the Byte Order Mark.
132
+
133
+ .. versionadded:: 3.2
134
+ Added the ``UTF-16LE``, ``UTF-16BE``, ``UTF-32LE``, ``UTF-32BE`` encodings.
135
+
136
+ For example, the code
137
+
138
+ .. code-block:: cmake
139
+
140
+ file(STRINGS myfile.txt myfile)
141
+
142
+ stores a list in the variable ``myfile`` in which each item is a line
143
+ from the input file.
144
+
145
+ .. signature::
146
+ file(<HASH> <filename> <variable>)
147
+ :target: <HASH>
148
+
149
+ Compute a cryptographic hash of the content of ``<filename>`` and
150
+ store it in a ``<variable>``. The supported ``<HASH>`` algorithm names
151
+ are those listed by the :command:`string(<HASH>)` command.
152
+
153
+ .. signature::
154
+ file(TIMESTAMP <filename> <variable> [<format>] [UTC])
155
+
156
+ Compute a string representation of the modification time of ``<filename>``
157
+ and store it in ``<variable>``. Should the command be unable to obtain a
158
+ timestamp variable will be set to the empty string ("").
159
+
160
+ See the :command:`string(TIMESTAMP)` command for documentation of
161
+ the ``<format>`` and ``UTC`` options.
162
+
163
+ Writing
164
+ ^^^^^^^
165
+
166
+ .. signature::
167
+ file(WRITE <filename> <content>...)
168
+ file(APPEND <filename> <content>...)
169
+
170
+ Write ``<content>`` into a file called ``<filename>``. If the file does
171
+ not exist, it will be created. If the file already exists, ``WRITE``
172
+ mode will overwrite it and ``APPEND`` mode will append to the end.
173
+ Any directories in the path specified by ``<filename>`` that do not
174
+ exist will be created.
175
+
176
+ If the file is a build input, use the :command:`configure_file` command
177
+ to update the file only when its content changes.
178
+
179
+ .. signature::
180
+ file(TOUCH <files>...)
181
+ file(TOUCH_NOCREATE <files>...)
182
+
183
+ .. versionadded:: 3.12
184
+
185
+ Create a file with no content if it does not yet exist. If the file already
186
+ exists, its access and/or modification will be updated to the time when the
187
+ function call is executed.
188
+
189
+ Use ``TOUCH_NOCREATE`` to touch a file if it exists but not create it.
190
+ If a file does not exist it will be silently ignored.
191
+
192
+ With ``TOUCH`` and ``TOUCH_NOCREATE``, the contents of an existing file
193
+ will not be modified.
194
+
195
+ .. versionchanged:: 3.30
196
+ ``<files>`` can be an empty list. CMake 3.29 and earlier required
197
+ at least one file to be given.
198
+
199
+ .. signature::
200
+ file(GENERATE [...])
201
+
202
+ Generate an output file for each build configuration supported by the current
203
+ :manual:`CMake Generator <cmake-generators(7)>`. Evaluate
204
+ :manual:`generator expressions <cmake-generator-expressions(7)>`
205
+ from the input content to produce the output content.
206
+
207
+ .. code-block:: cmake
208
+
209
+ file(GENERATE OUTPUT <output-file>
210
+ <INPUT <input-file>|CONTENT <content>>
211
+ [CONDITION <expression>] [TARGET <target>]
212
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS |
213
+ FILE_PERMISSIONS <permissions>...]
214
+ [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
215
+
216
+ The options are:
217
+
218
+ ``CONDITION <condition>``
219
+ Generate the output file for a particular configuration only if
220
+ the condition is true. The condition must be either ``0`` or ``1``
221
+ after evaluating generator expressions.
222
+
223
+ ``CONTENT <content>``
224
+ Use the content given explicitly as input.
225
+
226
+ ``INPUT <input-file>``
227
+ Use the content from a given file as input.
228
+
229
+ .. versionchanged:: 3.10
230
+ A relative path is treated with respect to the value of
231
+ :variable:`CMAKE_CURRENT_SOURCE_DIR`. See policy :policy:`CMP0070`.
232
+
233
+ ``OUTPUT <output-file>``
234
+ Specify the output file name to generate. Use generator expressions
235
+ such as :genex:`$<CONFIG>` to specify a configuration-specific
236
+ output file name. Multiple configurations may generate the same output
237
+ file only if the generated content is identical. Otherwise, the
238
+ ``<output-file>`` must evaluate to an unique name for each configuration.
239
+
240
+ .. versionchanged:: 3.10
241
+ A relative path (after evaluating generator expressions) is treated
242
+ with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
243
+ See policy :policy:`CMP0070`.
244
+
245
+ ``TARGET <target>``
246
+ .. versionadded:: 3.19
247
+
248
+ Specify which target to use when evaluating generator expressions that
249
+ require a target for evaluation (e.g.
250
+ :genex:`$<COMPILE_FEATURES:...>`,
251
+ :genex:`$<TARGET_PROPERTY:prop>`).
252
+
253
+ ``NO_SOURCE_PERMISSIONS``
254
+ .. versionadded:: 3.20
255
+
256
+ The generated file permissions default to the standard 644 value
257
+ (-rw-r--r--).
258
+
259
+ ``USE_SOURCE_PERMISSIONS``
260
+ .. versionadded:: 3.20
261
+
262
+ Transfer the file permissions of the ``INPUT`` file to the generated
263
+ file. This is already the default behavior if none of the three
264
+ permissions-related keywords are given (``NO_SOURCE_PERMISSIONS``,
265
+ ``USE_SOURCE_PERMISSIONS`` or ``FILE_PERMISSIONS``). The
266
+ ``USE_SOURCE_PERMISSIONS`` keyword mostly serves as a way of making
267
+ the intended behavior clearer at the call site. It is an error to
268
+ specify this option without ``INPUT``.
269
+
270
+ ``FILE_PERMISSIONS <permissions>...``
271
+ .. versionadded:: 3.20
272
+
273
+ Use the specified permissions for the generated file.
274
+
275
+ ``NEWLINE_STYLE <style>``
276
+ .. versionadded:: 3.20
277
+
278
+ Specify the newline style for the generated file. Specify
279
+ ``UNIX`` or ``LF`` for ``\n`` newlines, or specify
280
+ ``DOS``, ``WIN32``, or ``CRLF`` for ``\r\n`` newlines.
281
+
282
+ Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific
283
+ ``OUTPUT`` file may be named by at most one invocation of ``file(GENERATE)``.
284
+ Generated files are modified and their timestamp updated on subsequent cmake
285
+ runs only if their content is changed.
286
+
287
+ Note also that ``file(GENERATE)`` does not create the output file until the
288
+ generation phase. The output file will not yet have been written when the
289
+ ``file(GENERATE)`` command returns, it is written only after processing all
290
+ of a project's ``CMakeLists.txt`` files.
291
+
292
+ .. signature::
293
+ file(CONFIGURE OUTPUT <output-file>
294
+ CONTENT <content>
295
+ [ESCAPE_QUOTES] [@ONLY]
296
+ [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
297
+ :target: CONFIGURE
298
+
299
+ .. versionadded:: 3.18
300
+
301
+ Generate an output file using the input given by ``CONTENT`` and substitute
302
+ variable values referenced as ``@VAR@`` or ``${VAR}`` contained therein. The
303
+ substitution rules behave the same as the :command:`configure_file` command.
304
+ In order to match :command:`configure_file`'s behavior, generator expressions
305
+ are not supported for both ``OUTPUT`` and ``CONTENT``, and the output file
306
+ is only modified and its timestamp updated if the content is changed or the
307
+ file previously didn't exist.
308
+
309
+ The arguments are:
310
+
311
+ ``OUTPUT <output-file>``
312
+ Specify the output file name to generate. A relative path is treated with
313
+ respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
314
+ ``<output-file>`` does not support generator expressions.
315
+
316
+ ``CONTENT <content>``
317
+ Use the content given explicitly as input.
318
+ ``<content>`` does not support generator expressions.
319
+
320
+ ``ESCAPE_QUOTES``
321
+ Escape any substituted quotes with backslashes (C-style).
322
+
323
+ ``@ONLY``
324
+ Restrict variable replacement to references of the form ``@VAR@``.
325
+ This is useful for configuring scripts that use ``${VAR}`` syntax.
326
+
327
+ ``NEWLINE_STYLE <style>``
328
+ Specify the newline style for the output file. Specify
329
+ ``UNIX`` or ``LF`` for ``\n`` newlines, or specify
330
+ ``DOS``, ``WIN32``, or ``CRLF`` for ``\r\n`` newlines.
331
+
332
+ Filesystem
333
+ ^^^^^^^^^^
334
+
335
+ .. signature::
336
+ file(GLOB <variable>
337
+ [LIST_DIRECTORIES true|false] [RELATIVE <path>] [CONFIGURE_DEPENDS]
338
+ <globbing-expressions>...)
339
+ file(GLOB_RECURSE <variable> [FOLLOW_SYMLINKS]
340
+ [LIST_DIRECTORIES true|false] [RELATIVE <path>] [CONFIGURE_DEPENDS]
341
+ <globbing-expressions>...)
342
+
343
+ Generate a list of files that match the ``<globbing-expressions>`` and
344
+ store it into the ``<variable>``. Globbing expressions are similar to
345
+ regular expressions, but much simpler. If ``RELATIVE`` flag is
346
+ specified, the results will be returned as relative paths to the given
347
+ path.
348
+
349
+ .. versionchanged:: 3.6
350
+ The results will be ordered lexicographically.
351
+
352
+ On Windows and macOS, globbing is case-insensitive even if the underlying
353
+ filesystem is case-sensitive (both filenames and globbing expressions are
354
+ converted to lowercase before matching). On other platforms, globbing is
355
+ case-sensitive.
356
+
357
+ .. versionadded:: 3.3
358
+ By default ``GLOB`` lists directories. Directories are omitted in the
359
+ result if ``LIST_DIRECTORIES`` is set to false.
360
+
361
+ .. versionadded:: 3.12
362
+ If the ``CONFIGURE_DEPENDS`` flag is specified, CMake will add logic
363
+ to the main build system check target to rerun the flagged ``GLOB``
364
+ commands at build time. If any of the outputs change, CMake will regenerate
365
+ the build system.
366
+
367
+ .. note::
368
+ We do not recommend using GLOB to collect a list of source files from
369
+ your source tree. If no CMakeLists.txt file changes when a source is
370
+ added or removed then the generated build system cannot know when to
371
+ ask CMake to regenerate.
372
+ The ``CONFIGURE_DEPENDS`` flag may not work reliably on all generators, or
373
+ if a new generator is added in the future that cannot support it, projects
374
+ using it will be stuck. Even if ``CONFIGURE_DEPENDS`` works reliably, there
375
+ is still a cost to perform the check on every rebuild.
376
+
377
+ Examples of globbing expressions include:
378
+
379
+ ============== ======================================================
380
+ ``*.cxx`` match all files with extension ``cxx``
381
+ ``*.vt?`` match all files with extension ``vta``, ..., ``vtz``
382
+ ``f[3-5].txt`` match files ``f3.txt``, ``f4.txt``, ``f5.txt``
383
+ ============== ======================================================
384
+
385
+ The ``GLOB_RECURSE`` mode will traverse all the subdirectories of the
386
+ matched directory and match the files. Subdirectories that are symlinks
387
+ are only traversed if ``FOLLOW_SYMLINKS`` is given or policy
388
+ :policy:`CMP0009` is not set to ``NEW``.
389
+
390
+ .. versionadded:: 3.3
391
+ By default ``GLOB_RECURSE`` omits directories from result list. Setting
392
+ ``LIST_DIRECTORIES`` to true adds directories to result list.
393
+ If ``FOLLOW_SYMLINKS`` is given or policy :policy:`CMP0009` is not set to
394
+ ``NEW`` then ``LIST_DIRECTORIES`` treats symlinks as directories.
395
+
396
+ Examples of recursive globbing include:
397
+
398
+ ============== ======================================================
399
+ ``/dir/*.py`` match all python files in ``/dir`` and subdirectories
400
+ ============== ======================================================
401
+
402
+ .. signature::
403
+ file(MAKE_DIRECTORY <directories>... [RESULT <result>])
404
+
405
+ Create the given directories and their parents as needed.
406
+
407
+ The options are:
408
+
409
+ ``RESULT <result>``
410
+ .. versionadded:: 3.31
411
+
412
+ Set ``<result>`` variable to ``0`` on success or an error message
413
+ otherwise. If ``RESULT`` is not specified and the operation fails,
414
+ an error is emitted.
415
+
416
+ .. versionchanged:: 3.30
417
+ ``<directories>`` can be an empty list. CMake 3.29 and earlier required
418
+ at least one directory to be given.
419
+
420
+ .. signature::
421
+ file(REMOVE <files>...)
422
+ file(REMOVE_RECURSE <files>...)
423
+
424
+ Remove the given files. The ``REMOVE_RECURSE`` mode will remove the given
425
+ files and directories, including non-empty directories. No error is emitted
426
+ if a given file does not exist. Relative input paths are evaluated with
427
+ respect to the current source directory.
428
+
429
+ .. versionchanged:: 3.15
430
+ Empty input paths are ignored with a warning. Previous versions of CMake
431
+ interpreted empty strings as a relative path with respect to the current
432
+ directory and removed its contents.
433
+
434
+ .. signature::
435
+ file(RENAME <oldname> <newname> [RESULT <result>] [NO_REPLACE])
436
+
437
+ Move a file or directory within a filesystem from ``<oldname>`` to
438
+ ``<newname>``, replacing the destination atomically.
439
+
440
+ The options are:
441
+
442
+ ``RESULT <result>``
443
+ .. versionadded:: 3.21
444
+
445
+ Set ``<result>`` variable to ``0`` on success or an error message
446
+ otherwise. If ``RESULT`` is not specified and the operation fails,
447
+ an error is emitted.
448
+
449
+ ``NO_REPLACE``
450
+ .. versionadded:: 3.21
451
+
452
+ If the ``<newname>`` path already exists, do not replace it.
453
+ If ``RESULT <result>`` is used, the result variable will be
454
+ set to ``NO_REPLACE``. Otherwise, an error is emitted.
455
+
456
+ .. signature::
457
+ file(COPY_FILE <oldname> <newname>
458
+ [RESULT <result>]
459
+ [ONLY_IF_DIFFERENT]
460
+ [INPUT_MAY_BE_RECENT])
461
+
462
+ .. versionadded:: 3.21
463
+
464
+ Copy a file from ``<oldname>`` to ``<newname>``. Directories are not
465
+ supported. Symlinks are ignored and ``<oldfile>``'s content is read and
466
+ written to ``<newname>`` as a new file.
467
+
468
+ The options are:
469
+
470
+ ``RESULT <result>``
471
+ Set ``<result>`` variable to ``0`` on success or an error message
472
+ otherwise. If ``RESULT`` is not specified and the operation fails,
473
+ an error is emitted.
474
+
475
+ ``ONLY_IF_DIFFERENT``
476
+ If the ``<newname>`` path already exists, do not replace it if the file's
477
+ contents are already the same as ``<oldname>`` (this avoids updating
478
+ ``<newname>``'s timestamp).
479
+
480
+ ``INPUT_MAY_BE_RECENT``
481
+ .. versionadded:: 3.26
482
+
483
+ Tell CMake that the input file may have been recently created. This is
484
+ meaningful only on Windows, where files may be inaccessible for a short
485
+ time after they are created. With this option, if permission is denied,
486
+ CMake will retry reading the input a few times.
487
+
488
+ This sub-command has some similarities to :command:`configure_file`
489
+ with the ``COPYONLY`` option. An important difference is that
490
+ :command:`configure_file` creates a dependency on the source file,
491
+ so CMake will be re-run if it changes. The ``file(COPY_FILE)``
492
+ sub-command does not create such a dependency.
493
+
494
+ See also the :command:`file(COPY)` sub-command just below which provides
495
+ further file-copying capabilities.
496
+
497
+ .. signature::
498
+ file(COPY [...])
499
+ file(INSTALL [...])
500
+
501
+ The ``COPY`` signature copies files, directories, and symlinks to a
502
+ destination folder. Relative input paths are evaluated with respect
503
+ to the current source directory, and a relative destination is
504
+ evaluated with respect to the current build directory. Copying
505
+ preserves input file timestamps, and optimizes out a file if it exists
506
+ at the destination with the same timestamp. Copying preserves input
507
+ permissions unless explicit permissions or ``NO_SOURCE_PERMISSIONS``
508
+ are given (default is ``USE_SOURCE_PERMISSIONS``).
509
+
510
+ .. code-block:: cmake
511
+
512
+ file(<COPY|INSTALL> <files>... DESTINATION <dir>
513
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS]
514
+ [FILE_PERMISSIONS <permissions>...]
515
+ [DIRECTORY_PERMISSIONS <permissions>...]
516
+ [FOLLOW_SYMLINK_CHAIN]
517
+ [FILES_MATCHING]
518
+ [[PATTERN <pattern> | REGEX <regex>]
519
+ [EXCLUDE] [PERMISSIONS <permissions>...]] [...])
520
+
521
+ .. note::
522
+
523
+ For a simple file copying operation, the :command:`file(COPY_FILE)`
524
+ sub-command just above may be easier to use.
525
+
526
+ .. versionadded:: 3.15
527
+ If ``FOLLOW_SYMLINK_CHAIN`` is specified, ``COPY`` will recursively resolve
528
+ the symlinks at the paths given until a real file is found, and install
529
+ a corresponding symlink in the destination for each symlink encountered.
530
+ For each symlink that is installed, the resolution is stripped of the
531
+ directory, leaving only the filename, meaning that the new symlink points
532
+ to a file in the same directory as the symlink. This feature is useful on
533
+ some Unix systems, where libraries are installed as a chain of symlinks
534
+ with version numbers, with less specific versions pointing to more specific
535
+ versions. ``FOLLOW_SYMLINK_CHAIN`` will install all of these symlinks and
536
+ the library itself into the destination directory. For example, if you have
537
+ the following directory structure:
538
+
539
+ * ``/opt/foo/lib/libfoo.so.1.2.3``
540
+ * ``/opt/foo/lib/libfoo.so.1.2 -> libfoo.so.1.2.3``
541
+ * ``/opt/foo/lib/libfoo.so.1 -> libfoo.so.1.2``
542
+ * ``/opt/foo/lib/libfoo.so -> libfoo.so.1``
543
+
544
+ and you do:
545
+
546
+ .. code-block:: cmake
547
+
548
+ file(COPY /opt/foo/lib/libfoo.so DESTINATION lib FOLLOW_SYMLINK_CHAIN)
549
+
550
+ This will install all of the symlinks and ``libfoo.so.1.2.3`` itself into
551
+ ``lib``.
552
+
553
+ See the :command:`install(DIRECTORY)` command for documentation of
554
+ permissions, ``FILES_MATCHING``, ``PATTERN``, ``REGEX``, and
555
+ ``EXCLUDE`` options. Copying directories preserves the structure
556
+ of their content even if options are used to select a subset of
557
+ files.
558
+
559
+ The ``INSTALL`` signature differs slightly from ``COPY``: it prints
560
+ status messages, and ``NO_SOURCE_PERMISSIONS`` is default. Installation
561
+ scripts generated by the :command:`install` command use this signature
562
+ (with some undocumented options for internal use).
563
+
564
+ .. versionchanged:: 3.22
565
+
566
+ The environment variable :envvar:`CMAKE_INSTALL_MODE` can override the
567
+ default copying behavior of :command:`file(INSTALL)`.
568
+
569
+ .. signature::
570
+ file(SIZE <filename> <variable>)
571
+
572
+ .. versionadded:: 3.14
573
+
574
+ Determine the file size of the ``<filename>`` and put the result in
575
+ ``<variable>`` variable. Requires that ``<filename>`` is a valid path
576
+ pointing to a file and is readable.
577
+
578
+ .. signature::
579
+ file(READ_SYMLINK <linkname> <variable>)
580
+
581
+ .. versionadded:: 3.14
582
+
583
+ Query the symlink ``<linkname>`` and stores the path it points to
584
+ in the result ``<variable>``. If ``<linkname>`` does not exist
585
+ or is not a symlink, CMake issues a fatal error.
586
+
587
+ Note that this command returns the raw symlink path and does not resolve
588
+ a relative path. The following is an example of how to ensure that an
589
+ absolute path is obtained:
590
+
591
+ .. code-block:: cmake
592
+
593
+ set(linkname "/path/to/foo.sym")
594
+ file(READ_SYMLINK "${linkname}" result)
595
+ if(NOT IS_ABSOLUTE "${result}")
596
+ get_filename_component(dir "${linkname}" DIRECTORY)
597
+ set(result "${dir}/${result}")
598
+ endif()
599
+
600
+ .. signature::
601
+ file(CREATE_LINK <original> <linkname>
602
+ [RESULT <result>] [COPY_ON_ERROR] [SYMBOLIC])
603
+
604
+ .. versionadded:: 3.14
605
+
606
+ Create a link ``<linkname>`` that points to ``<original>``.
607
+ It will be a hard link by default, but providing the ``SYMBOLIC`` option
608
+ results in a symbolic link instead. Hard links require that ``original``
609
+ exists and is a file, not a directory. If ``<linkname>`` already exists,
610
+ it will be overwritten.
611
+
612
+ The ``<result>`` variable, if specified, receives the status of the
613
+ operation. It is set to ``0`` upon success or an error message otherwise.
614
+ If ``RESULT`` is not specified and the operation fails, a fatal error is
615
+ emitted.
616
+
617
+ Specifying ``COPY_ON_ERROR`` enables copying the file as a fallback if
618
+ creating the link fails. It can be useful for handling situations such as
619
+ ``<original>`` and ``<linkname>`` being on different drives or mount points,
620
+ which would make them unable to support a hard link.
621
+
622
+ .. signature::
623
+ file(CHMOD <files>... <directories>...
624
+ [PERMISSIONS <permissions>...]
625
+ [FILE_PERMISSIONS <permissions>...]
626
+ [DIRECTORY_PERMISSIONS <permissions>...])
627
+
628
+ .. versionadded:: 3.19
629
+
630
+ Set the permissions for the ``<files>...`` and ``<directories>...``
631
+ specified. Valid permissions are ``OWNER_READ``, ``OWNER_WRITE``,
632
+ ``OWNER_EXECUTE``, ``GROUP_READ``, ``GROUP_WRITE``, ``GROUP_EXECUTE``,
633
+ ``WORLD_READ``, ``WORLD_WRITE``, ``WORLD_EXECUTE``, ``SETUID``, ``SETGID``.
634
+
635
+ Valid combination of keywords are:
636
+
637
+ ``PERMISSIONS``
638
+ All items are changed.
639
+
640
+ ``FILE_PERMISSIONS``
641
+ Only files are changed.
642
+
643
+ ``DIRECTORY_PERMISSIONS``
644
+ Only directories are changed.
645
+
646
+ ``PERMISSIONS`` and ``FILE_PERMISSIONS``
647
+ ``FILE_PERMISSIONS`` overrides ``PERMISSIONS`` for files.
648
+
649
+ ``PERMISSIONS`` and ``DIRECTORY_PERMISSIONS``
650
+ ``DIRECTORY_PERMISSIONS`` overrides ``PERMISSIONS`` for directories.
651
+
652
+ ``FILE_PERMISSIONS`` and ``DIRECTORY_PERMISSIONS``
653
+ Use ``FILE_PERMISSIONS`` for files and ``DIRECTORY_PERMISSIONS`` for
654
+ directories.
655
+
656
+ .. signature::
657
+ file(CHMOD_RECURSE <files>... <directories>...
658
+ [PERMISSIONS <permissions>...]
659
+ [FILE_PERMISSIONS <permissions>...]
660
+ [DIRECTORY_PERMISSIONS <permissions>...])
661
+
662
+ .. versionadded:: 3.19
663
+
664
+ Same as :cref:`CHMOD`, but change the permissions of files and directories
665
+ present in the ``<directories>...`` recursively.
666
+
667
+
668
+ Path Conversion
669
+ ^^^^^^^^^^^^^^^
670
+
671
+ .. signature::
672
+ file(REAL_PATH <path> <out-var> [BASE_DIRECTORY <dir>] [EXPAND_TILDE])
673
+
674
+ .. versionadded:: 3.19
675
+
676
+ Compute the absolute path to an existing file or directory with symlinks
677
+ resolved. The options are:
678
+
679
+ ``BASE_DIRECTORY <dir>``
680
+ If the provided ``<path>`` is a relative path, it is evaluated relative
681
+ to the given base directory ``<dir>``. If no base directory is provided,
682
+ the default base directory will be :variable:`CMAKE_CURRENT_SOURCE_DIR`.
683
+
684
+ ``EXPAND_TILDE``
685
+ .. versionadded:: 3.21
686
+
687
+ If the ``<path>`` is ``~`` or starts with ``~/``, the ``~`` is replaced
688
+ by the user's home directory. The path to the home directory is obtained
689
+ from environment variables. On Windows, the ``USERPROFILE`` environment
690
+ variable is used, falling back to the ``HOME`` environment variable
691
+ if ``USERPROFILE`` is not defined. On all other platforms, only ``HOME``
692
+ is used.
693
+
694
+ .. versionchanged:: 3.28
695
+
696
+ All symlinks are resolved before collapsing ``../`` components.
697
+ See policy :policy:`CMP0152`.
698
+
699
+ .. signature::
700
+ file(RELATIVE_PATH <variable> <directory> <file>)
701
+
702
+ Compute the relative path from a ``<directory>`` to a ``<file>`` and
703
+ store it in the ``<variable>``.
704
+
705
+ .. signature::
706
+ file(TO_CMAKE_PATH "<path>" <variable>)
707
+ file(TO_NATIVE_PATH "<path>" <variable>)
708
+
709
+ The ``TO_CMAKE_PATH`` mode converts a native ``<path>`` into a cmake-style
710
+ path with forward-slashes (``/``). The input can be a single path or a
711
+ system search path like ``$ENV{PATH}``. A search path will be converted
712
+ to a cmake-style list separated by ``;`` characters.
713
+
714
+ The ``TO_NATIVE_PATH`` mode converts a cmake-style ``<path>`` into a native
715
+ path with platform-specific slashes (``\`` on Windows hosts and ``/``
716
+ elsewhere).
717
+
718
+ Always use double quotes around the ``<path>`` to be sure it is treated
719
+ as a single argument to this command.
720
+
721
+ Transfer
722
+ ^^^^^^^^
723
+
724
+ .. signature::
725
+ file(DOWNLOAD <url> [<file>] <options>...)
726
+ file(UPLOAD <file> <url> <options>...)
727
+
728
+ The ``DOWNLOAD`` subcommand downloads the given ``<url>`` to a local
729
+ ``<file>``. The ``UPLOAD`` mode uploads a local ``<file>`` to a given
730
+ ``<url>``.
731
+
732
+ .. versionadded:: 3.19
733
+ If ``<file>`` is not specified for ``file(DOWNLOAD)``, the file is not
734
+ saved. This can be useful if you want to know if a file can be downloaded
735
+ (for example, to check that it exists) without actually saving it anywhere.
736
+
737
+ Options to both ``DOWNLOAD`` and ``UPLOAD`` are:
738
+
739
+ ``INACTIVITY_TIMEOUT <seconds>``
740
+ Terminate the operation after a period of inactivity.
741
+
742
+ ``LOG <variable>``
743
+ Store a human-readable log of the operation in a variable.
744
+
745
+ ``SHOW_PROGRESS``
746
+ Print progress information as status messages until the operation is
747
+ complete.
748
+
749
+ ``STATUS <variable>``
750
+ Store the resulting status of the operation in a variable.
751
+ The status is a ``;`` separated list of length 2.
752
+ The first element is the numeric return value for the operation,
753
+ and the second element is a string value for the error.
754
+ A ``0`` numeric error means no error in the operation.
755
+
756
+ ``TIMEOUT <seconds>``
757
+ Terminate the operation after a given total time has elapsed.
758
+
759
+ ``USERPWD <username>:<password>``
760
+ .. versionadded:: 3.7
761
+
762
+ Set username and password for operation.
763
+
764
+ ``HTTPHEADER <HTTP-header>``
765
+ .. versionadded:: 3.7
766
+
767
+ HTTP header for ``DOWNLOAD`` and ``UPLOAD`` operations. ``HTTPHEADER``
768
+ can be repeated for multiple options:
769
+
770
+ .. code-block:: cmake
771
+
772
+ file(DOWNLOAD <url>
773
+ HTTPHEADER "Authorization: Bearer <auth-token>"
774
+ HTTPHEADER "UserAgent: Mozilla/5.0")
775
+
776
+ ``NETRC <level>``
777
+ .. versionadded:: 3.11
778
+
779
+ Specify whether the .netrc file is to be used for operation. If this
780
+ option is not specified, the value of the :variable:`CMAKE_NETRC`
781
+ variable will be used instead.
782
+
783
+ Valid levels are:
784
+
785
+ ``IGNORED``
786
+ The .netrc file is ignored.
787
+ This is the default.
788
+
789
+ ``OPTIONAL``
790
+ The .netrc file is optional, and information in the URL is preferred.
791
+ The file will be scanned to find which ever information is not
792
+ specified in the URL.
793
+
794
+ ``REQUIRED``
795
+ The .netrc file is required, and information in the URL is ignored.
796
+
797
+ ``NETRC_FILE <file>``
798
+ .. versionadded:: 3.11
799
+
800
+ Specify an alternative .netrc file to the one in your home directory,
801
+ if the ``NETRC`` level is ``OPTIONAL`` or ``REQUIRED``. If this option
802
+ is not specified, the value of the :variable:`CMAKE_NETRC_FILE` variable
803
+ will be used instead.
804
+
805
+ ``TLS_VERSION <min>``
806
+ .. versionadded:: 3.30
807
+
808
+ Specify minimum TLS version for ``https://`` URLs.
809
+ If this option is not specified, the value of the
810
+ :variable:`CMAKE_TLS_VERSION` variable or :envvar:`CMAKE_TLS_VERSION`
811
+ environment variable will be used instead.
812
+ See :variable:`CMAKE_TLS_VERSION` for allowed values.
813
+
814
+ .. versionchanged:: 3.31
815
+ The default is TLS 1.2.
816
+ Previously, no minimum version was enforced by default.
817
+
818
+ ``TLS_VERIFY <ON|OFF>``
819
+ Specify whether to verify the server certificate for ``https://`` URLs.
820
+ If this option is not specified, the value of the
821
+ :variable:`CMAKE_TLS_VERIFY` variable or :envvar:`CMAKE_TLS_VERIFY`
822
+ environment variable will be used instead.
823
+ If neither is set, the default is *on*.
824
+
825
+ .. versionchanged:: 3.31
826
+ The default is on. Previously, the default was off.
827
+ Users may set the :envvar:`CMAKE_TLS_VERIFY` environment
828
+ variable to ``0`` to restore the old default.
829
+
830
+ .. versionadded:: 3.18
831
+ Added support to ``file(UPLOAD)``.
832
+
833
+ ``TLS_CAINFO <file>``
834
+ Specify a custom Certificate Authority file for ``https://`` URLs.
835
+ If this option is not specified, the value of the
836
+ :variable:`CMAKE_TLS_CAINFO` variable will be used instead.
837
+
838
+ .. versionadded:: 3.18
839
+ Added support to ``file(UPLOAD)``.
840
+
841
+ For ``https://`` URLs CMake must be built with SSL/TLS support.
842
+
843
+ Additional options to ``DOWNLOAD`` are:
844
+
845
+ ``EXPECTED_HASH <algorithm>=<value>``
846
+ Verify that the downloaded content hash matches the expected value, where
847
+ ``<algorithm>`` is one of the algorithms supported by :cref:`<HASH>`.
848
+ If the file already exists and matches the hash, the download is skipped.
849
+ If the file already exists and does not match the hash, the file is
850
+ downloaded again. If after download the file does not match the hash, the
851
+ operation fails with an error. It is an error to specify this option if
852
+ ``DOWNLOAD`` is not given a ``<file>``.
853
+
854
+ ``EXPECTED_MD5 <value>``
855
+ Historical short-hand for ``EXPECTED_HASH MD5=<value>``. It is an error
856
+ to specify this if ``DOWNLOAD`` is not given a ``<file>``.
857
+
858
+ ``RANGE_START <value>``
859
+ .. versionadded:: 3.24
860
+
861
+ Offset of the start of the range in file in bytes. Could be omitted to
862
+ download up to the specified ``RANGE_END``.
863
+
864
+ ``RANGE_END <value>``
865
+ .. versionadded:: 3.24
866
+
867
+ Offset of the end of the range in file in bytes. Could be omitted to
868
+ download everything from the specified ``RANGE_START`` to the end of
869
+ file.
870
+
871
+ Locking
872
+ ^^^^^^^
873
+
874
+ .. signature::
875
+ file(LOCK <path> [DIRECTORY] [RELEASE]
876
+ [GUARD <FUNCTION|FILE|PROCESS>]
877
+ [RESULT_VARIABLE <variable>]
878
+ [TIMEOUT <seconds>])
879
+
880
+ .. versionadded:: 3.2
881
+
882
+ Lock a file specified by ``<path>`` if no ``DIRECTORY`` option present and
883
+ file ``<path>/cmake.lock`` otherwise. The file will be locked for the scope
884
+ defined by the ``GUARD`` option (default value is ``PROCESS``). The
885
+ ``RELEASE`` option can be used to unlock the file explicitly. If the
886
+ ``TIMEOUT`` option is not specified, CMake will wait until the lock succeeds
887
+ or until a fatal error occurs. If ``TIMEOUT`` is set to ``0``, locking will
888
+ be tried once and the result will be reported immediately. If ``TIMEOUT``
889
+ is not ``0``, CMake will try to lock the file for the period specified by
890
+ the ``TIMEOUT <seconds>`` value. Any errors will be interpreted as fatal if
891
+ there is no ``RESULT_VARIABLE`` option. Otherwise, the result will be stored
892
+ in ``<variable>`` and will be ``0`` on success or an error message on
893
+ failure.
894
+
895
+ Note that lock is advisory; there is no guarantee that other processes will
896
+ respect this lock, i.e. lock synchronize two or more CMake instances sharing
897
+ some modifiable resources. Similar logic applies to the ``DIRECTORY`` option;
898
+ locking a parent directory doesn't prevent other ``LOCK`` commands from
899
+ locking any child directory or file.
900
+
901
+ Trying to lock the same file twice is not allowed. Any intermediate
902
+ directories and the file itself will be created if they not exist. The
903
+ ``GUARD`` and ``TIMEOUT`` options are ignored on the ``RELEASE`` operation.
904
+
905
+ Archiving
906
+ ^^^^^^^^^
907
+
908
+ .. signature::
909
+ file(ARCHIVE_CREATE OUTPUT <archive>
910
+ PATHS <paths>...
911
+ [FORMAT <format>]
912
+ [COMPRESSION <compression>
913
+ [COMPRESSION_LEVEL <compression-level>]]
914
+ [MTIME <mtime>]
915
+ [WORKING_DIRECTORY <dir>]
916
+ [VERBOSE])
917
+ :target: ARCHIVE_CREATE
918
+ :break: verbatim
919
+
920
+ .. versionadded:: 3.18
921
+
922
+ Creates the specified ``<archive>`` file with the files and directories
923
+ listed in ``<paths>``. Note that ``<paths>`` must list actual files or
924
+ directories; wildcards are not supported.
925
+
926
+ The options are:
927
+
928
+ ``FORMAT <format>``
929
+ Specify the archive format. Supported values for ``<format>`` are
930
+ ``7zip``, ``gnutar``, ``pax``, ``paxr``, ``raw`` and ``zip``.
931
+ If ``FORMAT`` is not given, the default format is ``paxr``.
932
+
933
+ ``COMPRESSION <compression>``
934
+ Some archive formats allow the type of compression to be specified.
935
+ The ``7zip`` and ``zip`` archive formats already imply a specific type of
936
+ compression. The other formats use no compression by default, but can be
937
+ directed to do so with the ``COMPRESSION`` option. Valid values for
938
+ ``<compression>`` are ``None``, ``BZip2``, ``GZip``, ``XZ``, and ``Zstd``.
939
+
940
+ .. note::
941
+ With ``FORMAT`` set to ``raw``, only one file will be compressed
942
+ with the compression type specified by ``COMPRESSION``.
943
+
944
+ ``COMPRESSION_LEVEL <compression-level>``
945
+ .. versionadded:: 3.19
946
+
947
+ The compression level can be specified with the ``COMPRESSION_LEVEL``
948
+ option. The ``<compression-level>`` should be between 0-9, with the
949
+ default being 0. The ``COMPRESSION`` option must be present when
950
+ ``COMPRESSION_LEVEL`` is given.
951
+
952
+ .. versionadded:: 3.26
953
+ The ``<compression-level>`` of the ``Zstd`` algorithm can be set
954
+ between 0-19.
955
+
956
+ ``MTIME <mtime>``
957
+ Specify the modification time recorded in tarball entries.
958
+
959
+ ``WORKING_DIRECTORY <dir>``
960
+ .. versionadded:: 3.31
961
+
962
+ Specify the directory in which the archive creation operation will
963
+ be executed. Paths in the ``<paths>`` argument can be relative to
964
+ this directory. If this option is not provided, the current working
965
+ directory will be used by default.
966
+
967
+ ``VERBOSE``
968
+ Enable verbose output from the archive operation.
969
+
970
+ .. signature::
971
+ file(ARCHIVE_EXTRACT
972
+ INPUT <archive>
973
+ [DESTINATION <dir>]
974
+ [PATTERNS <pattern>...]
975
+ [LIST_ONLY]
976
+ [VERBOSE]
977
+ [TOUCH])
978
+ :target: ARCHIVE_EXTRACT
979
+
980
+ .. versionadded:: 3.18
981
+
982
+ Extracts or lists the content of the specified ``<archive>``.
983
+
984
+ The options are:
985
+
986
+ ``DESTINATION <dir>``
987
+ Specify the directory under which the content of the archive will be
988
+ extracted. If the directory does not exist, it will be created.
989
+ If ``DESTINATION`` is not given, the current binary directory will
990
+ be used.
991
+
992
+ ``PATTERNS <pattern>...``
993
+ Extract/list only files and directories that match one of the given
994
+ patterns. Wildcards are supported. If the ``PATTERNS`` option is
995
+ not given, the entire archive will be listed or extracted.
996
+
997
+ ``LIST_ONLY``
998
+ List the files in the archive rather than extract them.
999
+
1000
+ ``TOUCH``
1001
+ .. versionadded:: 3.24
1002
+
1003
+ Give extracted files a current local timestamp instead of extracting
1004
+ file timestamps from the archive.
1005
+
1006
+ ``VERBOSE``
1007
+ Enable verbose output from the extraction operation.
1008
+
1009
+ .. note::
1010
+ The working directory for this subcommand is the ``DESTINATION`` directory
1011
+ (provided or computed) except when ``LIST_ONLY`` is specified. Therefore,
1012
+ outside of script mode, it may be best to provide absolute paths to
1013
+ ``INPUT`` archives as they are unlikely to be extracted where a relative
1014
+ path works.
1015
+
1016
+ Handling Runtime Binaries
1017
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
1018
+
1019
+ .. signature::
1020
+ file(GET_RUNTIME_DEPENDENCIES [...])
1021
+
1022
+ .. versionadded:: 3.16
1023
+
1024
+ Recursively get the list of libraries depended on by the given files:
1025
+
1026
+ .. code-block:: cmake
1027
+
1028
+ file(GET_RUNTIME_DEPENDENCIES
1029
+ [RESOLVED_DEPENDENCIES_VAR <deps_var>]
1030
+ [UNRESOLVED_DEPENDENCIES_VAR <unresolved_deps_var>]
1031
+ [CONFLICTING_DEPENDENCIES_PREFIX <conflicting_deps_prefix>]
1032
+ [EXECUTABLES <executable_files>...]
1033
+ [LIBRARIES <library_files>...]
1034
+ [MODULES <module_files>...]
1035
+ [DIRECTORIES <directories>...]
1036
+ [BUNDLE_EXECUTABLE <bundle_executable_file>]
1037
+ [PRE_INCLUDE_REGEXES <regexes>...]
1038
+ [PRE_EXCLUDE_REGEXES <regexes>...]
1039
+ [POST_INCLUDE_REGEXES <regexes>...]
1040
+ [POST_EXCLUDE_REGEXES <regexes>...]
1041
+ [POST_INCLUDE_FILES <files>...]
1042
+ [POST_EXCLUDE_FILES <files>...]
1043
+ )
1044
+
1045
+ Please note that this sub-command is not intended to be used in project mode.
1046
+ It is intended for use at install time, either from code generated by the
1047
+ :command:`install(RUNTIME_DEPENDENCY_SET)` command, or from code provided by
1048
+ the project via :command:`install(CODE)` or :command:`install(SCRIPT)`.
1049
+ For example:
1050
+
1051
+ .. code-block:: cmake
1052
+
1053
+ install(CODE [[
1054
+ file(GET_RUNTIME_DEPENDENCIES
1055
+ # ...
1056
+ )
1057
+ ]])
1058
+
1059
+ The arguments are as follows:
1060
+
1061
+ ``RESOLVED_DEPENDENCIES_VAR <deps_var>``
1062
+ Name of the variable in which to store the list of resolved dependencies.
1063
+
1064
+ ``UNRESOLVED_DEPENDENCIES_VAR <unresolved_deps_var>``
1065
+ Name of the variable in which to store the list of unresolved
1066
+ dependencies. If this variable is not specified, and there are any
1067
+ unresolved dependencies, an error is issued.
1068
+
1069
+ ``CONFLICTING_DEPENDENCIES_PREFIX <conflicting_deps_prefix>``
1070
+ Variable prefix in which to store conflicting dependency information.
1071
+ Dependencies are conflicting if two files with the same name are found in
1072
+ two different directories. The list of filenames that conflict are stored
1073
+ in ``<conflicting_deps_prefix>_FILENAMES``. For each filename, the list
1074
+ of paths that were found for that filename are stored in
1075
+ ``<conflicting_deps_prefix>_<filename>``.
1076
+
1077
+ ``EXECUTABLES <executable_files>...``
1078
+ List of executable files to read for dependencies. These are executables
1079
+ that are typically created with :command:`add_executable`, but they do
1080
+ not have to be created by CMake. On Apple platforms, the paths to these
1081
+ files determine the value of ``@executable_path`` when recursively
1082
+ resolving the libraries. Specifying any kind of library (``STATIC``,
1083
+ ``MODULE``, or ``SHARED``) here will result in undefined behavior.
1084
+
1085
+ ``LIBRARIES <library_files>...``
1086
+ List of library files to read for dependencies. These are libraries that
1087
+ are typically created with :command:`add_library(SHARED)`, but they do
1088
+ not have to be created by CMake. Specifying ``STATIC`` libraries,
1089
+ ``MODULE`` libraries, or executables here will result in undefined
1090
+ behavior.
1091
+
1092
+ ``MODULES <module_files>...``
1093
+ List of loadable module files to read for dependencies. These are modules
1094
+ that are typically created with :command:`add_library(MODULE)`, but they
1095
+ do not have to be created by CMake. They are typically used by calling
1096
+ ``dlopen()`` at runtime rather than linked at link time with ``ld -l``.
1097
+ Specifying ``STATIC`` libraries, ``SHARED`` libraries, or executables
1098
+ here will result in undefined behavior.
1099
+
1100
+ ``DIRECTORIES <directories>...``
1101
+ List of additional directories to search for dependencies. On Linux
1102
+ platforms, these directories are searched if the dependency is not found
1103
+ in any of the other usual paths. If it is found in such a directory, a
1104
+ warning is issued, because it means that the file is incomplete (it does
1105
+ not list all of the directories that contain its dependencies).
1106
+ On Windows platforms, these directories are searched if the dependency
1107
+ is not found in any of the other search paths, but no warning is issued,
1108
+ because searching other paths is a normal part of Windows dependency
1109
+ resolution. On Apple platforms, this argument has no effect.
1110
+
1111
+ ``BUNDLE_EXECUTABLE <bundle_executable_file>``
1112
+ Executable to treat as the "bundle executable" when resolving libraries.
1113
+ On Apple platforms, this argument determines the value of
1114
+ ``@executable_path`` when recursively resolving libraries for
1115
+ ``LIBRARIES`` and ``MODULES`` files. It has no effect on ``EXECUTABLES``
1116
+ files. On other platforms, it has no effect. This is typically (but not
1117
+ always) one of the executables in the ``EXECUTABLES`` argument which
1118
+ designates the "main" executable of the package.
1119
+
1120
+ The following arguments specify filters for including or excluding libraries
1121
+ to be resolved. See below for a full description of how they work.
1122
+
1123
+ ``PRE_INCLUDE_REGEXES <regexes>...``
1124
+ List of pre-include regexes through which to filter the names of
1125
+ not-yet-resolved dependencies.
1126
+
1127
+ ``PRE_EXCLUDE_REGEXES <regexes>...``
1128
+ List of pre-exclude regexes through which to filter the names of
1129
+ not-yet-resolved dependencies.
1130
+
1131
+ ``POST_INCLUDE_REGEXES <regexes>...``
1132
+ List of post-include regexes through which to filter the names of
1133
+ resolved dependencies.
1134
+
1135
+ ``POST_EXCLUDE_REGEXES <regexes>...``
1136
+ List of post-exclude regexes through which to filter the names of
1137
+ resolved dependencies.
1138
+
1139
+ ``POST_INCLUDE_FILES <files>...``
1140
+ .. versionadded:: 3.21
1141
+
1142
+ List of post-include filenames through which to filter the names of
1143
+ resolved dependencies. Symlinks are resolved when attempting to match
1144
+ these filenames.
1145
+
1146
+ ``POST_EXCLUDE_FILES <files>...``
1147
+ .. versionadded:: 3.21
1148
+
1149
+ List of post-exclude filenames through which to filter the names of
1150
+ resolved dependencies. Symlinks are resolved when attempting to match
1151
+ these filenames.
1152
+
1153
+ These arguments can be used to exclude unwanted system libraries when
1154
+ resolving the dependencies, or to include libraries from a specific
1155
+ directory. The filtering works as follows:
1156
+
1157
+ 1. If the not-yet-resolved dependency matches any of the
1158
+ ``PRE_INCLUDE_REGEXES``, steps 2 and 3 are skipped, and the dependency
1159
+ resolution proceeds to step 4.
1160
+
1161
+ 2. If the not-yet-resolved dependency matches any of the
1162
+ ``PRE_EXCLUDE_REGEXES``, dependency resolution stops for that dependency.
1163
+
1164
+ 3. Otherwise, dependency resolution proceeds.
1165
+
1166
+ 4. ``file(GET_RUNTIME_DEPENDENCIES)`` searches for the dependency according
1167
+ to the linking rules of the platform (see below).
1168
+
1169
+ 5. If the dependency is found, and its full path matches one of the
1170
+ ``POST_INCLUDE_REGEXES`` or ``POST_INCLUDE_FILES``, the full path is added
1171
+ to the resolved dependencies, and ``file(GET_RUNTIME_DEPENDENCIES)``
1172
+ recursively resolves that library's own dependencies. Otherwise, resolution
1173
+ proceeds to step 6.
1174
+
1175
+ 6. If the dependency is found, but its full path matches one of the
1176
+ ``POST_EXCLUDE_REGEXES`` or ``POST_EXCLUDE_FILES``, it is not added to the
1177
+ resolved dependencies, and dependency resolution stops for that dependency.
1178
+
1179
+ 7. If the dependency is found, and its full path does not match either
1180
+ ``POST_INCLUDE_REGEXES``, ``POST_INCLUDE_FILES``, ``POST_EXCLUDE_REGEXES``,
1181
+ or ``POST_EXCLUDE_FILES``, the full path is added to the resolved
1182
+ dependencies, and ``file(GET_RUNTIME_DEPENDENCIES)`` recursively resolves
1183
+ that library's own dependencies.
1184
+
1185
+ Different platforms have different rules for how dependencies are resolved.
1186
+ These specifics are described here.
1187
+
1188
+ On Linux platforms, library resolution works as follows:
1189
+
1190
+ 1. If the depending file does not have any ``RUNPATH`` entries, and the
1191
+ library exists in one of the depending file's ``RPATH`` entries, or its
1192
+ parents', in that order, the dependency is resolved to that file.
1193
+ 2. Otherwise, if the depending file has any ``RUNPATH`` entries, and the
1194
+ library exists in one of those entries, the dependency is resolved to that
1195
+ file.
1196
+ 3. Otherwise, if the library exists in one of the directories listed by
1197
+ ``ldconfig``, the dependency is resolved to that file.
1198
+ 4. Otherwise, if the library exists in one of the ``DIRECTORIES`` entries,
1199
+ the dependency is resolved to that file. In this case, a warning is
1200
+ issued, because finding a file in one of the ``DIRECTORIES`` means that
1201
+ the depending file is not complete (it does not list all the directories
1202
+ from which it pulls dependencies).
1203
+
1204
+ 5. Otherwise, the dependency is unresolved.
1205
+
1206
+ .. versionchanged:: 3.31
1207
+
1208
+ Resolution of each encountered library file name occurs at most once
1209
+ while processing a given root ELF file (executable or shared object).
1210
+ If a library file name is encountered again in the dependency tree,
1211
+ the original resolution is assumed. This behavior more closely matches
1212
+ the dynamic loader's behavior on Linux.
1213
+
1214
+ On Windows platforms, library resolution works as follows:
1215
+
1216
+ 1. DLL dependency names are converted to lowercase for matching filters.
1217
+ Windows DLL names are case-insensitive, and some linkers mangle the
1218
+ case of the DLL dependency names. However, this makes it more difficult
1219
+ for ``PRE_INCLUDE_REGEXES``, ``PRE_EXCLUDE_REGEXES``,
1220
+ ``POST_INCLUDE_REGEXES``, and ``POST_EXCLUDE_REGEXES`` to properly
1221
+ filter DLL names - every regex would have to check for both uppercase
1222
+ and lowercase letters. For example:
1223
+
1224
+ .. code-block:: cmake
1225
+
1226
+ file(GET_RUNTIME_DEPENDENCIES
1227
+ # ...
1228
+ PRE_INCLUDE_REGEXES "^[Mm][Yy][Ll][Ii][Bb][Rr][Aa][Rr][Yy]\\.[Dd][Ll][Ll]$"
1229
+ )
1230
+
1231
+ Converting the DLL name to lowercase allows the regexes to only match
1232
+ lowercase names, thus simplifying the regex. For example:
1233
+
1234
+ .. code-block:: cmake
1235
+
1236
+ file(GET_RUNTIME_DEPENDENCIES
1237
+ # ...
1238
+ PRE_INCLUDE_REGEXES "^mylibrary\\.dll$"
1239
+ )
1240
+
1241
+ This regex will match ``mylibrary.dll`` regardless of how it is cased,
1242
+ either on disk or in the depending file. (For example, it will match
1243
+ ``mylibrary.dll``, ``MyLibrary.dll``, and ``MYLIBRARY.DLL``.)
1244
+
1245
+ .. versionchanged:: 3.27
1246
+
1247
+ The conversion to lowercase only applies while matching filters.
1248
+ Results reported after filtering case-preserve each DLL name as it is
1249
+ found on disk, if resolved, and otherwise as it is referenced by the
1250
+ dependent binary.
1251
+
1252
+ Prior to CMake 3.27, the results were reported with lowercase DLL
1253
+ file names, but the directory portion retained its casing.
1254
+
1255
+ 2. (**Not yet implemented**) If the depending file is a Windows Store app,
1256
+ and the dependency is listed as a dependency in the application's package
1257
+ manifest, the dependency is resolved to that file.
1258
+
1259
+ 3. Otherwise, if the library exists in the same directory as the depending
1260
+ file, the dependency is resolved to that file.
1261
+
1262
+ 4. Otherwise, if the library exists in either the operating system's
1263
+ ``system32`` directory or the ``Windows`` directory, in that order, the
1264
+ dependency is resolved to that file.
1265
+
1266
+ 5. Otherwise, if the library exists in one of the directories specified by
1267
+ ``DIRECTORIES``, in the order they are listed, the dependency is resolved
1268
+ to that file. In this case, a warning is not issued, because searching
1269
+ other directories is a normal part of Windows library resolution.
1270
+
1271
+ 6. Otherwise, the dependency is unresolved.
1272
+
1273
+ On Apple platforms, library resolution works as follows:
1274
+
1275
+ 1. If the dependency starts with ``@executable_path/``, and an
1276
+ ``EXECUTABLES`` argument is in the process of being resolved, and
1277
+ replacing ``@executable_path/`` with the directory of the executable
1278
+ yields an existing file, the dependency is resolved to that file.
1279
+
1280
+ 2. Otherwise, if the dependency starts with ``@executable_path/``, and there
1281
+ is a ``BUNDLE_EXECUTABLE`` argument, and replacing ``@executable_path/``
1282
+ with the directory of the bundle executable yields an existing file, the
1283
+ dependency is resolved to that file.
1284
+
1285
+ 3. Otherwise, if the dependency starts with ``@loader_path/``, and replacing
1286
+ ``@loader_path/`` with the directory of the depending file yields an
1287
+ existing file, the dependency is resolved to that file.
1288
+
1289
+ 4. Otherwise, if the dependency starts with ``@rpath/``, and replacing
1290
+ ``@rpath/`` with one of the ``RPATH`` entries of the depending file
1291
+ yields an existing file, the dependency is resolved to that file.
1292
+ Note that ``RPATH`` entries that start with ``@executable_path/`` or
1293
+ ``@loader_path/`` also have these items replaced with the appropriate
1294
+ path.
1295
+
1296
+ 5. Otherwise, if the dependency is an absolute file that exists,
1297
+ the dependency is resolved to that file.
1298
+
1299
+ 6. Otherwise, the dependency is unresolved.
1300
+
1301
+ This function accepts several variables that determine which tool is used for
1302
+ dependency resolution:
1303
+
1304
+ .. variable:: CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM
1305
+
1306
+ Determines which operating system and executable format the files are built
1307
+ for. This could be one of several values:
1308
+
1309
+ * ``linux+elf``
1310
+ * ``windows+pe``
1311
+ * ``macos+macho``
1312
+
1313
+ If this variable is not specified, it is determined automatically by system
1314
+ introspection.
1315
+
1316
+ .. variable:: CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL
1317
+
1318
+ Determines the tool to use for dependency resolution. It could be one of
1319
+ several values, depending on the value of
1320
+ :variable:`CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM`:
1321
+
1322
+ ================================================= =============================================
1323
+ ``CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM`` ``CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL``
1324
+ ================================================= =============================================
1325
+ ``linux+elf`` ``objdump``
1326
+ ``windows+pe`` ``objdump`` or ``dumpbin``
1327
+ ``macos+macho`` ``otool``
1328
+ ================================================= =============================================
1329
+
1330
+ If this variable is not specified, it is determined automatically by system
1331
+ introspection.
1332
+
1333
+ .. variable:: CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND
1334
+
1335
+ Determines the path to the tool to use for dependency resolution. This is
1336
+ the actual path to ``objdump``, ``dumpbin``, or ``otool``.
1337
+
1338
+ If this variable is not specified, it is determined by the value of
1339
+ ``CMAKE_OBJDUMP`` if set, else by system introspection.
1340
+
1341
+ .. versionadded:: 3.18
1342
+ Use ``CMAKE_OBJDUMP`` if set.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/find_library.rst ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ find_library
2
+ ------------
3
+
4
+ .. |FIND_XXX| replace:: find_library
5
+ .. |NAMES| replace:: NAMES name1 [name2 ...] [NAMES_PER_DIR]
6
+ .. |SEARCH_XXX| replace:: library
7
+ .. |SEARCH_XXX_DESC| replace:: library
8
+ .. |prefix_XXX_SUBDIR| replace:: ``<prefix>/lib``
9
+ .. |entry_XXX_SUBDIR| replace:: ``<entry>/lib``
10
+
11
+ .. |FIND_XXX_REGISTRY_VIEW_DEFAULT| replace:: ``TARGET``
12
+
13
+ .. |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX| replace::
14
+ ``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
15
+ and |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX_SUBDIR|
16
+ .. |CMAKE_PREFIX_PATH_XXX| replace::
17
+ ``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
18
+ and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
19
+ .. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_LIBRARY_PATH`
20
+ .. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
21
+
22
+ .. |ENV_CMAKE_PREFIX_PATH_XXX| replace::
23
+ ``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
24
+ and |ENV_CMAKE_PREFIX_PATH_XXX_SUBDIR|
25
+ .. |ENV_CMAKE_XXX_PATH| replace:: :envvar:`CMAKE_LIBRARY_PATH`
26
+ .. |ENV_CMAKE_XXX_MAC_PATH| replace:: :envvar:`CMAKE_FRAMEWORK_PATH`
27
+
28
+ .. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: The directories in ``LIB``
29
+ and ``PATH``.
30
+ .. |SYSTEM_ENVIRONMENT_PATH_WINDOWS_XXX| replace::
31
+ On Windows hosts, CMake 3.3 through 3.27 searched additional paths:
32
+ ``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
33
+ is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|.
34
+ This behavior was removed by CMake 3.28.
35
+
36
+ .. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
37
+ ``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
38
+ and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
39
+ .. |CMAKE_SYSTEM_XXX_PATH| replace::
40
+ :variable:`CMAKE_SYSTEM_LIBRARY_PATH`
41
+ .. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
42
+ :variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
43
+
44
+ .. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
45
+ :variable:`CMAKE_FIND_ROOT_PATH_MODE_LIBRARY`
46
+
47
+ .. include:: FIND_XXX.txt
48
+
49
+ When more than one value is given to the ``NAMES`` option this command by
50
+ default will consider one name at a time and search every directory
51
+ for it. The ``NAMES_PER_DIR`` option tells this command to consider one
52
+ directory at a time and search for all names in it.
53
+
54
+ Each library name given to the ``NAMES`` option is first considered
55
+ as a library file name and then considered with platform-specific
56
+ prefixes (e.g. ``lib``) and suffixes (e.g. ``.so``). Therefore one
57
+ may specify library file names such as ``libfoo.a`` directly.
58
+ This can be used to locate static libraries on UNIX-like systems.
59
+
60
+ If the library found is a framework, then ``<VAR>`` will be set to the full
61
+ path to the framework ``<fullPath>/A.framework``. When a full path to a
62
+ framework is used as a library, CMake will use a ``-framework A``, and a
63
+ ``-F<fullPath>`` to link the framework to the target.
64
+
65
+ .. versionadded:: 3.28
66
+
67
+ The library found can now be a ``.xcframework`` folder.
68
+
69
+ If the :variable:`CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable is set all
70
+ search paths will be tested as normal, with the suffix appended, and with
71
+ all matches of ``lib/`` replaced with
72
+ ``lib${CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX}/``. This variable overrides
73
+ the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS`,
74
+ :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS`,
75
+ and :prop_gbl:`FIND_LIBRARY_USE_LIB64_PATHS` global properties.
76
+
77
+ If the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global property is set
78
+ all search paths will be tested as normal, with ``32/`` appended, and
79
+ with all matches of ``lib/`` replaced with ``lib32/``. This property is
80
+ automatically set for the platforms that are known to need it if at
81
+ least one of the languages supported by the :command:`project` command
82
+ is enabled.
83
+
84
+ If the :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS` global property is set
85
+ all search paths will be tested as normal, with ``x32/`` appended, and
86
+ with all matches of ``lib/`` replaced with ``libx32/``. This property is
87
+ automatically set for the platforms that are known to need it if at
88
+ least one of the languages supported by the :command:`project` command
89
+ is enabled.
90
+
91
+ If the :prop_gbl:`FIND_LIBRARY_USE_LIB64_PATHS` global property is set
92
+ all search paths will be tested as normal, with ``64/`` appended, and
93
+ with all matches of ``lib/`` replaced with ``lib64/``. This property is
94
+ automatically set for the platforms that are known to need it if at
95
+ least one of the languages supported by the :command:`project` command
96
+ is enabled.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/find_path.rst ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ find_path
2
+ ---------
3
+
4
+ .. |FIND_XXX| replace:: find_path
5
+ .. |NAMES| replace:: NAMES name1 [name2 ...]
6
+ .. |SEARCH_XXX| replace:: file in a directory
7
+ .. |SEARCH_XXX_DESC| replace:: directory containing the named file
8
+ .. |prefix_XXX_SUBDIR| replace:: ``<prefix>/include``
9
+ .. |entry_XXX_SUBDIR| replace:: ``<entry>/include``
10
+
11
+ .. |FIND_XXX_REGISTRY_VIEW_DEFAULT| replace:: ``TARGET``
12
+
13
+ .. |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX| replace::
14
+ ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
15
+ is set, and |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX_SUBDIR|
16
+ .. |CMAKE_PREFIX_PATH_XXX| replace::
17
+ ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
18
+ is set, and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
19
+ .. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_INCLUDE_PATH`
20
+ .. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
21
+
22
+ .. |ENV_CMAKE_PREFIX_PATH_XXX| replace::
23
+ ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
24
+ and |ENV_CMAKE_PREFIX_PATH_XXX_SUBDIR|
25
+ .. |ENV_CMAKE_XXX_PATH| replace:: :envvar:`CMAKE_INCLUDE_PATH`
26
+ .. |ENV_CMAKE_XXX_MAC_PATH| replace:: :envvar:`CMAKE_FRAMEWORK_PATH`
27
+
28
+ .. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: The directories in ``INCLUDE``
29
+ and ``PATH``.
30
+ .. |SYSTEM_ENVIRONMENT_PATH_WINDOWS_XXX| replace::
31
+ On Windows hosts, CMake 3.3 through 3.27 searched additional paths:
32
+ ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
33
+ is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|.
34
+ This behavior was removed by CMake 3.28.
35
+
36
+ .. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
37
+ ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
38
+ is set, and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
39
+ .. |CMAKE_SYSTEM_XXX_PATH| replace::
40
+ :variable:`CMAKE_SYSTEM_INCLUDE_PATH`
41
+ .. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
42
+ :variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
43
+
44
+ .. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
45
+ :variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
46
+
47
+ .. include:: FIND_XXX.txt
48
+
49
+ When searching for frameworks, if the file is specified as ``A/b.h``, then
50
+ the framework search will look for ``A.framework/Headers/b.h``. If that
51
+ is found the path will be set to the path to the framework. CMake
52
+ will convert this to the correct ``-F`` option to include the file.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/fltk_wrap_ui.rst ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fltk_wrap_ui
2
+ ------------
3
+
4
+ Create FLTK user interfaces Wrappers.
5
+
6
+ .. code-block:: cmake
7
+
8
+ fltk_wrap_ui(resultingLibraryName source1
9
+ source2 ... sourceN )
10
+
11
+ Produce .h and .cxx files for all the .fl and .fld files listed. The
12
+ resulting .h and .cxx files will be added to a variable named
13
+ ``resultingLibraryName_FLTK_UI_SRCS`` which should be added to your
14
+ library.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/get_cmake_property.rst ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ get_cmake_property
2
+ ------------------
3
+
4
+ Get a global property of the CMake instance.
5
+
6
+ .. code-block:: cmake
7
+
8
+ get_cmake_property(<variable> <property>)
9
+
10
+ Gets a global property from the CMake instance. The value of
11
+ the ``<property>`` is stored in the specified ``<variable>``.
12
+ If the property is not found, ``<variable>`` will be set to ``NOTFOUND``.
13
+ See the :manual:`cmake-properties(7)` manual for available properties.
14
+
15
+ In addition to global properties, this command (for historical reasons)
16
+ also supports the :prop_dir:`VARIABLES` and :prop_dir:`MACROS` directory
17
+ properties. It also supports a special ``COMPONENTS`` global property that
18
+ lists the components given to the :command:`install` command.
19
+
20
+ See Also
21
+ ^^^^^^^^
22
+
23
+ * the :command:`get_property` command ``GLOBAL`` option
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/install_targets.rst ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ install_targets
2
+ ---------------
3
+
4
+ .. deprecated:: 3.0
5
+
6
+ Use the :command:`install(TARGETS)` command instead.
7
+
8
+ This command has been superseded by the :command:`install` command. It is
9
+ provided for compatibility with older CMake code.
10
+
11
+ .. code-block:: cmake
12
+
13
+ install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
14
+
15
+ Create rules to install the listed targets into the given directory.
16
+ The directory ``<dir>`` is relative to the installation prefix, which is
17
+ stored in the variable :variable:`CMAKE_INSTALL_PREFIX`. If
18
+ ``RUNTIME_DIRECTORY`` is specified, then on systems with special runtime
19
+ files (Windows DLL), the files will be copied to that directory.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/list.rst ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ list
2
+ ----
3
+
4
+ Operations on :ref:`semicolon-separated lists <CMake Language Lists>`.
5
+
6
+ Synopsis
7
+ ^^^^^^^^
8
+
9
+ .. parsed-literal::
10
+
11
+ `Reading`_
12
+ list(`LENGTH`_ <list> <out-var>)
13
+ list(`GET`_ <list> <element index> [<index> ...] <out-var>)
14
+ list(`JOIN`_ <list> <glue> <out-var>)
15
+ list(`SUBLIST`_ <list> <begin> <length> <out-var>)
16
+
17
+ `Search`_
18
+ list(`FIND`_ <list> <value> <out-var>)
19
+
20
+ `Modification`_
21
+ list(`APPEND`_ <list> [<element>...])
22
+ list(`FILTER`_ <list> {INCLUDE | EXCLUDE} REGEX <regex>)
23
+ list(`INSERT`_ <list> <index> [<element>...])
24
+ list(`POP_BACK`_ <list> [<out-var>...])
25
+ list(`POP_FRONT`_ <list> [<out-var>...])
26
+ list(`PREPEND`_ <list> [<element>...])
27
+ list(`REMOVE_ITEM`_ <list> <value>...)
28
+ list(`REMOVE_AT`_ <list> <index>...)
29
+ list(`REMOVE_DUPLICATES`_ <list>)
30
+ list(`TRANSFORM`_ <list> <ACTION> [...])
31
+
32
+ `Ordering`_
33
+ list(`REVERSE`_ <list>)
34
+ list(`SORT`_ <list> [...])
35
+
36
+ Introduction
37
+ ^^^^^^^^^^^^
38
+
39
+ The list subcommands :cref:`APPEND`, :cref:`INSERT`, :cref:`FILTER`,
40
+ :cref:`PREPEND`, :cref:`POP_BACK`, :cref:`POP_FRONT`, :cref:`REMOVE_AT`,
41
+ :cref:`REMOVE_ITEM`, :cref:`REMOVE_DUPLICATES`, :cref:`REVERSE` and
42
+ :cref:`SORT` may create new values for the list within the current CMake
43
+ variable scope. Similar to the :command:`set` command, the ``list`` command
44
+ creates new variable values in the current scope, even if the list itself is
45
+ actually defined in a parent scope. To propagate the results of these
46
+ operations upwards, use :command:`set` with ``PARENT_SCOPE``,
47
+ :command:`set` with ``CACHE INTERNAL``, or some other means of value
48
+ propagation.
49
+
50
+ .. note::
51
+
52
+ A list in cmake is a ``;`` separated group of strings. To create a
53
+ list, the :command:`set` command can be used. For example,
54
+ ``set(var a b c d e)`` creates a list with ``a;b;c;d;e``, and
55
+ ``set(var "a b c d e")`` creates a string or a list with one item in it.
56
+ (Note that macro arguments are not variables, and therefore cannot be used
57
+ in ``LIST`` commands.)
58
+
59
+ Individual elements may not contain an unequal number of ``[`` and ``]``
60
+ characters, and may not end in a backslash (``\``).
61
+ See :ref:`semicolon-separated lists <CMake Language Lists>` for details.
62
+
63
+ .. note::
64
+
65
+ When specifying index values, if ``<element index>`` is 0 or greater, it
66
+ is indexed from the beginning of the list, with 0 representing the
67
+ first list element. If ``<element index>`` is -1 or lesser, it is indexed
68
+ from the end of the list, with -1 representing the last list element.
69
+ Be careful when counting with negative indices: they do not start from
70
+ 0. -0 is equivalent to 0, the first list element.
71
+
72
+ Reading
73
+ ^^^^^^^
74
+
75
+ .. signature::
76
+ list(LENGTH <list> <output variable>)
77
+
78
+ Returns the list's length.
79
+
80
+ .. signature::
81
+ list(GET <list> <element index> [<element index> ...] <output variable>)
82
+
83
+ Returns the list of elements specified by indices from the list.
84
+
85
+ .. signature:: list(JOIN <list> <glue> <output variable>)
86
+
87
+ .. versionadded:: 3.12
88
+
89
+ Returns a string joining all list's elements using the glue string.
90
+ To join multiple strings, which are not part of a list,
91
+ use :command:`string(JOIN)`.
92
+
93
+ .. signature::
94
+ list(SUBLIST <list> <begin> <length> <output variable>)
95
+
96
+ .. versionadded:: 3.12
97
+
98
+ Returns a sublist of the given list.
99
+ If ``<length>`` is 0, an empty list will be returned.
100
+ If ``<length>`` is -1 or the list is smaller than ``<begin>+<length>`` then
101
+ the remaining elements of the list starting at ``<begin>`` will be returned.
102
+
103
+ Search
104
+ ^^^^^^
105
+
106
+ .. signature::
107
+ list(FIND <list> <value> <output variable>)
108
+
109
+ Returns the index of the element specified in the list
110
+ or ``-1`` if it wasn't found.
111
+
112
+ Modification
113
+ ^^^^^^^^^^^^
114
+
115
+ .. signature::
116
+ list(APPEND <list> [<element> ...])
117
+
118
+ Appends elements to the list. If no variable named ``<list>`` exists in the
119
+ current scope its value is treated as empty and the elements are appended to
120
+ that empty list.
121
+
122
+ .. signature::
123
+ list(FILTER <list> <INCLUDE|EXCLUDE> REGEX <regular_expression>)
124
+
125
+ .. versionadded:: 3.6
126
+
127
+ Includes or removes items from the list that match the mode's pattern.
128
+ In ``REGEX`` mode, items will be matched against the given regular expression.
129
+
130
+ For more information on regular expressions look under
131
+ :ref:`string(REGEX) <Regex Specification>`.
132
+
133
+ .. signature::
134
+ list(INSERT <list> <element_index> <element> [<element> ...])
135
+
136
+ Inserts elements to the list to the specified index. It is an
137
+ error to specify an out-of-range index. Valid indexes are 0 to `N`
138
+ where `N` is the length of the list, inclusive. An empty list
139
+ has length 0. If no variable named ``<list>`` exists in the
140
+ current scope its value is treated as empty and the elements are
141
+ inserted in that empty list.
142
+
143
+ .. signature::
144
+ list(POP_BACK <list> [<out-var>...])
145
+
146
+ .. versionadded:: 3.15
147
+
148
+ If no variable name is given, removes exactly one element. Otherwise,
149
+ with `N` variable names provided, assign the last `N` elements' values
150
+ to the given variables and then remove the last `N` values from
151
+ ``<list>``.
152
+
153
+ .. signature::
154
+ list(POP_FRONT <list> [<out-var>...])
155
+
156
+ .. versionadded:: 3.15
157
+
158
+ If no variable name is given, removes exactly one element. Otherwise,
159
+ with `N` variable names provided, assign the first `N` elements' values
160
+ to the given variables and then remove the first `N` values from
161
+ ``<list>``.
162
+
163
+ .. signature::
164
+ list(PREPEND <list> [<element> ...])
165
+
166
+ .. versionadded:: 3.15
167
+
168
+ Insert elements to the 0th position in the list. If no variable named
169
+ ``<list>`` exists in the current scope its value is treated as empty and
170
+ the elements are prepended to that empty list.
171
+
172
+ .. signature::
173
+ list(REMOVE_ITEM <list> <value> [<value> ...])
174
+
175
+ Removes all instances of the given items from the list.
176
+
177
+ .. signature::
178
+ list(REMOVE_AT <list> <index> [<index> ...])
179
+
180
+ Removes items at given indices from the list.
181
+
182
+ .. signature::
183
+ list(REMOVE_DUPLICATES <list>)
184
+
185
+ Removes duplicated items in the list. The relative order of items
186
+ is preserved, but if duplicates are encountered,
187
+ only the first instance is preserved.
188
+
189
+ .. signature::
190
+ list(TRANSFORM <list> <ACTION> [<SELECTOR>]
191
+ [OUTPUT_VARIABLE <output variable>])
192
+
193
+ .. versionadded:: 3.12
194
+
195
+ Transforms the list by applying an ``<ACTION>`` to all or, by specifying a
196
+ ``<SELECTOR>``, to the selected elements of the list, storing the result
197
+ in-place or in the specified output variable.
198
+
199
+ .. note::
200
+
201
+ The ``TRANSFORM`` sub-command does not change the number of elements in the
202
+ list. If a ``<SELECTOR>`` is specified, only some elements will be changed,
203
+ the other ones will remain the same as before the transformation.
204
+
205
+ ``<ACTION>`` specifies the action to apply to the elements of the list.
206
+ The actions have exactly the same semantics as sub-commands of the
207
+ :command:`string` command. ``<ACTION>`` must be one of the following:
208
+
209
+ :command:`APPEND <string(APPEND)>`, :command:`PREPEND <string(PREPEND)>`
210
+ Append, prepend specified value to each element of the list.
211
+
212
+ .. signature::
213
+ list(TRANSFORM <list> (APPEND|PREPEND) <value> ...)
214
+ :target: TRANSFORM_APPEND
215
+
216
+ :command:`TOLOWER <string(TOLOWER)>`, :command:`TOUPPER <string(TOUPPER)>`
217
+ Convert each element of the list to lower, upper characters.
218
+
219
+ .. signature::
220
+ list(TRANSFORM <list> (TOLOWER|TOUPPER) ...)
221
+ :target: TRANSFORM_TOLOWER
222
+
223
+ :command:`STRIP <string(STRIP)>`
224
+ Remove leading and trailing spaces from each element of the list.
225
+
226
+ .. signature::
227
+ list(TRANSFORM <list> STRIP ...)
228
+ :target: TRANSFORM_STRIP
229
+
230
+ :command:`GENEX_STRIP <string(GENEX_STRIP)>`
231
+ Strip any
232
+ :manual:`generator expressions <cmake-generator-expressions(7)>`
233
+ from each element of the list.
234
+
235
+ .. signature::
236
+ list(TRANSFORM <list> GENEX_STRIP ...)
237
+ :target: TRANSFORM_GENEX_STRIP
238
+
239
+ :command:`REPLACE <string(REGEX REPLACE)>`:
240
+ Match the regular expression as many times as possible and substitute
241
+ the replacement expression for the match for each element of the list
242
+ (same semantic as :command:`string(REGEX REPLACE)`).
243
+
244
+ .. signature::
245
+ list(TRANSFORM <list> REPLACE <regular_expression>
246
+ <replace_expression> ...)
247
+ :target: TRANSFORM_REPLACE
248
+
249
+ ``<SELECTOR>`` determines which elements of the list will be transformed.
250
+ Only one type of selector can be specified at a time.
251
+ When given, ``<SELECTOR>`` must be one of the following:
252
+
253
+ ``AT``
254
+ Specify a list of indexes.
255
+
256
+ .. code-block:: cmake
257
+
258
+ list(TRANSFORM <list> <ACTION> AT <index> [<index> ...] ...)
259
+
260
+ ``FOR``
261
+ Specify a range with, optionally,
262
+ an increment used to iterate over the range.
263
+
264
+ .. code-block:: cmake
265
+
266
+ list(TRANSFORM <list> <ACTION> FOR <start> <stop> [<step>] ...)
267
+
268
+ ``REGEX``
269
+ Specify a regular expression.
270
+ Only elements matching the regular expression will be transformed.
271
+
272
+ .. code-block:: cmake
273
+
274
+ list(TRANSFORM <list> <ACTION> REGEX <regular_expression> ...)
275
+
276
+
277
+ Ordering
278
+ ^^^^^^^^
279
+
280
+ .. signature::
281
+ list(REVERSE <list>)
282
+
283
+ Reverses the contents of the list in-place.
284
+
285
+ .. signature::
286
+ list(SORT <list> [COMPARE <compare>] [CASE <case>] [ORDER <order>])
287
+
288
+ Sorts the list in-place alphabetically.
289
+
290
+ .. versionadded:: 3.13
291
+ Added the ``COMPARE``, ``CASE``, and ``ORDER`` options.
292
+
293
+ .. versionadded:: 3.18
294
+ Added the ``COMPARE NATURAL`` option.
295
+
296
+ Use the ``COMPARE`` keyword to select the comparison method for sorting.
297
+ The ``<compare>`` option should be one of:
298
+
299
+ ``STRING``
300
+ Sorts a list of strings alphabetically.
301
+ This is the default behavior if the ``COMPARE`` option is not given.
302
+
303
+ ``FILE_BASENAME``
304
+ Sorts a list of pathnames of files by their basenames.
305
+
306
+ ``NATURAL``
307
+ Sorts a list of strings using natural order
308
+ (see ``strverscmp(3)`` manual), i.e. such that contiguous digits
309
+ are compared as whole numbers.
310
+ For example: the following list `10.0 1.1 2.1 8.0 2.0 3.1`
311
+ will be sorted as `1.1 2.0 2.1 3.1 8.0 10.0` if the ``NATURAL``
312
+ comparison is selected where it will be sorted as
313
+ `1.1 10.0 2.0 2.1 3.1 8.0` with the ``STRING`` comparison.
314
+
315
+ Use the ``CASE`` keyword to select a case sensitive or case insensitive
316
+ sort mode. The ``<case>`` option should be one of:
317
+
318
+ ``SENSITIVE``
319
+ List items are sorted in a case-sensitive manner.
320
+ This is the default behavior if the ``CASE`` option is not given.
321
+
322
+ ``INSENSITIVE``
323
+ List items are sorted case insensitively. The order of
324
+ items which differ only by upper/lowercase is not specified.
325
+
326
+ To control the sort order, the ``ORDER`` keyword can be given.
327
+ The ``<order>`` option should be one of:
328
+
329
+ ``ASCENDING``
330
+ Sorts the list in ascending order.
331
+ This is the default behavior when the ``ORDER`` option is not given.
332
+
333
+ ``DESCENDING``
334
+ Sorts the list in descending order.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/return.rst ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ return
2
+ ------
3
+
4
+ Return from a file, directory or function.
5
+
6
+ .. code-block:: cmake
7
+
8
+ return([PROPAGATE <var-name>...])
9
+
10
+ When this command is encountered in an included file (via :command:`include` or
11
+ :command:`find_package`), it causes processing of the current file to stop
12
+ and control is returned to the including file. If it is encountered in a
13
+ file which is not included by another file, e.g. a ``CMakeLists.txt``,
14
+ deferred calls scheduled by :command:`cmake_language(DEFER)` are invoked and
15
+ control is returned to the parent directory if there is one.
16
+
17
+ If ``return()`` is called in a function, control is returned to the caller
18
+ of that function. Note that a :command:`macro`, unlike a :command:`function`,
19
+ is expanded in place and therefore cannot handle ``return()``.
20
+
21
+ Policy :policy:`CMP0140` controls the behavior regarding the arguments of the
22
+ command. All arguments are ignored unless that policy is set to ``NEW``.
23
+
24
+ ``PROPAGATE``
25
+ .. versionadded:: 3.25
26
+
27
+ This option sets or unsets the specified variables in the parent directory or
28
+ function caller scope. This is equivalent to :command:`set(PARENT_SCOPE)` or
29
+ :command:`unset(PARENT_SCOPE)` commands, except for the way it interacts
30
+ with the :command:`block` command, as described below.
31
+
32
+ The ``PROPAGATE`` option can be very useful in conjunction with the
33
+ :command:`block` command. A ``return`` will propagate the
34
+ specified variables through any enclosing block scopes created by the
35
+ :command:`block` commands. Inside a function, this ensures the variables
36
+ are propagated to the function's caller, regardless of any blocks within
37
+ the function. If not inside a function, it ensures the variables are
38
+ propagated to the parent file or directory scope. For example:
39
+
40
+ .. code-block:: cmake
41
+ :caption: CMakeLists.txt
42
+
43
+ cmake_minimum_required(VERSION 3.25)
44
+ project(example)
45
+
46
+ set(var1 "top-value")
47
+
48
+ block(SCOPE_FOR VARIABLES)
49
+ add_subdirectory(subDir)
50
+ # var1 has the value "block-nested"
51
+ endblock()
52
+
53
+ # var1 has the value "top-value"
54
+
55
+ .. code-block:: cmake
56
+ :caption: subDir/CMakeLists.txt
57
+
58
+ function(multi_scopes result_var1 result_var2)
59
+ block(SCOPE_FOR VARIABLES)
60
+ # This would only propagate out of the immediate block, not to
61
+ # the caller of the function.
62
+ #set(${result_var1} "new-value" PARENT_SCOPE)
63
+ #unset(${result_var2} PARENT_SCOPE)
64
+
65
+ # This propagates the variables through the enclosing block and
66
+ # out to the caller of the function.
67
+ set(${result_var1} "new-value")
68
+ unset(${result_var2})
69
+ return(PROPAGATE ${result_var1} ${result_var2})
70
+ endblock()
71
+ endfunction()
72
+
73
+ set(var1 "some-value")
74
+ set(var2 "another-value")
75
+
76
+ multi_scopes(var1 var2)
77
+ # Now var1 will hold "new-value" and var2 will be unset
78
+
79
+ block(SCOPE_FOR VARIABLES)
80
+ # This return() will set var1 in the directory scope that included us
81
+ # via add_subdirectory(). The surrounding block() here does not limit
82
+ # propagation to the current file, but the block() in the parent
83
+ # directory scope does prevent propagation going any further.
84
+ set(var1 "block-nested")
85
+ return(PROPAGATE var1)
86
+ endblock()
87
+
88
+ See Also
89
+ ^^^^^^^^
90
+
91
+ * :command:`block`
92
+ * :command:`function`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/set_directory_properties.rst ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set_directory_properties
2
+ ------------------------
3
+
4
+ Set properties of the current directory and subdirectories.
5
+
6
+ .. code-block:: cmake
7
+
8
+ set_directory_properties(PROPERTIES <prop1> <value1> [<prop2> <value2>] ...)
9
+
10
+ Sets properties of the current directory and its subdirectories in key-value
11
+ pairs.
12
+
13
+ See also the :command:`set_property(DIRECTORY)` command.
14
+
15
+ See :ref:`Directory Properties` for the list of properties known to CMake
16
+ and their individual documentation for the behavior of each property.
17
+
18
+ See Also
19
+ ^^^^^^^^
20
+
21
+ * :command:`define_property`
22
+ * :command:`get_directory_property`
23
+ * the more general :command:`set_property` command
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/set_tests_properties.rst ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set_tests_properties
2
+ --------------------
3
+
4
+ Set a property of the tests.
5
+
6
+ .. code-block:: cmake
7
+
8
+ set_tests_properties(<tests>...
9
+ [DIRECTORY <dir>]
10
+ PROPERTIES <prop1> <value1>
11
+ [<prop2> <value2>]...)
12
+
13
+ Sets a property for the tests. If the test is not found, CMake
14
+ will report an error.
15
+
16
+ Test property values may be specified using
17
+ :manual:`generator expressions <cmake-generator-expressions(7)>`
18
+ for tests created by the :command:`add_test(NAME)` signature.
19
+
20
+ .. versionadded:: 3.28
21
+ Visibility can be set in other directory scopes using the following option:
22
+
23
+ ``DIRECTORY <dir>``
24
+ The test properties will be set in the ``<dir>`` directory's scope.
25
+ CMake must already know about this directory, either by having added it
26
+ through a call to :command:`add_subdirectory` or it being the top level
27
+ source directory. Relative paths are treated as relative to the current
28
+ source directory. ``<dir>`` may reference a binary directory.
29
+
30
+ See Also
31
+ ^^^^^^^^
32
+
33
+ * :command:`add_test`
34
+ * :command:`define_property`
35
+ * the more general :command:`set_property` command
36
+ * :ref:`Test Properties` for the list of properties known to CMake
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/site_name.rst ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ site_name
2
+ ---------
3
+
4
+ Set the given variable to the name of the computer.
5
+
6
+ .. code-block:: cmake
7
+
8
+ site_name(variable)
9
+
10
+ On UNIX-like platforms, if the variable ``HOSTNAME`` is set, its value
11
+ will be executed as a command expected to print out the host name,
12
+ much like the ``hostname`` command-line tool.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/target_link_libraries.rst ADDED
@@ -0,0 +1,432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ target_link_libraries
2
+ ---------------------
3
+
4
+ .. only:: html
5
+
6
+ .. contents::
7
+
8
+ Specify libraries or flags to use when linking a given target and/or
9
+ its dependents. :ref:`Usage requirements <Target Usage Requirements>`
10
+ from linked library targets will be propagated. Usage requirements
11
+ of a target's dependencies affect compilation of its own sources.
12
+
13
+ Overview
14
+ ^^^^^^^^
15
+
16
+ This command has several signatures as detailed in subsections below.
17
+ All of them have the general form
18
+
19
+ .. code-block:: cmake
20
+
21
+ target_link_libraries(<target> ... <item>... ...)
22
+
23
+ The named ``<target>`` must have been created by a command such as
24
+ :command:`add_executable` or :command:`add_library` and must not be an
25
+ :ref:`ALIAS target <Alias Targets>`. If policy :policy:`CMP0079` is not
26
+ set to ``NEW`` then the target must have been created in the current
27
+ directory. Repeated calls for the same ``<target>`` append items in
28
+ the order called.
29
+
30
+ .. versionadded:: 3.13
31
+ The ``<target>`` doesn't have to be defined in the same directory as the
32
+ ``target_link_libraries`` call.
33
+
34
+ Each ``<item>`` may be:
35
+
36
+ * **A library target name**: The generated link line will have the
37
+ full path to the linkable library file associated with the target.
38
+ The buildsystem will have a dependency to re-link ``<target>`` if
39
+ the library file changes.
40
+
41
+ The named target must be created by :command:`add_library` within
42
+ the project or as an :ref:`IMPORTED library <Imported Targets>`.
43
+ If it is created within the project an ordering dependency will
44
+ automatically be added in the build system to make sure the named
45
+ library target is up-to-date before the ``<target>`` links.
46
+
47
+ If an imported library has the :prop_tgt:`IMPORTED_NO_SONAME`
48
+ target property set, CMake may ask the linker to search for
49
+ the library instead of using the full path
50
+ (e.g. ``/usr/lib/libfoo.so`` becomes ``-lfoo``).
51
+
52
+ The full path to the target's artifact will be quoted/escaped for
53
+ the shell automatically.
54
+
55
+ * **A full path to a library file**: The generated link line will
56
+ normally preserve the full path to the file. The buildsystem will
57
+ have a dependency to re-link ``<target>`` if the library file changes.
58
+
59
+ There are some cases where CMake may ask the linker to search for
60
+ the library (e.g. ``/usr/lib/libfoo.so`` becomes ``-lfoo``), such
61
+ as when a shared library is detected to have no ``SONAME`` field.
62
+ See policy :policy:`CMP0060` for discussion of another case.
63
+
64
+ If the library file is in a macOS framework, the ``Headers`` directory
65
+ of the framework will also be processed as a
66
+ :ref:`usage requirement <Target Usage Requirements>`. This has the same
67
+ effect as passing the framework directory as an include directory.
68
+
69
+ .. versionadded:: 3.28
70
+
71
+ The library file may point to a ``.xcframework`` folder on Apple platforms.
72
+ If it does, the target will get the selected library's ``Headers``
73
+ directory as a usage requirement.
74
+
75
+ .. versionadded:: 3.8
76
+ On :ref:`Visual Studio Generators` for VS 2010 and above, library files
77
+ ending in ``.targets`` will be treated as MSBuild targets files and
78
+ imported into generated project files. This is not supported by other
79
+ generators.
80
+
81
+ The full path to the library file will be quoted/escaped for
82
+ the shell automatically.
83
+
84
+ * **A plain library name**: The generated link line will ask the linker
85
+ to search for the library (e.g. ``foo`` becomes ``-lfoo`` or ``foo.lib``).
86
+
87
+ The library name/flag is treated as a command-line string fragment and
88
+ will be used with no extra quoting or escaping.
89
+
90
+ * **A link flag**: Item names starting with ``-``, but not ``-l`` or
91
+ ``-framework``, are treated as linker flags. Note that such flags will
92
+ be treated like any other library link item for purposes of transitive
93
+ dependencies, so they are generally safe to specify only as private link
94
+ items that will not propagate to dependents.
95
+
96
+ Link flags specified here are inserted into the link command in the same
97
+ place as the link libraries. This might not be correct, depending on
98
+ the linker. Use the :prop_tgt:`LINK_OPTIONS` target property or
99
+ :command:`target_link_options` command to add link
100
+ flags explicitly. The flags will then be placed at the toolchain-defined
101
+ flag position in the link command.
102
+
103
+ .. versionadded:: 3.13
104
+ :prop_tgt:`LINK_OPTIONS` target property and :command:`target_link_options`
105
+ command. For earlier versions of CMake, use :prop_tgt:`LINK_FLAGS`
106
+ property instead.
107
+
108
+ The link flag is treated as a command-line string fragment and
109
+ will be used with no extra quoting or escaping.
110
+
111
+ * **A generator expression**: A ``$<...>`` :manual:`generator expression
112
+ <cmake-generator-expressions(7)>` may evaluate to any of the above
113
+ items or to a :ref:`semicolon-separated list <CMake Language Lists>` of them.
114
+ If the ``...`` contains any ``;`` characters, e.g. after evaluation
115
+ of a ``${list}`` variable, be sure to use an explicitly quoted
116
+ argument ``"$<...>"`` so that this command receives it as a
117
+ single ``<item>``.
118
+
119
+ Additionally, a generator expression may be used as a fragment of
120
+ any of the above items, e.g. ``foo$<1:_d>``.
121
+
122
+ Note that generator expressions will not be used in OLD handling of
123
+ policy :policy:`CMP0003` or policy :policy:`CMP0004`.
124
+
125
+ * A ``debug``, ``optimized``, or ``general`` keyword immediately followed
126
+ by another ``<item>``. The item following such a keyword will be used
127
+ only for the corresponding build configuration. The ``debug`` keyword
128
+ corresponds to the ``Debug`` configuration (or to configurations named
129
+ in the :prop_gbl:`DEBUG_CONFIGURATIONS` global property if it is set).
130
+ The ``optimized`` keyword corresponds to all other configurations. The
131
+ ``general`` keyword corresponds to all configurations, and is purely
132
+ optional. Higher granularity may be achieved for per-configuration
133
+ rules by creating and linking to
134
+ :ref:`IMPORTED library targets <Imported Targets>`.
135
+ These keywords are interpreted immediately by this command and therefore
136
+ have no special meaning when produced by a generator expression.
137
+
138
+ Items containing ``::``, such as ``Foo::Bar``, are assumed to be
139
+ :ref:`IMPORTED <Imported Targets>` or :ref:`ALIAS <Alias Targets>` library
140
+ target names and will cause an error if no such target exists.
141
+ See policy :policy:`CMP0028`.
142
+
143
+ See the :variable:`CMAKE_LINK_LIBRARIES_STRATEGY` variable and
144
+ corresponding :prop_tgt:`LINK_LIBRARIES_STRATEGY` target property
145
+ for details on how CMake orders direct link dependencies on linker
146
+ command lines.
147
+
148
+ See the :manual:`cmake-buildsystem(7)` manual for more on defining
149
+ buildsystem properties.
150
+
151
+ Libraries for a Target and/or its Dependents
152
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153
+
154
+ .. code-block:: cmake
155
+
156
+ target_link_libraries(<target>
157
+ <PRIVATE|PUBLIC|INTERFACE> <item>...
158
+ [<PRIVATE|PUBLIC|INTERFACE> <item>...]...)
159
+
160
+ The ``PUBLIC``, ``PRIVATE`` and ``INTERFACE``
161
+ :ref:`scope <Target Command Scope>` keywords can be used to
162
+ specify both the link dependencies and the link interface in one command.
163
+
164
+ Libraries and targets following ``PUBLIC`` are linked to, and are made
165
+ part of the link interface. Libraries and targets following ``PRIVATE``
166
+ are linked to, but are not made part of the link interface. Libraries
167
+ following ``INTERFACE`` are appended to the link interface and are not
168
+ used for linking ``<target>``.
169
+
170
+ Libraries for both a Target and its Dependents
171
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172
+
173
+ .. code-block:: cmake
174
+
175
+ target_link_libraries(<target> <item>...)
176
+
177
+ Library dependencies are transitive by default with this signature.
178
+ When this target is linked into another target then the libraries
179
+ linked to this target will appear on the link line for the other
180
+ target too. This transitive "link interface" is stored in the
181
+ :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property and may be overridden
182
+ by setting the property directly. When :policy:`CMP0022` is not set to
183
+ ``NEW``, transitive linking is built in but may be overridden by the
184
+ :prop_tgt:`LINK_INTERFACE_LIBRARIES` property. Calls to other signatures
185
+ of this command may set the property making any libraries linked
186
+ exclusively by this signature private.
187
+
188
+ Libraries for a Target and/or its Dependents (Legacy)
189
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190
+
191
+ .. code-block:: cmake
192
+
193
+ target_link_libraries(<target>
194
+ <LINK_PRIVATE|LINK_PUBLIC> <lib>...
195
+ [<LINK_PRIVATE|LINK_PUBLIC> <lib>...]...)
196
+
197
+ The ``LINK_PUBLIC`` and ``LINK_PRIVATE`` modes can be used to specify both
198
+ the link dependencies and the link interface in one command.
199
+
200
+ This signature is for compatibility only. Prefer the ``PUBLIC`` or
201
+ ``PRIVATE`` keywords instead.
202
+
203
+ Libraries and targets following ``LINK_PUBLIC`` are linked to, and are
204
+ made part of the :prop_tgt:`INTERFACE_LINK_LIBRARIES`. If policy
205
+ :policy:`CMP0022` is not ``NEW``, they are also made part of the
206
+ :prop_tgt:`LINK_INTERFACE_LIBRARIES`. Libraries and targets following
207
+ ``LINK_PRIVATE`` are linked to, but are not made part of the
208
+ :prop_tgt:`INTERFACE_LINK_LIBRARIES` (or :prop_tgt:`LINK_INTERFACE_LIBRARIES`).
209
+
210
+ Libraries for Dependents Only (Legacy)
211
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212
+
213
+ .. code-block:: cmake
214
+
215
+ target_link_libraries(<target> LINK_INTERFACE_LIBRARIES <item>...)
216
+
217
+ The ``LINK_INTERFACE_LIBRARIES`` mode appends the libraries to the
218
+ :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property instead of using them
219
+ for linking. If policy :policy:`CMP0022` is not ``NEW``, then this mode
220
+ also appends libraries to the :prop_tgt:`LINK_INTERFACE_LIBRARIES` and its
221
+ per-configuration equivalent.
222
+
223
+ This signature is for compatibility only. Prefer the ``INTERFACE`` mode
224
+ instead.
225
+
226
+ Libraries specified as ``debug`` are wrapped in a generator expression to
227
+ correspond to debug builds. If policy :policy:`CMP0022` is
228
+ not ``NEW``, the libraries are also appended to the
229
+ :prop_tgt:`LINK_INTERFACE_LIBRARIES_DEBUG <LINK_INTERFACE_LIBRARIES_<CONFIG>>`
230
+ property (or to the properties corresponding to configurations listed in
231
+ the :prop_gbl:`DEBUG_CONFIGURATIONS` global property if it is set).
232
+ Libraries specified as ``optimized`` are appended to the
233
+ :prop_tgt:`INTERFACE_LINK_LIBRARIES` property. If policy :policy:`CMP0022`
234
+ is not ``NEW``, they are also appended to the
235
+ :prop_tgt:`LINK_INTERFACE_LIBRARIES` property. Libraries specified as
236
+ ``general`` (or without any keyword) are treated as if specified for both
237
+ ``debug`` and ``optimized``.
238
+
239
+ Linking Object Libraries
240
+ ^^^^^^^^^^^^^^^^^^^^^^^^
241
+
242
+ .. versionadded:: 3.12
243
+
244
+ :ref:`Object Libraries` may be used as the ``<target>`` (first) argument
245
+ of ``target_link_libraries`` to specify dependencies of their sources
246
+ on other libraries. For example, the code
247
+
248
+ .. code-block:: cmake
249
+
250
+ add_library(A SHARED a.c)
251
+ target_compile_definitions(A PUBLIC A)
252
+
253
+ add_library(obj OBJECT obj.c)
254
+ target_compile_definitions(obj PUBLIC OBJ)
255
+ target_link_libraries(obj PUBLIC A)
256
+
257
+ compiles ``obj.c`` with ``-DA -DOBJ`` and establishes usage requirements
258
+ for ``obj`` that propagate to its dependents.
259
+
260
+ Normal libraries and executables may link to :ref:`Object Libraries`
261
+ to get their objects and usage requirements. Continuing the above
262
+ example, the code
263
+
264
+ .. code-block:: cmake
265
+
266
+ add_library(B SHARED b.c)
267
+ target_link_libraries(B PUBLIC obj)
268
+
269
+ compiles ``b.c`` with ``-DA -DOBJ``, creates shared library ``B``
270
+ with object files from ``b.c`` and ``obj.c``, and links ``B`` to ``A``.
271
+ Furthermore, the code
272
+
273
+ .. code-block:: cmake
274
+
275
+ add_executable(main main.c)
276
+ target_link_libraries(main B)
277
+
278
+ compiles ``main.c`` with ``-DA -DOBJ`` and links executable ``main``
279
+ to ``B`` and ``A``. The object library's usage requirements are
280
+ propagated transitively through ``B``, but its object files are not.
281
+
282
+ :ref:`Object Libraries` may "link" to other object libraries to get
283
+ usage requirements, but since they do not have a link step nothing
284
+ is done with their object files. Continuing from the above example,
285
+ the code:
286
+
287
+ .. code-block:: cmake
288
+
289
+ add_library(obj2 OBJECT obj2.c)
290
+ target_link_libraries(obj2 PUBLIC obj)
291
+
292
+ add_executable(main2 main2.c)
293
+ target_link_libraries(main2 obj2)
294
+
295
+ compiles ``obj2.c`` with ``-DA -DOBJ``, creates executable ``main2``
296
+ with object files from ``main2.c`` and ``obj2.c``, and links ``main2``
297
+ to ``A``.
298
+
299
+ In other words, when :ref:`Object Libraries` appear in a target's
300
+ :prop_tgt:`INTERFACE_LINK_LIBRARIES` property they will be
301
+ treated as :ref:`Interface Libraries`, but when they appear in
302
+ a target's :prop_tgt:`LINK_LIBRARIES` property their object files
303
+ will be included in the link too.
304
+
305
+ .. _`Linking Object Libraries via $<TARGET_OBJECTS>`:
306
+
307
+ Linking Object Libraries via ``$<TARGET_OBJECTS>``
308
+ """"""""""""""""""""""""""""""""""""""""""""""""""
309
+
310
+ .. versionadded:: 3.21
311
+
312
+ The object files associated with an object library may be referenced
313
+ by the :genex:`$<TARGET_OBJECTS>` generator expression. Such object
314
+ files are placed on the link line *before* all libraries, regardless
315
+ of their relative order. Additionally, an ordering dependency will be
316
+ added to the build system to make sure the object library is up-to-date
317
+ before the dependent target links. For example, the code
318
+
319
+ .. code-block:: cmake
320
+
321
+ add_library(obj3 OBJECT obj3.c)
322
+ target_compile_definitions(obj3 PUBLIC OBJ3)
323
+
324
+ add_executable(main3 main3.c)
325
+ target_link_libraries(main3 PRIVATE a3 $<TARGET_OBJECTS:obj3> b3)
326
+
327
+ links executable ``main3`` with object files from ``main3.c``
328
+ and ``obj3.c`` followed by the ``a3`` and ``b3`` libraries.
329
+ ``main3.c`` is *not* compiled with usage requirements from ``obj3``,
330
+ such as ``-DOBJ3``.
331
+
332
+ This approach can be used to achieve transitive inclusion of object
333
+ files in link lines as usage requirements. Continuing the above
334
+ example, the code
335
+
336
+ .. code-block:: cmake
337
+
338
+ add_library(iface_obj3 INTERFACE)
339
+ target_link_libraries(iface_obj3 INTERFACE obj3 $<TARGET_OBJECTS:obj3>)
340
+
341
+ creates an interface library ``iface_obj3`` that forwards the ``obj3``
342
+ usage requirements and adds the ``obj3`` object files to dependents'
343
+ link lines. The code
344
+
345
+ .. code-block:: cmake
346
+
347
+ add_executable(use_obj3 use_obj3.c)
348
+ target_link_libraries(use_obj3 PRIVATE iface_obj3)
349
+
350
+ compiles ``use_obj3.c`` with ``-DOBJ3`` and links executable ``use_obj3``
351
+ with object files from ``use_obj3.c`` and ``obj3.c``.
352
+
353
+ This also works transitively through a static library. Since a static
354
+ library does not link, it does not consume the object files from
355
+ object libraries referenced this way. Instead, the object files
356
+ become transitive link dependencies of the static library.
357
+ Continuing the above example, the code
358
+
359
+ .. code-block:: cmake
360
+
361
+ add_library(static3 STATIC static3.c)
362
+ target_link_libraries(static3 PRIVATE iface_obj3)
363
+
364
+ add_executable(use_static3 use_static3.c)
365
+ target_link_libraries(use_static3 PRIVATE static3)
366
+
367
+ compiles ``static3.c`` with ``-DOBJ3`` and creates ``libstatic3.a``
368
+ using only its own object file. ``use_static3.c`` is compiled *without*
369
+ ``-DOBJ3`` because the usage requirement is not transitive through
370
+ the private dependency of ``static3``. However, the link dependencies
371
+ of ``static3`` are propagated, including the ``iface_obj3`` reference
372
+ to ``$<TARGET_OBJECTS:obj3>``. The ``use_static3`` executable is
373
+ created with object files from ``use_static3.c`` and ``obj3.c``, and
374
+ linked to library ``libstatic3.a``.
375
+
376
+ When using this approach, it is the project's responsibility to avoid
377
+ linking multiple dependent binaries to ``iface_obj3``, because they will
378
+ all get the ``obj3`` object files on their link lines.
379
+
380
+ .. note::
381
+
382
+ Referencing :genex:`$<TARGET_OBJECTS>` in ``target_link_libraries``
383
+ calls worked in versions of CMake prior to 3.21 for some cases,
384
+ but was not fully supported:
385
+
386
+ * It did not place the object files before libraries on link lines.
387
+ * It did not add an ordering dependency on the object library.
388
+ * It did not work in Xcode with multiple architectures.
389
+
390
+ Cyclic Dependencies of Static Libraries
391
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
392
+
393
+ The library dependency graph is normally acyclic (a DAG), but in the case
394
+ of mutually-dependent ``STATIC`` libraries CMake allows the graph to
395
+ contain cycles (strongly connected components). When another target links
396
+ to one of the libraries, CMake repeats the entire connected component.
397
+ For example, the code
398
+
399
+ .. code-block:: cmake
400
+
401
+ add_library(A STATIC a.c)
402
+ add_library(B STATIC b.c)
403
+ target_link_libraries(A B)
404
+ target_link_libraries(B A)
405
+ add_executable(main main.c)
406
+ target_link_libraries(main A)
407
+
408
+ links ``main`` to ``A B A B``. While one repetition is usually
409
+ sufficient, pathological object file and symbol arrangements can require
410
+ more. One may handle such cases by using the
411
+ :prop_tgt:`LINK_INTERFACE_MULTIPLICITY` target property or by manually
412
+ repeating the component in the last ``target_link_libraries`` call.
413
+ However, if two archives are really so interdependent they should probably
414
+ be combined into a single archive, perhaps by using :ref:`Object Libraries`.
415
+
416
+ Creating Relocatable Packages
417
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
418
+
419
+ .. |INTERFACE_PROPERTY_LINK| replace:: :prop_tgt:`INTERFACE_LINK_LIBRARIES`
420
+ .. include:: /include/INTERFACE_LINK_LIBRARIES_WARNING.txt
421
+
422
+ See Also
423
+ ^^^^^^^^
424
+
425
+ * :command:`target_compile_definitions`
426
+ * :command:`target_compile_features`
427
+ * :command:`target_compile_options`
428
+ * :command:`target_include_directories`
429
+ * :command:`target_link_directories`
430
+ * :command:`target_link_options`
431
+ * :command:`target_precompile_headers`
432
+ * :command:`target_sources`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/target_precompile_headers.rst ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ target_precompile_headers
2
+ -------------------------
3
+
4
+ .. versionadded:: 3.16
5
+
6
+ Add a list of header files to precompile.
7
+
8
+ Precompiling header files can speed up compilation by creating a partially
9
+ processed version of some header files, and then using that version during
10
+ compilations rather than repeatedly parsing the original headers.
11
+
12
+ Main Form
13
+ ^^^^^^^^^
14
+
15
+ .. code-block:: cmake
16
+
17
+ target_precompile_headers(<target>
18
+ <INTERFACE|PUBLIC|PRIVATE> [header1...]
19
+ [<INTERFACE|PUBLIC|PRIVATE> [header2...] ...])
20
+
21
+ The command adds header files to the :prop_tgt:`PRECOMPILE_HEADERS` and/or
22
+ :prop_tgt:`INTERFACE_PRECOMPILE_HEADERS` target properties of ``<target>``.
23
+ The named ``<target>`` must have been created by a command such as
24
+ :command:`add_executable` or :command:`add_library` and must not be an
25
+ :ref:`ALIAS target <Alias Targets>`.
26
+
27
+ The ``INTERFACE``, ``PUBLIC`` and ``PRIVATE`` keywords are required to
28
+ specify the :ref:`scope <Target Command Scope>` of the following arguments.
29
+ ``PRIVATE`` and ``PUBLIC`` items will populate the :prop_tgt:`PRECOMPILE_HEADERS`
30
+ property of ``<target>``. ``PUBLIC`` and ``INTERFACE`` items will populate the
31
+ :prop_tgt:`INTERFACE_PRECOMPILE_HEADERS` property of ``<target>``
32
+ (:ref:`IMPORTED targets <Imported Targets>` only support ``INTERFACE`` items).
33
+ Repeated calls for the same ``<target>`` will append items in the order called.
34
+
35
+ Projects should generally avoid using ``PUBLIC`` or ``INTERFACE`` for targets
36
+ that will be :command:`exported <install(EXPORT)>`, or they should at least use
37
+ the :genex:`$<BUILD_INTERFACE:...>` generator expression to prevent precompile
38
+ headers from appearing in an installed exported target. Consumers of a target
39
+ should typically be in control of what precompile headers they use, not have
40
+ precompile headers forced on them by the targets being consumed (since
41
+ precompile headers are not typically usage requirements). A notable exception
42
+ to this is where an :ref:`interface library <Interface Libraries>` is created
43
+ to define a commonly used set of precompile headers in one place and then other
44
+ targets link to that interface library privately. In this case, the interface
45
+ library exists specifically to propagate the precompile headers to its
46
+ consumers and the consumer is effectively still in control, since it decides
47
+ whether to link to the interface library or not.
48
+
49
+ The list of header files is used to generate a header file named
50
+ ``cmake_pch.h|xx`` which is used to generate the precompiled header file
51
+ (``.pch``, ``.gch``, ``.pchi``) artifact. The ``cmake_pch.h|xx`` header
52
+ file will be force included (``-include`` for GCC, ``/FI`` for MSVC) to
53
+ all source files, so sources do not need to have ``#include "pch.h"``.
54
+
55
+ Header file names specified with angle brackets (e.g. ``<unordered_map>``) or
56
+ explicit double quotes (escaped for the :manual:`cmake-language(7)`,
57
+ e.g. ``[["other_header.h"]]``) will be treated as is, and include directories
58
+ must be available for the compiler to find them. Other header file names
59
+ (e.g. ``project_header.h``) are interpreted as being relative to the current
60
+ source directory (e.g. :variable:`CMAKE_CURRENT_SOURCE_DIR`) and will be
61
+ included by absolute path. For example:
62
+
63
+ .. code-block:: cmake
64
+
65
+ target_precompile_headers(myTarget
66
+ PUBLIC
67
+ project_header.h
68
+ PRIVATE
69
+ [["other_header.h"]]
70
+ <unordered_map>
71
+ )
72
+
73
+ .. |command_name| replace:: ``target_precompile_headers``
74
+ .. |more_see_also| replace:: The :genex:`$<COMPILE_LANGUAGE:...>` generator
75
+ expression is particularly useful for specifying a language-specific header
76
+ to precompile for only one language (e.g. ``CXX`` and not ``C``). In this
77
+ case, header file names that are not explicitly in double quotes or angle
78
+ brackets must be specified by absolute path. Also, when specifying angle
79
+ brackets inside a generator expression, be sure to encode the closing
80
+ ``>`` as :genex:`$<ANGLE-R>`. For example:
81
+ .. include:: GENEX_NOTE.txt
82
+ :start-line: 1
83
+
84
+ .. code-block:: cmake
85
+
86
+ target_precompile_headers(mylib PRIVATE
87
+ "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/cxx_only.h>"
88
+ "$<$<COMPILE_LANGUAGE:C>:<stddef.h$<ANGLE-R>>"
89
+ "$<$<COMPILE_LANGUAGE:CXX>:<cstddef$<ANGLE-R>>"
90
+ )
91
+
92
+
93
+ Reusing Precompile Headers
94
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
95
+
96
+ The command also supports a second signature which can be used to specify that
97
+ one target reuses a precompiled header file artifact from another target
98
+ instead of generating its own:
99
+
100
+ .. code-block:: cmake
101
+
102
+ target_precompile_headers(<target> REUSE_FROM <other_target>)
103
+
104
+ This form sets the :prop_tgt:`PRECOMPILE_HEADERS_REUSE_FROM` property to
105
+ ``<other_target>`` and adds a dependency such that ``<target>`` will depend
106
+ on ``<other_target>``. CMake will halt with an error if the
107
+ :prop_tgt:`PRECOMPILE_HEADERS` property of ``<target>`` is already set when
108
+ the ``REUSE_FROM`` form is used.
109
+
110
+ .. note::
111
+
112
+ The ``REUSE_FROM`` form requires the same set of compiler options,
113
+ compiler flags and compiler definitions for both ``<target>`` and
114
+ ``<other_target>``. Some compilers (e.g. GCC) may issue a warning if the
115
+ precompiled header file cannot be used (``-Winvalid-pch``).
116
+
117
+ See Also
118
+ ^^^^^^^^
119
+
120
+ * To disable precompile headers for specific targets, see the
121
+ :prop_tgt:`DISABLE_PRECOMPILE_HEADERS` target property.
122
+
123
+ * To prevent precompile headers from being used when compiling a specific
124
+ source file, see the :prop_sf:`SKIP_PRECOMPILE_HEADERS` source file property.
125
+
126
+ * :command:`target_compile_definitions`
127
+ * :command:`target_compile_features`
128
+ * :command:`target_compile_options`
129
+ * :command:`target_include_directories`
130
+ * :command:`target_link_libraries`
131
+ * :command:`target_link_directories`
132
+ * :command:`target_link_options`
133
+ * :command:`target_sources`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/unset.rst ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ unset
2
+ -----
3
+
4
+ Unset a variable, cache variable, or environment variable.
5
+
6
+ Unset Normal Variable or Cache Entry
7
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8
+
9
+ .. code-block:: cmake
10
+
11
+ unset(<variable> [CACHE | PARENT_SCOPE])
12
+
13
+ Removes a normal variable from the current scope, causing it
14
+ to become undefined. If ``CACHE`` is present, then a cache variable
15
+ is removed instead of a normal variable.
16
+
17
+ If ``PARENT_SCOPE`` is present then the variable is removed from the scope
18
+ above the current scope. See the same option in the :command:`set` command
19
+ for further details.
20
+
21
+ .. include:: UNSET_NOTE.txt
22
+
23
+ Unset Environment Variable
24
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
25
+
26
+ .. code-block:: cmake
27
+
28
+ unset(ENV{<variable>})
29
+
30
+ Removes ``<variable>`` from the currently available
31
+ :manual:`Environment Variables <cmake-env-variables(7)>`.
32
+ Subsequent calls of ``$ENV{<variable>}`` will return the empty string.
33
+
34
+ This command affects only the current CMake process, not the process
35
+ from which CMake was called, nor the system environment at large,
36
+ nor the environment of subsequent build or test processes.
37
+
38
+ See Also
39
+ ^^^^^^^^
40
+
41
+ * :command:`set`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/utility_source.rst ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ utility_source
2
+ --------------
3
+
4
+ Disallowed since version 3.0. See CMake Policy :policy:`CMP0034`.
5
+
6
+ Specify the source tree of a third-party utility.
7
+
8
+ .. code-block:: cmake
9
+
10
+ utility_source(cache_entry executable_name
11
+ path_to_source [file1 file2 ...])
12
+
13
+ When a third-party utility's source is included in the distribution,
14
+ this command specifies its location and name. The cache entry will
15
+ not be set unless the ``path_to_source`` and all listed files exist. It
16
+ is assumed that the source tree of the utility will have been built
17
+ before it is needed.
18
+
19
+ When cross compiling CMake will print a warning if a ``utility_source()``
20
+ command is executed, because in many cases it is used to build an
21
+ executable which is executed later on. This doesn't work when cross
22
+ compiling, since the executable can run only on their target platform.
23
+ So in this case the cache entry has to be adjusted manually so it
24
+ points to an executable which is runnable on the build host.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/variable_watch.rst ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ variable_watch
2
+ --------------
3
+
4
+ Watch the CMake variable for change.
5
+
6
+ .. code-block:: cmake
7
+
8
+ variable_watch(<variable> [<command>])
9
+
10
+ If the specified ``<variable>`` changes and no ``<command>`` is given,
11
+ a message will be printed to inform about the change.
12
+
13
+ If ``<command>`` is given, this command will be executed instead.
14
+ The command will receive the following arguments:
15
+ ``COMMAND(<variable> <access> <value> <current_list_file> <stack>)``
16
+
17
+ ``<variable>``
18
+ Name of the variable being accessed.
19
+
20
+ ``<access>``
21
+ One of ``READ_ACCESS``, ``UNKNOWN_READ_ACCESS``, ``MODIFIED_ACCESS``,
22
+ ``UNKNOWN_MODIFIED_ACCESS``, or ``REMOVED_ACCESS``. The ``UNKNOWN_``
23
+ values are only used when the variable has never been set. Once set,
24
+ they are never used again during the same CMake run, even if the
25
+ variable is later unset.
26
+
27
+ ``<value>``
28
+ The value of the variable. On a modification, this is the new
29
+ (modified) value of the variable. On removal, the value is empty.
30
+
31
+ ``<current_list_file>``
32
+ Full path to the file doing the access.
33
+
34
+ ``<stack>``
35
+ List of absolute paths of all files currently on the stack of file
36
+ inclusion, with the bottom-most file first and the currently
37
+ processed file (that is, ``current_list_file``) last.
38
+
39
+ Note that for some accesses such as :command:`list(APPEND)`, the watcher
40
+ is executed twice, first with a read access and then with a write one.
41
+ Also note that an :command:`if(DEFINED)` query on the variable does not
42
+ register as an access and the watcher is not executed.
43
+
44
+ Only non-cache variables can be watched using this command. Access to
45
+ cache variables is never watched. However, the existence of a cache
46
+ variable ``var`` causes accesses to the non-cache variable ``var`` to
47
+ not use the ``UNKNOWN_`` prefix, even if a non-cache variable ``var``
48
+ has never existed.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/command/while.rst ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ while
2
+ -----
3
+
4
+ Evaluate a group of commands while a condition is true
5
+
6
+ .. code-block:: cmake
7
+
8
+ while(<condition>)
9
+ <commands>
10
+ endwhile()
11
+
12
+ All commands between while and the matching :command:`endwhile` are recorded
13
+ without being invoked. Once the :command:`endwhile` is evaluated, the
14
+ recorded list of commands is invoked as long as the ``<condition>`` is true.
15
+
16
+ The ``<condition>`` has the same syntax and is evaluated using the same logic
17
+ as described at length for the :command:`if` command.
18
+
19
+ The commands :command:`break` and :command:`continue` provide means to
20
+ escape from the normal control flow.
21
+
22
+ Per legacy, the :command:`endwhile` command admits
23
+ an optional ``<condition>`` argument.
24
+ If used, it must be a verbatim repeat of the argument of the opening
25
+ ``while`` command.
26
+
27
+ See Also
28
+ ^^^^^^^^
29
+
30
+ * :command:`break`
31
+ * :command:`continue`
32
+ * :command:`foreach`
33
+ * :command:`endwhile`
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/ANDROID_NATIVE_LIB_DIRECTORIES.rst ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ANDROID_NATIVE_LIB_DIRECTORIES
2
+ ------------------------------
3
+
4
+ .. versionadded:: 3.4
5
+
6
+ Set the Android property that specifies directories to search for the ``.so``
7
+ libraries.
8
+
9
+ This a string property that contains the directory paths separated
10
+ by semicolons.
11
+
12
+ This property is initialized by the value of the
13
+ :variable:`CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES` variable if it is set when a
14
+ target is created.
15
+
16
+ Contents of ``ANDROID_NATIVE_LIB_DIRECTORIES`` may use "generator expressions"
17
+ with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
18
+ manual for available expressions.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/AUTOMOC_EXECUTABLE.rst ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AUTOMOC_EXECUTABLE
2
+ ------------------
3
+
4
+ .. versionadded:: 3.14
5
+
6
+ ``AUTOMOC_EXECUTABLE`` is file path pointing to the ``moc``
7
+ executable to use for :prop_tgt:`AUTOMOC` enabled files. Setting
8
+ this property will make CMake skip the automatic detection of the
9
+ ``moc`` binary as well as the sanity-tests normally run to ensure
10
+ that the binary is available and working as expected.
11
+
12
+ Usually this property does not need to be set. Only consider this
13
+ property if auto-detection of ``moc`` can not work -- e.g. because
14
+ you are building the ``moc`` binary as part of your project.
15
+
16
+ See the :manual:`cmake-qt(7)` manual for more information on using CMake
17
+ with Qt.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/BUILD_RPATH.rst ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ BUILD_RPATH
2
+ -----------
3
+
4
+ .. versionadded:: 3.8
5
+
6
+ A :ref:`semicolon-separated list <CMake Language Lists>` specifying
7
+ runtime path (``RPATH``) entries to add to binaries linked in the
8
+ build tree (for platforms that support it). By default, CMake sets
9
+ the runtime path of binaries in the build tree to contain search
10
+ paths it knows are needed to find the shared libraries they link.
11
+ Projects may set ``BUILD_RPATH`` to specify additional search paths.
12
+
13
+ The build-tree runtime path will *not* be used for binaries in the
14
+ install tree. It will be replaced with the install-tree runtime path
15
+ during the installation step. See also the :prop_tgt:`INSTALL_RPATH`
16
+ target property.
17
+
18
+ This property is initialized by the value of the variable
19
+ :variable:`CMAKE_BUILD_RPATH` if it is set when a target is created.
20
+
21
+ This property supports
22
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
23
+
24
+ Other settings that affect the build-tree runtime path include:
25
+
26
+ * The :variable:`CMAKE_SKIP_RPATH` variable completely disables runtime
27
+ paths in both the build tree and install tree.
28
+
29
+ * The :prop_tgt:`SKIP_BUILD_RPATH` target property disables setting any
30
+ runtime path in the build tree.
31
+
32
+ * The :prop_tgt:`BUILD_RPATH_USE_ORIGIN` target property causes the
33
+ automatically-generated runtime path to use entries relative to ``$ORIGIN``.
34
+
35
+ * The :prop_tgt:`BUILD_WITH_INSTALL_RPATH` target property causes binaries
36
+ in the build tree to be built with the install-tree runtime path.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/BUILD_WITH_INSTALL_RPATH.rst ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ BUILD_WITH_INSTALL_RPATH
2
+ ------------------------
3
+
4
+ ``BUILD_WITH_INSTALL_RPATH`` is a boolean specifying whether to link the target
5
+ in the build tree with the :prop_tgt:`INSTALL_RPATH`. This takes precedence
6
+ over :prop_tgt:`SKIP_BUILD_RPATH` and avoids the need for relinking before
7
+ installation.
8
+
9
+ This property is initialized by the value of the
10
+ :variable:`CMAKE_BUILD_WITH_INSTALL_RPATH` variable if it is set when a target
11
+ is created.
12
+
13
+ If policy :policy:`CMP0068` is not ``NEW``, this property also controls use of
14
+ :prop_tgt:`INSTALL_NAME_DIR` in the build tree on macOS. Either way, the
15
+ :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property takes precedence.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/BUNDLE_EXTENSION.rst ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ BUNDLE_EXTENSION
2
+ ----------------
3
+
4
+ The file extension used to name a :prop_tgt:`BUNDLE`, a :prop_tgt:`FRAMEWORK`,
5
+ or a :prop_tgt:`MACOSX_BUNDLE` target on the macOS and iOS.
6
+
7
+ The default value is ``bundle``, ``framework``, or ``app`` for the respective
8
+ target types.
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/COMPILE_PDB_NAME.rst ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ COMPILE_PDB_NAME
2
+ ----------------
3
+
4
+ .. versionadded:: 3.1
5
+
6
+ Output name for the MS debug symbol ``.pdb`` file generated by the
7
+ compiler while building source files.
8
+
9
+ This property specifies the base name for the debug symbols file.
10
+ If not set, the default is unspecified.
11
+
12
+ .. |PDB_XXX| replace:: :prop_tgt:`PDB_NAME`
13
+ .. include:: COMPILE_PDB_NOTE.txt
openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Help/prop_tgt/C_EXTENSIONS.rst ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ C_EXTENSIONS
2
+ ------------
3
+
4
+ .. versionadded:: 3.1
5
+
6
+ Boolean specifying whether compiler specific extensions are requested.
7
+
8
+ This property specifies whether compiler specific extensions should be
9
+ used. For some compilers, this results in adding a flag such
10
+ as ``-std=gnu11`` instead of ``-std=c11`` to the compile line. This
11
+ property is ``ON`` by default. The basic C standard level is
12
+ controlled by the :prop_tgt:`C_STANDARD` target property.
13
+
14
+ See the :manual:`cmake-compile-features(7)` manual for information on
15
+ compile features and a list of supported compilers.
16
+
17
+ This property is initialized by the value of
18
+ the :variable:`CMAKE_C_EXTENSIONS` variable if set when a target is created and
19
+ otherwise by the value of
20
+ :variable:`CMAKE_C_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>` (see
21
+ :policy:`CMP0128`).