1CMAKE(1)                             CMake                            CMAKE(1)
2
3
4

NAME

6       cmake - CMake Command-Line Reference
7

SYNOPSIS

9          Generate a Project Buildsystem
10           cmake [<options>] <path-to-source>
11           cmake [<options>] <path-to-existing-build>
12           cmake [<options>] -S <path-to-source> -B <path-to-build>
13
14          Build a Project
15           cmake --build <dir> [<options>] [-- <build-tool-options>]
16
17          Install a Project
18           cmake --install <dir> [<options>]
19
20          Open a Project
21           cmake --open <dir>
22
23          Run a Script
24           cmake [{-D <var>=<value>}...] -P <cmake-script-file>
25
26          Run a Command-Line Tool
27           cmake -E <command> [<options>]
28
29          Run the Find-Package Tool
30           cmake --find-package [<options>]
31
32          View Help
33           cmake --help[-<topic>]
34

DESCRIPTION

36       The  cmake  executable is the command-line interface of the cross-plat‐
37       form buildsystem generator CMake.  The  above  Synopsis  lists  various
38       actions the tool can perform as described in sections below.
39
40       To build a software project with CMake, Generate a Project Buildsystem.
41       Optionally use cmake to Build a Project, Install a Project or just  run
42       the  corresponding  build tool (e.g. make) directly.  cmake can also be
43       used to View Help.
44
45       The other actions are meant for  use  by  software  developers  writing
46       scripts in the CMake language to support their builds.
47
48       For  graphical  user interfaces that may be used in place of cmake, see
49       ccmake and cmake-gui.  For command-line interfaces to the CMake testing
50       and packaging facilities, see ctest and cpack.
51
52       For  more  information on CMake at large, see also the links at the end
53       of this manual.
54

INTRODUCTION TO CMAKE BUILDSYSTEMS

56       A buildsystem describes  how  to  build  a  project’s  executables  and
57       libraries  from  its  source  code  using  a build tool to automate the
58       process.  For example, a buildsystem may be a Makefile for use  with  a
59       command-line  make tool or a project file for an Integrated Development
60       Environment  (IDE).   In  order  to  avoid  maintaining  multiple  such
61       buildsystems,  a  project  may specify its buildsystem abstractly using
62       files written in the CMake language.  From these files CMake  generates
63       a  preferred buildsystem locally for each user through a backend called
64       a generator.
65
66       To generate a buildsystem with CMake, the following must be selected:
67
68       Source Tree
69              The top-level directory containing source files provided by  the
70              project.   The  project specifies its buildsystem using files as
71              described in  the  cmake-language(7)  manual,  starting  with  a
72              top-level  file named CMakeLists.txt.  These files specify build
73              targets   and   their   dependencies   as   described   in   the
74              cmake-buildsystem(7) manual.
75
76       Build Tree
77              The  top-level  directory  in  which buildsystem files and build
78              output artifacts (e.g. executables  and  libraries)  are  to  be
79              stored.   CMake will write a CMakeCache.txt file to identify the
80              directory as a build tree and store persistent information  such
81              as buildsystem configuration options.
82
83              To  maintain  a  pristine  source tree, perform an out-of-source
84              build by using a separate dedicated build  tree.   An  in-source
85              build in which the build tree is placed in the same directory as
86              the source tree is also supported, but discouraged.
87
88       Generator
89              This chooses the kind  of  buildsystem  to  generate.   See  the
90              cmake-generators(7)  manual for documentation of all generators.
91              Run cmake --help to see a list of generators available  locally.
92              Optionally  use  the  -G option below to specify a generator, or
93              simply accept the default CMake chooses for  the  current  plat‐
94              form.
95
96              When  using  one of the Command-Line Build Tool Generators CMake
97              expects that the environment needed by the compiler toolchain is
98              already  configured  in  the  shell.   When using one of the IDE
99              Build Tool Generators, no particular environment is needed.
100

GENERATE A PROJECT BUILDSYSTEM

102       Run CMake with one of the following command signatures to  specify  the
103       source and build trees and generate a buildsystem:
104
105       cmake [<options>] <path-to-source>
106              Uses  the  current  working  directory  as  the  build tree, and
107              <path-to-source> as the source tree.  The specified path may  be
108              absolute  or  relative  to  the  current working directory.  The
109              source tree must contain a CMakeLists.txt file and must not con‐
110              tain  a  CMakeCache.txt  file  because  the latter identifies an
111              existing build tree.  For example:
112
113                 $ mkdir build ; cd build
114                 $ cmake ../src
115
116       cmake [<options>] <path-to-existing-build>
117              Uses <path-to-existing-build> as the build tree, and  loads  the
118              path to the source tree from its CMakeCache.txt file, which must
119              have already been generated by a previous  run  of  CMake.   The
120              specified  path may be absolute or relative to the current work‐
121              ing directory.  For example:
122
123                 $ cd build
124                 $ cmake .
125
126       cmake [<options>] -S <path-to-source> -B <path-to-build>
127              Uses <path-to-build> as the build tree and  <path-to-source>  as
128              the  source  tree.  The specified paths may be absolute or rela‐
129              tive to the current working directory.   The  source  tree  must
130              contain  a  CMakeLists.txt file.  The build tree will be created
131              automatically if it does not already exist.  For example:
132
133                 $ cmake -S src -B build
134
135       In all cases the <options> may be zero or more of the Options below.
136
137       After generating a buildsystem one may  use  the  corresponding  native
138       build  tool  to  build  the project.  For example, after using the Unix
139       Makefiles generator one may run make directly:
140
141              $ make
142              $ make install
143
144       Alternatively, one may use cmake to Build a  Project  by  automatically
145       choosing and invoking the appropriate native build tool.
146
147   Options
148       -S <path-to-source>
149              Path to root directory of the CMake project to build.
150
151       -B <path-to-build>
152              Path  to  directory  which  CMake  will use as the root of build
153              directory.
154
155              If the directory doesn’t already exist CMake will make it.
156
157       -C <initial-cache>
158              Pre-load a script to populate the cache.
159
160              When CMake is first run in an empty build  tree,  it  creates  a
161              CMakeCache.txt  file and populates it with customizable settings
162              for the project.  This option may be used to specify a file from
163              which  to  load  cache entries before the first pass through the
164              project’s CMake listfiles.  The  loaded  entries  take  priority
165              over  the  project’s default values.  The given file should be a
166              CMake script  containing  set()  commands  that  use  the  CACHE
167              option, not a cache-format file.
168
169              References  to  CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR within the
170              script evaluate to the top-level source and build tree.
171
172       -D <var>:<type>=<value>, -D <var>=<value>
173              Create or update a CMake CACHE entry.
174
175              When CMake is first run in an empty build  tree,  it  creates  a
176              CMakeCache.txt  file and populates it with customizable settings
177              for the project.  This option may be used to specify  a  setting
178              that  takes  priority  over  the  project’s  default value.  The
179              option may be repeated for as many CACHE entries as desired.
180
181              If the :<type> portion is given it must  be  one  of  the  types
182              specified  by the set() command documentation for its CACHE sig‐
183              nature.  If the :<type> portion is omitted  the  entry  will  be
184              created  with  no type if it does not exist with a type already.
185              If a command in the project sets the type to  PATH  or  FILEPATH
186              then the <value> will be converted to an absolute path.
187
188              This   option   may   also   be  given  as  a  single  argument:
189              -D<var>:<type>=<value> or -D<var>=<value>.
190
191       -U <globbing_expr>
192              Remove matching entries from CMake CACHE.
193
194              This option may be used to remove one or more variables from the
195              CMakeCache.txt file, globbing expressions using * and ? are sup‐
196              ported.  The option may be repeated for as many CACHE entries as
197              desired.
198
199              Use with care, you can make your CMakeCache.txt non-working.
200
201       -G <generator-name>
202              Specify a build system generator.
203
204              CMake may support multiple native build systems on certain plat‐
205              forms.  A generator is responsible for generating  a  particular
206              build  system.   Possible  generator  names are specified in the
207              cmake-generators(7) manual.
208
209              If not specified, CMake checks the  CMAKE_GENERATOR  environment
210              variable  and  otherwise  falls back to a builtin default selec‐
211              tion.
212
213       -T <toolset-spec>
214              Toolset specification for the generator, if supported.
215
216              Some CMake generators support a toolset  specification  to  tell
217              the  native  build  system  how  to  choose a compiler.  See the
218              CMAKE_GENERATOR_TOOLSET variable for details.
219
220       -A <platform-name>
221              Specify platform name if supported by generator.
222
223              Some CMake generators support a platform name to be given to the
224              native  build  system  to  choose  a  compiler  or SDK.  See the
225              CMAKE_GENERATOR_PLATFORM variable for details.
226
227       -Wno-dev
228              Suppress developer warnings.
229
230              Suppress warnings that are meant for the author  of  the  CMake‐
231              Lists.txt  files. By default this will also turn off deprecation
232              warnings.
233
234       -Wdev  Enable developer warnings.
235
236              Enable warnings that are meant for  the  author  of  the  CMake‐
237              Lists.txt  files.  By default this will also turn on deprecation
238              warnings.
239
240       -Werror=dev
241              Make developer warnings errors.
242
243              Make warnings that are  meant  for  the  author  of  the  CMake‐
244              Lists.txt files errors. By default this will also turn on depre‐
245              cated warnings as errors.
246
247       -Wno-error=dev
248              Make developer warnings not errors.
249
250              Make warnings that are  meant  for  the  author  of  the  CMake‐
251              Lists.txt  files  not errors. By default this will also turn off
252              deprecated warnings as errors.
253
254       -Wdeprecated
255              Enable deprecated functionality warnings.
256
257              Enable warnings for usage of deprecated functionality, that  are
258              meant for the author of the CMakeLists.txt files.
259
260       -Wno-deprecated
261              Suppress deprecated functionality warnings.
262
263              Suppress  warnings  for  usage of deprecated functionality, that
264              are meant for the author of the CMakeLists.txt files.
265
266       -Werror=deprecated
267              Make deprecated macro and function warnings errors.
268
269              Make warnings for usage of deprecated macros and functions, that
270              are meant for the author of the CMakeLists.txt files, errors.
271
272       -Wno-error=deprecated
273              Make deprecated macro and function warnings not errors.
274
275              Make warnings for usage of deprecated macros and functions, that
276              are meant for  the  author  of  the  CMakeLists.txt  files,  not
277              errors.
278
279       -L[A][H]
280              List non-advanced cached variables.
281
282              List  CACHE  variables will run CMake and list all the variables
283              from the  CMake  CACHE  that  are  not  marked  as  INTERNAL  or
284              ADVANCED.  This will effectively display current CMake settings,
285              which can then be changed with -D option.  Changing some of  the
286              variables  may  result in more variables being created.  If A is
287              specified, then it will display also advanced variables.   If  H
288              is specified, it will also display help for each variable.
289
290       -N     View mode only.
291
292              Only load the cache.  Do not actually run configure and generate
293              steps.
294
295       --graphviz=[file]
296              Generate graphviz of dependencies, see CMakeGraphVizOptions  for
297              more.
298
299              Generate a graphviz input file that will contain all the library
300              and executable dependencies in the project.  See the  documenta‐
301              tion for CMakeGraphVizOptions for more details.
302
303       --system-information [file]
304              Dump information about this system.
305
306              Dump  a  wide range of information about the current system.  If
307              run from the top of a binary tree for a CMake  project  it  will
308              dump additional information such as the cache, log files etc.
309
310       --log-level=<ERROR|WARNING|NOTICE|STATUS|VERBOSE|DEBUG|TRACE>
311              Set the log level.
312
313              The message() command will only output messages of the specified
314              log level or higher.  The default log level is STATUS.
315
316              For backward compatibility reasons, --loglevel is also  accepted
317              as a synonym for this option.
318
319       --debug-trycompile
320              Do  not delete the try_compile() build tree.  Only useful on one
321              try_compile() at a time.
322
323              Do not delete the files and  directories  created  for  try_com‐
324              pile()  calls.  This is useful in debugging failed try_compiles.
325              It may however change the results of  the  try-compiles  as  old
326              junk  from  a previous try-compile may cause a different test to
327              either pass or fail incorrectly.  This option is best  used  for
328              one try-compile at a time, and only when debugging.
329
330       --debug-output
331              Put cmake in a debug mode.
332
333              Print  extra  information during the cmake run like stack traces
334              with message(SEND_ERROR) calls.
335
336       --trace
337              Put cmake in trace mode.
338
339              Print a trace of all calls made and from where.
340
341       --trace-expand
342              Put cmake in trace mode.
343
344              Like --trace, but with variables expanded.
345
346       --trace-source=<file>
347              Put cmake in trace mode, but output only lines  of  a  specified
348              file.
349
350              Multiple options are allowed.
351
352       --trace-redirect=<file>
353              Put  cmake  in  trace  mode  and redirect trace output to a file
354              instead of stderr.
355
356       --warn-uninitialized
357              Warn about uninitialized values.
358
359              Print a warning when an uninitialized variable is used.
360
361       --warn-unused-vars
362              Warn about unused variables.
363
364              Find variables that are declared or set, but not used.
365
366       --no-warn-unused-cli
367              Don’t warn about command line options.
368
369              Don’t find variables that are declared on the command line,  but
370              not used.
371
372       --check-system-vars
373              Find problems with variable usage in system files.
374
375              Normally,  unused  and  uninitialized variables are searched for
376              only in CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR.  This flag  tells
377              CMake to warn about other files as well.
378

