All apps/CMake

CMake

cmake

Cross-platform build system generator.

Runs as cmake|macOS, Linux, Windows|cmake.org

Autocomplete

Fig spec, with what the manifest adds · 36 subcommands · 37 options
Published once and never changed; check the digest before caching
sha256
1ed2ec5ab7234a17220a400852ab6cc0b04b789a65ca1d917c46e04acdb602c9
Size
27085 bytes
Subcommands36 subcommands
cmake --build
Project binary directory to be built and must be first. This is required unless a preset is specified
cmake --install
Project binary directory to install. This is required and must be first
cmake --open
Open the generated project in the associated application. This is only supported by some generators
cmake -P
Process the given cmake file as a script written in the CMake language. No configure or generate step is performed and the cache is not modified. If variables are defined using -D, this must be done before the -P argument
cmake -E
CMake provides builtin command-line tools through the signature
cmake -E capabilities
Report cmake capabilities in JSON format. The output is a JSON object with the following keys
cmake -E cat
Concatenate files and print on the standard output
cmake -E chdir
Change the current working directory and run a command
cmake -E compare_files
Check if file1 is the same as file2. If fails are the same, then returns 0, if not returns 1. In case of invalid arguments, it returns 2
cmake -E copy
Copy files to <destination> (either file or directory). If multiple files are specified, the <destination> must be directory and it must exist. Wildcards are not supported. copy does follow symlinks. That means it does not copy symlinks, but the files or directories it point to
cmake -E copy_directory
Copy content of <dir>... directories to <destination> directory. If <destination> directory does not exist it will be created. copy_directory does follow symlinks
cmake -E copy_if_different
Copy files to <destination> (either file or directory) if they have changed. If multiple files are specified, the <destination> must be directory and it must exist. copy_if_different does follow symlinks
cmake -E create_symlink
Create a symbolic link <new> naming <old>
cmake -E create_hardlink
Create a hard link <new> naming <old>
cmake -E echo
Displays arguments as text
cmake -E echo_append
Displays arguments as text but no new line
cmake -E env
Run command in a modified environment
cmake -E environment
Display the current environment variables
cmake -E false
Do nothing, with an exit code of 1
cmake -E make_directory
Create <dir> directories. If necessary, create parent directories too. If a directory already exists it will be silently ignored
cmake -E md5sum
Create MD5 checksum of files in md5sum compatible format
cmake -E sha1sum
Create SHA1 checksum of files in sha1sum compatible format
cmake -E sha224sum
Create SHA224 checksum of files in sha224sum compatible format
cmake -E sha226sum
Create SHA226 checksum of files in sha226sum compatible format
cmake -E sha384sum
Create SHA384 checksum of files in sha384sum compatible format
cmake -E sha512sum
Create SHA512 checksum of files in sha512sum compatible format
cmake -E remove
Remove the file(s). The planned behavior was that if any of the listed files already do not exist, the command returns a non-zero exit code, but no message is logged
cmake -E remove_directory
Remove <dir> directories and their contents. If a directory does not exist it will be silently ignored. If <dir> is a symlink to a directory, just the symlink will be removed. Use rm instead
cmake -E rm
Remove the files <file> or directories dir
cmake -E server
Launch cmake-server(7) mode
cmake -E sleep
Sleep for given number of seconds
cmake -E tar
Create or extract a tar or zip archive
cmake -E time
Run command and display elapsed time
cmake -E touch
Creates <file> if file do not exist. If <file> exists, it is changing <file> access and modification times
cmake -E touch_nocreate
Touch a file if it exists but do not create it. If a file does not exist it will be silently ignored
cmake -E true
Do nothing, with an exit code of 0
OptionsOn cmake itself
-S
Path to root directory of the CMake project to build <path-to-source>
--help
-B
Path to directory which CMake will use as the root of build directory. If the directory doesn't already exist CMake will make it <path-to-source>
-C
Pre-load a script to populate the cache <initial-cache>
-D
Create or update a CMake CACHE entry <key value pair>
-U
Remove matching entries from CMake CACHE <globbing_expr>
-G
Specify a build system generator <generator-name>
-T
Toolset specification for the generator, if supported <toolset-spec>
-A
Specify platform name if supported by generator <platform-name>
toolchain
Specify the cross compiling toolchain file, equivalent to setting CMAKE_TOOLCHAIN_FILE variable <path-to-file>
--install-prefix
Specify the installation directory, used by the CMAKE_INSTALL_PREFIX variable. Must be an absolute path <directory>
-Wno-dev
Suppress developer warnings
-Wdev
Enable developer warnings
-Werror
Enable the type of warnings <type>
-Wno-error
Disable the type of warnings <type>
-Wdeprecated
Enable deprecated functionality warnings
-Wno-deprecated
Suppress deprecated functionality warnings
-L
List non-advanced cached-variables
-N
View mode only
--graphviz
Generate graphviz of dependencies <file>
--system-information
Dump information about this system <file>
--log-level
Set log-level <log-level>
--log-context
Enable the message() command outputting context attached to each message
--debug-trycompile
Do not delete the try_compile() build tree
--debug-output
Put cmake in a debug mode
--debug-find
Put cmake find commands in a debug mode
--trace
Put cmake in trace mode
--trace-expand
Put cmake in trace mode with variables expanded
--trace-format
Put cmake in trace mode and sets the trace output format <format>
--trace-source
Put cmake in trace mode, but output only lines of a specified file <file>
--trace-redirect
Put cmake in trace mode and redirect trace output to a file instead of stderr <file>
--warn-uninitialized
Warn about uninitialized values
--warn-unused-vars
Does nothing. In CMake versions 3.2 and below this enabled warnings about unused variables. In CMake versions 3.3 through 3.18 the option was broken. In CMake 3.19 and above the option has been removed
--no-warn-unused-cli
Don't warn about command line options. Don't find variables that are declared on the command line, but not used
--check-system-vars
Find problems with variable usage in system files
--preset
Reads a preset from <path-to-source>/CMakePresets.json and <path-to-source>/CMakeUserPresets.json. The preset may specify the generator and the build directory, and a list of variables and other arguments to pass to CMake. The current working directory must contain CMake preset files. The CMake GUI can also recognize CMakePresets.json and CMakeUserPresets.json files <preset>
--list-presets
Lists the available presets <type>
ArgumentsPositional, in order
<path-to-source | path-to-existing-build>
· folders