1CCMAKE(1) CMake CCMAKE(1)
2
3
4
6 ccmake - CMake Curses Dialog Command-Line Reference
7
9 ccmake [<options>] -B <path-to-build> [-S <path-to-source>]
10 ccmake [<options>] <path-to-source | path-to-existing-build>
11
13 The ccmake executable is the CMake curses interface. Project configu‐
14 ration settings may be specified interactively through this GUI. Brief
15 instructions are provided at the bottom of the terminal when the pro‐
16 gram is running.
17
18 CMake is a cross-platform build system generator. Projects specify
19 their build process with platform-independent CMake listfiles included
20 in each directory of a source tree with the name CMakeLists.txt. Users
21 build a project by using CMake to generate a build system for a native
22 tool on their platform.
23
25 -S <path-to-source>
26 Path to root directory of the CMake project to build.
27
28 -B <path-to-build>
29 Path to directory which CMake will use as the root of build di‐
30 rectory.
31
32 If the directory doesn't already exist CMake will make it.
33
34 -C <initial-cache>
35 Pre-load a script to populate the cache.
36
37 When CMake is first run in an empty build tree, it creates a
38 CMakeCache.txt file and populates it with customizable settings
39 for the project. This option may be used to specify a file from
40 which to load cache entries before the first pass through the
41 project's CMake listfiles. The loaded entries take priority
42 over the project's default values. The given file should be a
43 CMake script containing set() commands that use the CACHE op‐
44 tion, not a cache-format file.
45
46 References to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR within the
47 script evaluate to the top-level source and build tree.
48
49 -D <var>:<type>=<value>, -D <var>=<value>
50 Create or update a CMake CACHE entry.
51
52 When CMake is first run in an empty build tree, it creates a
53 CMakeCache.txt file and populates it with customizable settings
54 for the project. This option may be used to specify a setting
55 that takes priority over the project's default value. The op‐
56 tion may be repeated for as many CACHE entries as desired.
57
58 If the :<type> portion is given it must be one of the types
59 specified by the set() command documentation for its CACHE sig‐
60 nature. If the :<type> portion is omitted the entry will be
61 created with no type if it does not exist with a type already.
62 If a command in the project sets the type to PATH or FILEPATH
63 then the <value> will be converted to an absolute path.
64
65 This option may also be given as a single argument:
66 -D<var>:<type>=<value> or -D<var>=<value>.
67
68 It's important to note that the order of -C and -D arguments is
69 significant. They will be carried out in the order they are
70 listed, with the last argument taking precedence over the previ‐
71 ous ones. For example, if you specify -DCMAKE_BUILD_TYPE=Debug,
72 followed by a -C argument with a file that calls:
73
74 set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
75
76 then the -C argument will take precedence, and CMAKE_BUILD_TYPE
77 will be set to Release. However, if the -D argument comes after
78 the -C argument, it will be set to Debug.
79
80 If a set(... CACHE ...) call in the -C file does not use FORCE,
81 and a -D argument sets the same variable, the -D argument will
82 take precedence regardless of order because of the nature of
83 non-FORCE set(... CACHE ...) calls.
84
85 -U <globbing_expr>
86 Remove matching entries from CMake CACHE.
87
88 This option may be used to remove one or more variables from the
89 CMakeCache.txt file, globbing expressions using * and ? are sup‐
90 ported. The option may be repeated for as many CACHE entries as
91 desired.
92
93 Use with care, you can make your CMakeCache.txt non-working.
94
95 -G <generator-name>
96 Specify a build system generator.
97
98 CMake may support multiple native build systems on certain plat‐
99 forms. A generator is responsible for generating a particular
100 build system. Possible generator names are specified in the
101 cmake-generators(7) manual.
102
103 If not specified, CMake checks the CMAKE_GENERATOR environment
104 variable and otherwise falls back to a builtin default selec‐
105 tion.
106
107 -T <toolset-spec>
108 Toolset specification for the generator, if supported.
109
110 Some CMake generators support a toolset specification to tell
111 the native build system how to choose a compiler. See the
112 CMAKE_GENERATOR_TOOLSET variable for details.
113
114 -A <platform-name>
115 Specify platform name if supported by generator.
116
117 Some CMake generators support a platform name to be given to the
118 native build system to choose a compiler or SDK. See the
119 CMAKE_GENERATOR_PLATFORM variable for details.
120
121 --toolchain <path-to-file>
122 Specify the cross compiling toolchain file, equivalent to set‐
123 ting CMAKE_TOOLCHAIN_FILE variable.
124
125 --install-prefix <directory>
126 Specify the installation directory, used by the
127 CMAKE_INSTALL_PREFIX variable. Must be an absolute path.
128
129 -Wno-dev
130 Suppress developer warnings.
131
132 Suppress warnings that are meant for the author of the CMake‐
133 Lists.txt files. By default this will also turn off deprecation
134 warnings.
135
136 -Wdev Enable developer warnings.
137
138 Enable warnings that are meant for the author of the CMake‐
139 Lists.txt files. By default this will also turn on deprecation
140 warnings.
141
142 -Wdeprecated
143 Enable deprecated functionality warnings.
144
145 Enable warnings for usage of deprecated functionality, that are
146 meant for the author of the CMakeLists.txt files.
147
148 -Wno-deprecated
149 Suppress deprecated functionality warnings.
150
151 Suppress warnings for usage of deprecated functionality, that
152 are meant for the author of the CMakeLists.txt files.
153
154 -Werror=<what>
155 Treat CMake warnings as errors. <what> must be one of the fol‐
156 lowing:
157
158 dev Make developer warnings errors.
159
160 Make warnings that are meant for the author of the CMake‐
161 Lists.txt files errors. By default this will also turn on
162 deprecated warnings as errors.
163
164 deprecated
165 Make deprecated macro and function warnings errors.
166
167 Make warnings for usage of deprecated macros and func‐
168 tions, that are meant for the author of the CMake‐
169 Lists.txt files, errors.
170
171 -Wno-error=<what>
172 Do not treat CMake warnings as errors. <what> must be one of the
173 following:
174
175 dev Make warnings that are meant for the author of the CMake‐
176 Lists.txt files not errors. By default this will also
177 turn off deprecated warnings as errors.
178
179 deprecated
180 Make warnings for usage of deprecated macros and func‐
181 tions, that are meant for the author of the CMake‐
182 Lists.txt files, not errors.
183
184 -version [<file>], --version [<file>], /V [<file>]
185 Show program name/version banner and exit. The output is
186 printed to a named <file> if given.
187
188 -h, -H, --help, -help, -usage, /?
189 Print usage information and exit.
190
191 Usage describes the basic command line interface and its op‐
192 tions.
193
194 --help-full [<file>]
195 Print all help manuals and exit.
196
197 All manuals are printed in a human-readable text format. The
198 output is printed to a named <file> if given.
199
200 --help-manual <man> [<file>]
201 Print one help manual and exit.
202
203 The specified manual is printed in a human-readable text format.
204 The output is printed to a named <file> if given.
205
206 --help-manual-list [<file>]
207 List help manuals available and exit.
208
209 The list contains all manuals for which help may be obtained by
210 using the --help-manual option followed by a manual name. The
211 output is printed to a named <file> if given.
212
213 --help-command <cmd> [<file>]
214 Print help for one command and exit.
215
216 The cmake-commands(7) manual entry for <cmd> is printed in a hu‐
217 man-readable text format. The output is printed to a named
218 <file> if given.
219
220 --help-command-list [<file>]
221 List commands with help available and exit.
222
223 The list contains all commands for which help may be obtained by
224 using the --help-command option followed by a command name. The
225 output is printed to a named <file> if given.
226
227 --help-commands [<file>]
228 Print cmake-commands manual and exit.
229
230 The cmake-commands(7) manual is printed in a human-readable text
231 format. The output is printed to a named <file> if given.
232
233 --help-module <mod> [<file>]
234 Print help for one module and exit.
235
236 The cmake-modules(7) manual entry for <mod> is printed in a hu‐
237 man-readable text format. The output is printed to a named
238 <file> if given.
239
240 --help-module-list [<file>]
241 List modules with help available and exit.
242
243 The list contains all modules for which help may be obtained by
244 using the --help-module option followed by a module name. The
245 output is printed to a named <file> if given.
246
247 --help-modules [<file>]
248 Print cmake-modules manual and exit.
249
250 The cmake-modules(7) manual is printed in a human-readable text
251 format. The output is printed to a named <file> if given.
252
253 --help-policy <cmp> [<file>]
254 Print help for one policy and exit.
255
256 The cmake-policies(7) manual entry for <cmp> is printed in a hu‐
257 man-readable text format. The output is printed to a named
258 <file> if given.
259
260 --help-policy-list [<file>]
261 List policies with help available and exit.
262
263 The list contains all policies for which help may be obtained by
264 using the --help-policy option followed by a policy name. The
265 output is printed to a named <file> if given.
266
267 --help-policies [<file>]
268 Print cmake-policies manual and exit.
269
270 The cmake-policies(7) manual is printed in a human-readable text
271 format. The output is printed to a named <file> if given.
272
273 --help-property <prop> [<file>]
274 Print help for one property and exit.
275
276 The cmake-properties(7) manual entries for <prop> are printed in
277 a human-readable text format. The output is printed to a named
278 <file> if given.
279
280 --help-property-list [<file>]
281 List properties with help available and exit.
282
283 The list contains all properties for which help may be obtained
284 by using the --help-property option followed by a property name.
285 The output is printed to a named <file> if given.
286
287 --help-properties [<file>]
288 Print cmake-properties manual and exit.
289
290 The cmake-properties(7) manual is printed in a human-readable
291 text format. The output is printed to a named <file> if given.
292
293 --help-variable <var> [<file>]
294 Print help for one variable and exit.
295
296 The cmake-variables(7) manual entry for <var> is printed in a
297 human-readable text format. The output is printed to a named
298 <file> if given.
299
300 --help-variable-list [<file>]
301 List variables with help available and exit.
302
303 The list contains all variables for which help may be obtained
304 by using the --help-variable option followed by a variable name.
305 The output is printed to a named <file> if given.
306
307 --help-variables [<file>]
308 Print cmake-variables manual and exit.
309
310 The cmake-variables(7) manual is printed in a human-readable
311 text format. The output is printed to a named <file> if given.
312
314 The following resources are available to get help using CMake:
315
316 Home Page
317 https://cmake.org
318
319 The primary starting point for learning about CMake.
320
321 Online Documentation and Community Resources
322 https://cmake.org/documentation
323
324 Links to available documentation and community resources may be
325 found on this web page.
326
327 Discourse Forum
328 https://discourse.cmake.org
329
330 The Discourse Forum hosts discussion and questions about CMake.
331
333 2000-2023 Kitware, Inc. and Contributors
334
335
336
337
3383.27.7 Oct 07, 2023 CCMAKE(1)