BUILD A PROJECT

380       CMake  provides  a command-line signature to build an already-generated
381       project binary tree:
382
383          cmake --build <dir> [<options>] [-- <build-tool-options>]
384
385       This abstracts a native build tool’s command-line  interface  with  the
386       following options:
387
388       --build <dir>
389              Project binary directory to be built.  This is required and must
390              be first.
391
392       --parallel [<jobs>], -j [<jobs>]
393              The maximum number of concurrent processes to use when building.
394              If  <jobs>  is omitted the native build tool’s default number is
395              used.
396
397              The CMAKE_BUILD_PARALLEL_LEVEL  environment  variable,  if  set,
398              specifies  a  default  parallel  level  when  this option is not
399              given.
400
401              Some native build tools always build in parallel.   The  use  of
402              <jobs> value of 1 can be used to limit to a single job.
403
404       --target <tgt>..., -t <tgt>...
405              Build <tgt> instead of the default target.  Multiple targets may
406              be given, separated by spaces.
407
408       --config <cfg>
409              For multi-configuration tools, choose configuration <cfg>.
410
411       --clean-first
412              Build target clean first,  then  build.   (To  clean  only,  use
413              --target clean.)
414
415       --use-stderr
416              Ignored.  Behavior is default in CMake >= 3.0.
417
418       --verbose, -v
419              Enable  verbose output - if supported - including the build com‐
420              mands to be executed.
421
422              This option can be omitted if VERBOSE  environment  variable  or
423              CMAKE_VERBOSE_MAKEFILE cached variable is set.
424
425       --     Pass remaining options to the native tool.
426
427       Run cmake --build with no options for quick help.
428

