CCMAKE(1)
π CCMAKE(1) β NAME π
ccmake β the CMake Curses Dialog Command-Line Reference π
(yes bestie, this is the manual page for it, and yes your terminal is about to get cute)
β¨ SYNOPSIS β¨
Like, here's how you actually summon it:
ccmake [<options>] -B <path-to-build> [-S <path-to-source>]
ccmake [<options>] <path-to-source | path-to-existing-build>
π¦ DESCRIPTION π¦
okay so. The ccmake executable is the CMake curses interface β that's the whole vibe. Project configuration settings may be specified interactively through this GUI, which is lowkey iconic. Brief instructions are provided at the bottom of the terminal when the program is running, so you're never just standing there like π§ wondering what to do.
CMake is a cross-platform build system generator (a real main character of the build world, ngl). Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform. That's it, that's the whole deal π
π OPTIONS π
Grab a snack, there's a lot of them, but I promise they all matter π
-S <path-to-source>β path to the root directory of the CMake project to build. That's your source, your origin story β¨-B <path-to-build>β path to the directory which CMake will use as the root of the build directory. And listen: if the directory doesn't already exist, CMake will make it. It's giving "I'll build the folder AND the project." π-C <initial-cache>β pre-load a script to populate the cache.
When CMake is first run in an empty build tree, it creates a CMakeCache.txt file and populates it with customizable settings for the project. This option may be used to specify a file from which to load cache entries before the first pass through the project's CMake listfiles. The loaded entries take priority over the project's default values π
The given file should be a CMake script containing set() commands that use the CACHE option β not a cache-format file. Do not come in with the wrong format, I'm begging π
References to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR within the script evaluate to the top-level source and build tree. Cute, right? π
-D <var>:<type>=<value>,-D <var>=<value>β create or update a CMakeCACHEentry.
When CMake is first run in an empty build tree, it creates a CMakeCache.txt file and populates it with customizable settings for the project. This option may be used to specify a setting that takes priority over the project's default value. And you can repeat the option for as many CACHE entries as your heart desires π
If the :<type> portion is given it must be one of the types specified by the set() command documentation for its CACHE signature. If the :<type> portion is omitted the entry will be created with no type if it does not exist with a type already. If a command in the project sets the type to PATH or FILEPATH then the <value> will be converted to an absolute path. Slay, path math π₯
This option may also be given as a single argument: -D<var>:<type>=<value> or -D<var>=<value>.
The cache HELPSTRING is populated as follows:
- If the cache entry is known to CMake, its help string is set to a one-line description of the variable.
Added in version 4.4.
- Otherwise, its help string is set to the generic default
No help, variable specified on the command line.
β οΈ It's important to note that the order of-Cand-Darguments is significant. They will be carried out in the order they are listed, with the last argument taking precedence over the previous ones. For example, if you specify-DCMAKE_BUILD_TYPE=Debug, followed by a-Cargument with a file that calls:
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
then the-Cargument will take precedence, andCMAKE_BUILD_TYPEwill be set toRelease. However, if the-Dargument comes after the-Cargument, it will be set toDebug. π order matters fr fr
If a set(... CACHE ...) call in the -C file does not use FORCE, and a -D argument sets the same variable, the -D argument will take precedence regardless of order because of the nature of non-FORCE set(... CACHE ...) calls. iykyk π
-U <globbing_expr>β remove matching entries from CMakeCACHE.
This option may be used to remove one or more variables from the CMakeCache.txt file β globbing expressions using * and ? are supported. The option may be repeated for as many CACHE entries as desired.
π Use with care, you can make your CMakeCache.txt non-working. Like, genuinely. Be careful bestie.
-G <generator-name>β specify a build system generator.
CMake may support multiple native build systems on certain platforms. A generator is responsible for generating a particular build system. Possible generator names are specified in the cmake-generators(7) manual.
If not specified, CMake checks the CMAKE_GENERATOR environment variable and otherwise falls back to a builtin default selection. It'll figure it out πΈ
-T <toolset-spec>β toolset specification for the generator, if supported.
Some CMake generators support a toolset specification to tell the native build system how to choose a compiler. See the CMAKE_GENERATOR_TOOLSET variable for details π«Ά
-A <platform-name>β specify platform name if supported by generator.
Some CMake generators support a platform name to be given to the native build system to choose a compiler or SDK. See the CMAKE_GENERATOR_PLATFORM variable for details.
--toolchain <path-to-file>β Added in version 3.21.
Specify the cross compiling toolchain file β equivalent to setting the CMAKE_TOOLCHAIN_FILE variable. Relative paths are interpreted as relative to the build directory, and if not found, relative to the source directory. Two homes, basically π¦
--install-prefix <directory>β Added in version 3.21.
Specify the installation directory, used by the CMAKE_INSTALL_PREFIX variable. Must be an absolute path. No relative nonsense, the universe insists β
--project-file <project-file-name>β Added in version 4.0.
Specify an alternate project file name.
This determines the top-level file processed by CMake when configuring a project, and the file processed by add_subdirectory().
By default, this is CMakeLists.txt. If set to anything else, CMakeLists.txt will be used as a fallback whenever the specified file cannot be found within a project subdirectory.
π Note: This feature is intended for temporary use by developers during an incremental transition and not for publication of a final product. CMake will always emit a warning when the project file is anything other than CMakeLists.txt. It's giving "temporary setup, don't ship it" π§
-W<category>β promote the specified diagnostic category (and any children) to at leastWARNseverity. Note that this has no effect on diagnostics already set to a higher severity. It only ever turns the volume up, never down π
See the cmake-diagnostics(7) manual for a list of accepted values for <category>.
-Wno-<category>β disable (ignore) all diagnostics of the specified category, including any child categories. Shhh, we don't talk about that category π-Werror=<category>β promote the specified diagnostic category (and any children) to at leastSEND_ERRORseverity. Note that this has no effect on diagnostics already set to a higher severity. Escalation era π₯-Wno-error=<category>β demote the specified diagnostic category (and any children) to at mostWARNseverity. Note that this has no effect on diagnostics already set to a lower severity. De-escalation era π§-Wdev,-Wno-devβ Deprecated since version 4.4.
Compatibility synonyms for -Wauthor / -Wno-author. Old names, still valid, but likeβ¦ deprecated π
-version[=json-v1] [<file>],--version[=json-v1] [<file>],/V[=json-v1] [<file>],/version[=json-v1] [<file>]β show program name/version banner and exit. Ifjson-v1is specified, print extended version information in JSON format. The JSON output contains the versions for the CMake and its dependencies. The output is printed to a named<file>if given. Machine-readable and gorgeous β¨
The JSON output format is described in machine-readable form by this JSON schema.
-h,-H,--help,-help,-usage,/?β print usage information and exit. Usage describes the basic command line interface and its options. When in doubt, hit the help π--help <keyword> [<file>]β print help for one CMake keyword.
<keyword> can be a property, variable, command, policy, generator or module. Any of them, we don't gatekeep π
The relevant manual entry for <keyword> is printed in a human-readable text format. The output is printed to a named <file> if given.
Changed in version 3.28: Prior to CMake 3.28, this option supported command names only. Glow-up achieved π
--help-full [<file>]β print all help manuals and exit. All manuals are printed in a human-readable text format. The output is printed to a named<file>if given. Yes, all of them. Hydrate first π--help-manual <man> [<file>]β print one help manual and exit. The specified manual is printed in a human-readable text format. The output is printed to a named<file>if given.--help-manual-list [<file>]β list help manuals available and exit. The list contains all manuals for which help may be obtained by using the--help-manualoption followed by a manual name. The output is printed to a named<file>if given. A little menu of manuals, iconic π--help-command <cmd> [<file>]β print help for one command and exit. Thecmake-commands(7)manual entry for<cmd>is printed in a human-readable text format. The output is printed to a named<file>if given.--help-command-list [<file>]β list commands with help available and exit. The list contains all commands for which help may be obtained by using the--help-commandoption followed by a command name. The output is printed to a named<file>if given.--help-commands [<file>]β printcmake-commandsmanual and exit. Thecmake-commands(7)manual is printed in a human-readable text format. The output is printed to a named<file>if given.--help-module <mod> [<file>]β print help for one module and exit.
...so yeah, the cmake-modules(7) manual entry for <mod> gets printed in a human-readable text format, and if you gave it a named <file>, that's where the output goes. Byte-for-byte useful, zero vibes-based guessing β¨
--help-module-list [<file>]β lists all the modules that actually have help available, then dips out. The list contains every module you could get help for by using the--help-moduleoption followed by a module name. Output goes to the named <file> if you gave one. It's giving "table of contents but make it a flex" π--help-modules [<file>]β prints thecmake-modulesmanual and exits. Thecmake-modules(7)manual, in a human-readable text format, output to the named <file> if given. The whole thing. No crumbs. π--help-policy <cmp> [<file>]β prints help for exactly one policy and exits. Thecmake-policies(7)manual entry for <cmp> comes out in a human-readable text format, and the output lands in the named <file> if you passed one. Main character energy for a single policy, honestly iconic π--help-policy-list [<file>]β lists all policies with help available and exits. The list contains all policies you can get help for via the--help-policyoption followed by a policy name. Named <file>? That's where it goes.--help-policies [<file>]β prints thecmake-policiesmanual and exits. Thecmake-policies(7)manual, human-readable text format, output to the named <file> if given. Slay.--help-property <prop> [<file>]β prints help for one property and exits. Thecmake-properties(7)manual entries for <prop> get printed in a human-readable text format, and the output goes to the named <file> if given. Note the plural: entries, bestie, because properties can have more than one π--help-property-list [<file>]β lists all properties with help available and exits. The list contains every property for which help may be obtained by using the--help-propertyoption followed by a property name. Output to the named <file> if given. Lowkey the most useful one ngl π«Ά--help-properties [<file>]β prints thecmake-propertiesmanual and exits. Thecmake-properties(7)manual, in human-readable text format, output to the named <file> if given. All of it. Every last property. π--help-variable <var> [<file>]β prints help for one variable and exits. Thecmake-variables(7)manual entry for <var> is printed in a human-readable text format, and the output is printed to the named <file> if given. One variable, one moment, one legend β--help-variable-list [<file>]β lists all variables with help available and exits. The list contains all variables for which help may be obtained by using the--help-variableoption followed by a variable name. The output goes to the named <file> if given. There are... a lot of them. Hydrate first π--help-variables [<file>]β prints thecmake-variablesmanual and exits. Thecmake-variables(7)manual comes out in a human-readable text format, and output goes to the named <file> if given. Big manual energy, we respect it π§
πΈ SEE ALSO πΈ
The following resources are available to get help using CMake β like, actually, go touch these:
- Home Page β <https://cmake.org> The primary starting point for learning about CMake. The origin story. The main character. Start here fr fr π
- Online Documentation and Community Resources β <https://cmake.org/documentation> Links to available documentation and community resources may be found on this web page. It's the link hub, the group chat pinned message of CMake links π₯
- Discourse Forum β <https://discourse.cmake.org> The Discourse Forum hosts discussion and questions about CMake. Go ask your question, someone there has been waiting their whole life for it π¦
π Copyright π
2000-2026 Kitware, Inc. and Contributors
That's the whole copyright line, no notes, they ate and left absolutely no crumbs π
Okay bestie, that's the whole page π You made it to the end β v <rainbow>4.4.5</rainbow> of CCMAKE(1), dated Oct 28, 2026, per the footer. Go forth and --help-everything responsibly πΈπ
β¨
π¦ where this page comes from
- arch rolling: cmake 4.4.5-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms