cmake <command>

Command-line interface of the cross-platform buildsystem generator CMake




--buildProject binary directory to be built and must be first. This is required unless a preset is specified
--installProject binary directory to install. This is required and must be first
--openOpen the generated project in the associated application. This is only supported by some generators
-PProcess 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
-ECMake provides builtin command-line tools through the signature


-S <command>Path to root directory of the CMake project to build
-B <command>Path to directory which CMake will use as the root of build directory. If the directory doesn't already exist CMake will make it
-C <command>Pre-load a script to populate the cache
-D <command>Create or update a CMake CACHE entry
-U <command>Remove matching entries from CMake CACHE
-G <command>Specify a build system generator
-T <command>Toolset specification for the generator, if supported
-A <command>Specify platform name if supported by generator
toolchain <command>Specify the cross compiling toolchain file, equivalent to setting CMAKE_TOOLCHAIN_FILE variable
--install-prefix <command>Specify the installation directory, used by the CMAKE_INSTALL_PREFIX variable. Must be an absolute path
-Wno-devSuppress developer warnings
-WdevEnable developer warnings
-Werror <command>Enable the type of warnings
-Wno-error <command>Disable the type of warnings
-WdeprecatedEnable deprecated functionality warnings
-Wno-deprecatedSuppress deprecated functionality warnings
-LList non-advanced cached-variables
-NView mode only
--graphviz [command]Generate graphviz of dependencies
--system-information [command]Dump information about this system
--log-level <command>Set log-level
--log-contextEnable the message() command outputting context attached to each message
--debug-trycompileDo not delete the try_compile() build tree
--debug-outputPut cmake in a debug mode
--debug-findPut cmake find commands in a debug mode
--tracePut cmake in trace mode
--trace-expandPut cmake in trace mode with variables expanded
--trace-format <command>Put cmake in trace mode and sets the trace output format
--trace-source <command>Put cmake in trace mode, but output only lines of a specified file
--trace-redirect <command>Put cmake in trace mode and redirect trace output to a file instead of stderr
--warn-uninitializedWarn about uninitialized values
--warn-unused-varsDoes 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-cliDon't warn about command line options. Don't find variables that are declared on the command line, but not used
--check-system-varsFind problems with variable usage in system files
--preset <command>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
--list-presets [command]Lists the available presets