INSTALL A PROJECT

430       CMake provides a command-line signature to install an already-generated
431       project binary tree:
432
433          cmake --install <dir> [<options>]
434
435       This may be used after building a project to run  installation  without
436       using the generated build system or the native build tool.  The options
437       are:
438
439       --install <dir>
440              Project binary directory to install. This is required  and  must
441              be first.
442
443       --config <cfg>
444              For multi-configuration generators, choose configuration <cfg>.
445
446       --component <comp>
447              Component-based install. Only install component <comp>.
448
449       --prefix <prefix>
450              Override the installation prefix, CMAKE_INSTALL_PREFIX.
451
452       --strip
453              Strip before installing.
454
455       -v, --verbose
456              Enable verbose output.
457
458              This  option  can  be omitted if VERBOSE environment variable is
459              set.
460
461       Run cmake --install with no options for quick help.
462

OPEN A PROJECT

464          cmake --open <dir>
465
466       Open the generated project in the associated application.  This is only
467       supported by some generators.
468

RUN A SCRIPT

470          cmake [{-D <var>=<value>}...] -P <cmake-script-file>
471
472       Process the given cmake file as a script written in the CMake language.
473       No configure or generate step is performed and the cache is  not  modi‐
474       fied.   If variables are defined using -D, this must be done before the
475       -P argument.
476

