-S <path-to-source> | Path to root directory of the CMake project to build |
--help | |
-B <path-to-source> | 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 <initial-cache> | Pre-load a script to populate the cache |
-D <key value pair> | Create or update a CMake CACHE entry |
-U <globbing_expr> | Remove matching entries from CMake CACHE |
-G <generator-name> | Specify a build system generator |
-T <toolset-spec> | Toolset specification for the generator, if supported |
-A <platform-name> | Specify platform name if supported by generator |
toolchain <path-to-file> | Specify the cross compiling toolchain file, equivalent to setting CMAKE_TOOLCHAIN_FILE variable |
--install-prefix <directory> | Specify the installation directory, used by the CMAKE_INSTALL_PREFIX variable. Must be an absolute path |
-Wno-dev | Suppress developer warnings |
-Wdev | Enable developer warnings |
-Werror <type> | Enable the type of warnings |
-Wno-error <type> | Disable the type of warnings |
-Wdeprecated | Enable deprecated functionality warnings |
-Wno-deprecated | Suppress deprecated functionality warnings |
-L | List non-advanced cached-variables |
-N | View mode only |
--graphviz [file] | Generate graphviz of dependencies |
--system-information [file] | Dump information about this system |
--log-level <log-level> | Set 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 <format> | Put cmake in trace mode and sets the trace output format |
--trace-source <file> | Put cmake in trace mode, but output only lines of a specified file |
--trace-redirect <file> | Put cmake in trace mode and redirect trace output to a file instead of stderr |
--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 <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 |
--list-presets [type] | Lists the available presets |