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