RUN A COMMAND-LINE TOOL

478       CMake provides builtin command-line tools through the signature
479
480          cmake -E <command> [<options>]
481
482       Run cmake -E or cmake -E help for a  summary  of  commands.   Available
483       commands are:
484
485       capabilities
486              Report  cmake  capabilities in JSON format. The output is a JSON
487              object with the following keys:
488
489              version
490                     A JSON object with version information. Keys are:
491
492                     string The full version  string  as  displayed  by  cmake
493                            --version.
494
495                     major  The major version number in integer form.
496
497                     minor  The minor version number in integer form.
498
499                     patch  The patch level in integer form.
500
501                     suffix The cmake version suffix string.
502
503                     isDirty
504                            A  bool  that  is set if the cmake build is from a
505                            dirty tree.
506
507              generators
508                     A list available generators. Each  generator  is  a  JSON
509                     object with the following keys:
510
511                     name   A string containing the name of the generator.
512
513                     toolsetSupport
514                            true  if the generator supports toolsets and false
515                            otherwise.
516
517                     platformSupport
518                            true if the generator supports platforms and false
519                            otherwise.
520
521                     extraGenerators
522                            A  list  of  strings with all the extra generators
523                            compatible with the generator.
524
525              fileApi
526                     Optional   member    that    is    present    when    the
527                     cmake-file-api(7)  is  available.   The  value  is a JSON
528                     object with one member:
529
530                     requests
531                            A JSON array containing  zero  or  more  supported
532                            file-api  requests.  Each request is a JSON object
533                            with members:
534
535                            kind   Specifies one  of  the  supported  file-api
536                                   object kinds.
537
538                            version
539                                   A JSON array whose elements are each a JSON
540                                   object containing major and  minor  members
541                                   specifying   non-negative  integer  version
542                                   components.
543
544              serverMode
545                     true if cmake supports server-mode and false otherwise.
546
547       chdir <dir> <cmd> [<arg>...]
548              Change the current working directory and run a command.
549
550       compare_files [--ignore-eol] <file1> <file2>
551              Check if <file1> is same as <file2>. If files are the same, then
552              returns 0, if not it returns 1.  The --ignore-eol option implies
553              line-wise comparison and ignores LF/CRLF differences.
554
555       copy <file>... <destination>
556              Copy files to <destination> (either file or directory).  If mul‐
557              tiple  files  are specified, the <destination> must be directory
558              and it must exist. Wildcards are not supported.  copy does  fol‐
559              low  symlinks.  That  means  it  does not copy symlinks, but the
560              files or directories it point to.
561
562       copy_directory <dir>... <destination>
563              Copy content of <dir>... directories to <destination> directory.
564              If  <destination>  directory  does not exist it will be created.
565              copy_directory does follow symlinks.
566
567       copy_if_different <file>... <destination>
568              Copy files to <destination> (either file or directory)  if  they
569              have  changed.   If  multiple files are specified, the <destina‐
570              tion> must be directory and it  must  exist.   copy_if_different
571              does follow symlinks.
572
573       create_symlink <old> <new>
574              Create a symbolic link <new> naming <old>.
575
576              NOTE:
577                 Path  to  where  <new>  symbolic  link will be created has to
578                 exist beforehand.
579
580       echo [<string>...]
581              Displays arguments as text.
582
583       echo_append [<string>...]
584              Displays arguments as text but no new line.
585
586       env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...
587              Run command in a modified environment.
588
589       environment
590              Display the current environment variables.
591
592       false  Do nothing, with an exit code of 1.
593
594       make_directory <dir>...
595              Create <dir> directories.  If necessary, create parent  directo‐
596              ries  too.   If  a  directory already exists it will be silently
597              ignored.
598
599       md5sum <file>...
600              Create MD5 checksum of files in md5sum compatible format:
601
602                 351abe79cd3800b38cdfb25d45015a15  file1.txt
603                 052f86c15bbde68af55c7f7b340ab639  file2.txt
604
605       sha1sum <file>...
606              Create SHA1 checksum of files in sha1sum compatible format:
607
608                 4bb7932a29e6f73c97bb9272f2bdc393122f86e0  file1.txt
609                 1df4c8f318665f9a5f2ed38f55adadb7ef9f559c  file2.txt
610
611       sha224sum <file>...
612              Create SHA224 checksum of files in sha224sum compatible format:
613
614                 b9b9346bc8437bbda630b0b7ddfc5ea9ca157546dbbf4c613192f930  file1.txt
615                 6dfbe55f4d2edc5fe5c9197bca51ceaaf824e48eba0cc453088aee24  file2.txt
616
617       sha256sum <file>...
618              Create SHA256 checksum of files in sha256sum compatible format:
619
620                 76713b23615d31680afeb0e9efe94d47d3d4229191198bb46d7485f9cb191acc  file1.txt
621                 15b682ead6c12dedb1baf91231e1e89cfc7974b3787c1e2e01b986bffadae0ea  file2.txt
622
623       sha384sum <file>...
624              Create SHA384 checksum of files in sha384sum compatible format:
625
626                 acc049fedc091a22f5f2ce39a43b9057fd93c910e9afd76a6411a28a8f2b8a12c73d7129e292f94fc0329c309df49434  file1.txt
627                 668ddeb108710d271ee21c0f3acbd6a7517e2b78f9181c6a2ff3b8943af92b0195dcb7cce48aa3e17893173c0a39e23d  file2.txt
628
629       sha512sum <file>...
630              Create SHA512 checksum of files in sha512sum compatible format:
631
632                 2a78d7a6c5328cfb1467c63beac8ff21794213901eaadafd48e7800289afbc08e5fb3e86aa31116c945ee3d7bf2a6194489ec6101051083d1108defc8e1dba89  file1.txt
633                 7a0b54896fe5e70cca6dd643ad6f672614b189bf26f8153061c4d219474b05dad08c4e729af9f4b009f1a1a280cb625454bf587c690f4617c27e3aebdf3b7a2d  file2.txt
634
635       remove [-f] <file>...
636              Remove the file(s). If any of the listed files  already  do  not
637              exist,  the command returns a non-zero exit code, but no message
638              is logged. The -f option changes the behavior to return  a  zero
639              exit  code  (i.e.  success)  in such situations instead.  remove
640              does not follow symlinks. That means it remove only symlinks and
641              not files it point to.
642
643       remove_directory <dir>...
644              Remove  <dir>  directories  and  their contents.  If a directory
645              does not exist it will be silently ignored.  If <dir> is a  sym‐
646              link to a directory, just the symlink will be removed.
647
648       rename <oldname> <newname>
649              Rename  a  file  or  directory (on one volume). If file with the
650              <newname>  name  already  exists,  then  it  will  be   silently
651              replaced.
652
653       server Launch cmake-server(7) mode.
654
655       sleep <number>...
656              Sleep for given number of seconds.
657
658       tar [cxt][vf][zjJ] file.tar [<options>] [--] [<pathname>...]
659              Create or extract a tar or zip archive.  Options are:
660
661              c      Create  a new archive containing the specified files.  If
662                     used, the <pathname>... argument is mandatory.
663
664              x      Extract to disk  from  the  archive.   The  <pathname>...
665                     argument  could be used to extract only selected files or
666                     directories.  When extracting selected files or  directo‐
667                     ries,  you  must  provide their exact names including the
668                     path, as printed by list (-t).
669
670              t      List archive contents.  The <pathname>... argument  could
671                     be used to list only selected files or directories.
672
673              v      Produce verbose output.
674
675              z      Compress the resulting archive with gzip.
676
677              j      Compress the resulting archive with bzip2.
678
679              J      Compress the resulting archive with XZ.
680
681              --zstd Compress the resulting archive with Zstandard.
682
683              --files-from=<file>
684                     Read file names from the given file, one per line.  Blank
685                     lines are ignored.  Lines may not start in -  except  for
686                     --add-file=<name> to add files whose names start in -.
687
688              --format=<format>
689                     Specify  the  format  of the archive to be created.  Sup‐
690                     ported formats are: 7zip, gnutar, pax,  paxr  (restricted
691                     pax, default), and zip.
692
693              --mtime=<date>
694                     Specify modification time recorded in tarball entries.
695
696              --     Stop  interpreting  options and treat all remaining argu‐
697                     ments as file names, even if they start with -.
698
699       time <command> [<args>...]
700              Run command and display elapsed time.
701
702       touch <file>...
703              Creates <file> if file do not exist.  If <file>  exists,  it  is
704              changing <file> access and modification times.
705
706       touch_nocreate <file>...
707              Touch  a file if it exists but do not create it.  If a file does
708              not exist it will be silently ignored.
709
710       true   Do nothing, with an exit code of 0.
711
712   Windows-specific Command-Line Tools
713       The following cmake -E commands are available only on Windows:
714
715       delete_regv <key>
716              Delete Windows registry value.
717
718       env_vs8_wince <sdkname>
719              Displays a batch file which sets the environment  for  the  pro‐
720              vided Windows CE SDK installed in VS2005.
721
722       env_vs9_wince <sdkname>
723              Displays  a  batch  file which sets the environment for the pro‐
724              vided Windows CE SDK installed in VS2008.
725
726       write_regv <key> <value>
727              Write Windows registry value.
728

RUN THE FIND-PACKAGE TOOL

730       CMake provides a pkg-config like helper for Makefile-based projects:
731
732          cmake --find-package [<options>]
733
734       It searches a package using find_package()  and  prints  the  resulting
735       flags  to  stdout.   This  can  be  used  instead of pkg-config to find
736       installed libraries  in  plain  Makefile-based  projects  or  in  auto‐
737       conf-based projects (via share/aclocal/cmake.m4).
738
739       NOTE:
740          This  mode  is not well-supported due to some technical limitations.
741          It is kept for compatibility but should not be used in new projects.
742

VIEW HELP

744       To print selected pages from the CMake documentation, use
745
746          cmake --help[-<topic>]
747
748       with one of the following options:
749
750       --help,-help,-usage,-h,-H,/?
751              Print usage information and exit.
752
753              Usage  describes  the  basic  command  line  interface  and  its
754              options.
755
756       --version,-version,/V [<f>]
757              Show program name/version banner and exit.
758
759              If  a  file  is  specified, the version is written into it.  The
760              help is printed to a named <f>ile if given.
761
762       --help-full [<f>]
763              Print all help manuals and exit.
764
765              All manuals are printed in a human-readable  text  format.   The
766              help is printed to a named <f>ile if given.
767
768       --help-manual <man> [<f>]
769              Print one help manual and exit.
770
771              The specified manual is printed in a human-readable text format.
772              The help is printed to a named <f>ile if given.
773
774       --help-manual-list [<f>]
775              List help manuals available and exit.
776
777              The list contains all manuals for which help may be obtained  by
778              using  the  --help-manual option followed by a manual name.  The
779              help is printed to a named <f>ile if given.
780
781       --help-command <cmd> [<f>]
782              Print help for one command and exit.
783
784              The cmake-commands(7) manual entry for <cmd>  is  printed  in  a
785              human-readable  text  format.   The  help  is printed to a named
786              <f>ile if given.
787
788       --help-command-list [<f>]
789              List commands with help available and exit.
790
791              The list contains all commands for which help may be obtained by
792              using the --help-command option followed by a command name.  The
793              help is printed to a named <f>ile if given.
794
795       --help-commands [<f>]
796              Print cmake-commands manual and exit.
797
798              The cmake-commands(7) manual is printed in a human-readable text
799              format.  The help is printed to a named <f>ile if given.
800
801       --help-module <mod> [<f>]
802              Print help for one module and exit.
803
804              The  cmake-modules(7)  manual  entry  for  <mod> is printed in a
805              human-readable text format.  The help  is  printed  to  a  named
806              <f>ile if given.
807
808       --help-module-list [<f>]
809              List modules with help available and exit.
810
811              The  list contains all modules for which help may be obtained by
812              using the --help-module option followed by a module  name.   The
813              help is printed to a named <f>ile if given.
814
815       --help-modules [<f>]
816              Print cmake-modules manual and exit.
817
818              The  cmake-modules(7) manual is printed in a human-readable text
819              format.  The help is printed to a named <f>ile if given.
820
821       --help-policy <cmp> [<f>]
822              Print help for one policy and exit.
823
824              The cmake-policies(7) manual entry for <cmp>  is  printed  in  a
825              human-readable  text  format.   The  help  is printed to a named
826              <f>ile if given.
827
828       --help-policy-list [<f>]
829              List policies with help available and exit.
830
831              The list contains all policies for which help may be obtained by
832              using  the  --help-policy option followed by a policy name.  The
833              help is printed to a named <f>ile if given.
834
835       --help-policies [<f>]
836              Print cmake-policies manual and exit.
837
838              The cmake-policies(7) manual is printed in a human-readable text
839              format.  The help is printed to a named <f>ile if given.
840
841       --help-property <prop> [<f>]
842              Print help for one property and exit.
843
844              The cmake-properties(7) manual entries for <prop> are printed in
845              a human-readable text format.  The help is printed  to  a  named
846              <f>ile if given.
847
848       --help-property-list [<f>]
849              List properties with help available and exit.
850
851              The  list contains all properties for which help may be obtained
852              by using the --help-property option followed by a property name.
853              The help is printed to a named <f>ile if given.
854
855       --help-properties [<f>]
856              Print cmake-properties manual and exit.
857
858              The  cmake-properties(7)  manual  is printed in a human-readable
859              text format.  The help is printed to a named <f>ile if given.
860
861       --help-variable <var> [<f>]
862              Print help for one variable and exit.
863
864              The cmake-variables(7) manual entry for <var> is  printed  in  a
865              human-readable  text  format.   The  help  is printed to a named
866              <f>ile if given.
867
868       --help-variable-list [<f>]
869              List variables with help available and exit.
870
871              The list contains all variables for which help may  be  obtained
872              by using the --help-variable option followed by a variable name.
873              The help is printed to a named <f>ile if given.
874
875       --help-variables [<f>]
876              Print cmake-variables manual and exit.
877
878              The cmake-variables(7) manual is  printed  in  a  human-readable
879              text format.  The help is printed to a named <f>ile if given.
880

SEE ALSO

882       The following resources are available to get help using CMake:
883
884       Home Page
885              https://cmake.org
886
887              The primary starting point for learning about CMake.
888
889       Online Documentation and Community Resources
890              https://cmake.org/documentation
891
892              Links  to available documentation and community resources may be
893              found on this web page.
894
895       Discourse Forum
896              https://discourse.cmake.org
897
898              The Discourse Forum hosts discussion and questions about CMake.
899
901       2000-2019 Kitware, Inc. and Contributors
902
903
904
905
9063.16.1                           Dec 14, 2019                         CMAKE(1)
Impressum