{
  "name": "cmake",
  "description": "Command-line interface of the cross-platform buildsystem generator CMake",
  "subcommands": [
    {
      "name": "--build",
      "description": "Project binary directory to be built and must be first. This is required unless a preset is specified",
      "options": [
        {
          "names": [
            "--preset"
          ],
          "description": "Use a build preset to specify build options",
          "takes_arg": true,
          "arg": {
            "name": "preset"
          }
        },
        {
          "names": [
            "--list-presets"
          ],
          "description": "Lists the available presets. If no option is specified only configure presets will be listed. The current working directory must contain CMake preset files"
        },
        {
          "names": [
            "--parallel",
            "-j"
          ],
          "description": "The maximum number of concurrent processes to use when building. If <jobs> is omitted the native build tool's default number is used",
          "takes_arg": true,
          "arg": {
            "name": "jobs"
          }
        },
        {
          "names": [
            "--target",
            "-t"
          ],
          "description": "Build <tgt> instead of the default target. Multiple targets may be given, separated by spaces",
          "takes_arg": true,
          "arg": {
            "name": "target",
            "is_variadic": true
          }
        },
        {
          "names": [
            "--config"
          ],
          "description": "For multi-configuration tools, choose configuration <cfg>",
          "takes_arg": true,
          "arg": {
            "name": "cfg"
          }
        },
        {
          "names": [
            "--clean-first"
          ],
          "description": "Build target clean first, then build"
        },
        {
          "names": [
            "--use-stderr"
          ],
          "description": "Ignored. Behavior is default in CMake >= 3.0"
        },
        {
          "names": [
            "--verbose",
            "-v"
          ],
          "description": "Enable verbose output - if supported - including the build commands to be executed"
        },
        {
          "names": [
            "--"
          ],
          "description": "Pass remaining options to the native tool"
        }
      ],
      "args": [
        {
          "name": "dir",
          "template": "folders"
        }
      ]
    },
    {
      "name": "--install",
      "description": "Project binary directory to install. This is required and must be first",
      "options": [
        {
          "names": [
            "--config"
          ],
          "description": "For multi-configuration generators",
          "takes_arg": true,
          "arg": {
            "name": "cfg"
          }
        },
        {
          "names": [
            "--component"
          ],
          "description": "Component-based install. Only install component specified",
          "takes_arg": true,
          "arg": {
            "name": "cfg"
          }
        },
        {
          "names": [
            "--default-directory-permissions"
          ],
          "description": "Default directory install permissions",
          "takes_arg": true,
          "arg": {
            "name": "permissions",
            "description": "Format: <u=rwx,g=rx,o=rx>"
          }
        },
        {
          "names": [
            "--prefix"
          ],
          "description": "Override the installation prefix",
          "takes_arg": true,
          "arg": {
            "name": "prefix"
          }
        },
        {
          "names": [
            "--strip"
          ],
          "description": "Strip before installing"
        },
        {
          "names": [
            "--verbose",
            "-v"
          ],
          "description": "Enable verbose output"
        }
      ],
      "args": [
        {
          "name": "dir",
          "template": "folders"
        }
      ]
    },
    {
      "name": "--open",
      "description": "Open the generated project in the associated application. This is only supported by some generators",
      "args": [
        {
          "name": "dir",
          "template": "folders"
        }
      ]
    },
    {
      "name": "-P",
      "description": "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 b",
      "args": [
        {
          "name": "cmake script file",
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "-E",
      "description": "CMake provides builtin command-line tools through the signature",
      "subcommands": [
        {
          "name": "capabilities",
          "description": "Report cmake capabilities in JSON format. The output is a JSON object with the following keys"
        },
        {
          "name": "cat",
          "description": "Concatenate files and print on the standard output",
          "args": [
            {
              "name": "files",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "chdir",
          "description": "Change the current working directory and run a command",
          "args": [
            {
              "name": "dir",
              "template": "folders"
            },
            {
              "name": "command"
            }
          ]
        },
        {
          "name": "compare_files",
          "description": "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",
          "options": [
            {
              "names": [
                "--ignore-eol"
              ],
              "description": "Implies line-wise comparison and ignores LF/CRLF differences"
            }
          ],
          "args": [
            {
              "name": "file1",
              "template": "filepaths"
            },
            {
              "name": "file2",
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "copy",
          "description": "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. ",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            },
            {
              "name": "destination",
              "template": "folders"
            }
          ]
        },
        {
          "name": "copy_directory",
          "description": "Copy content of <dir>... directories to <destination> directory. If <destination> directory does not exist it will be created. copy_directory does follow symlinks",
          "args": [
            {
              "name": "dir",
              "is_variadic": true,
              "template": "folders"
            },
            {
              "name": "destination",
              "template": "folders"
            }
          ]
        },
        {
          "name": "copy_if_different",
          "description": "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 symli",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            },
            {
              "name": "destination",
              "template": "folders"
            }
          ]
        },
        {
          "name": "create_symlink",
          "description": "Create a symbolic link <new> naming <old>",
          "args": [
            {
              "name": "old"
            },
            {
              "name": "new"
            }
          ]
        },
        {
          "name": "create_hardlink",
          "description": "Create a hard link <new> naming <old>",
          "args": [
            {
              "name": "old"
            },
            {
              "name": "new"
            }
          ]
        },
        {
          "name": "echo",
          "description": "Displays arguments as text",
          "args": [
            {
              "name": "string"
            }
          ]
        },
        {
          "name": "echo_append",
          "description": "Displays arguments as text but no new line",
          "args": [
            {
              "name": "string"
            }
          ]
        },
        {
          "name": "env",
          "description": "Run command in a modified environment",
          "options": [
            {
              "names": [
                "--unset"
              ],
              "takes_arg": true,
              "arg": {
                "name": "name"
              }
            }
          ],
          "args": [
            {
              "name": "key value pair",
              "description": "Format: NAME=VALUE",
              "is_variadic": true
            },
            {
              "name": "command"
            }
          ]
        },
        {
          "name": "environment",
          "description": "Display the current environment variables"
        },
        {
          "name": "false",
          "description": "Do nothing, with an exit code of 1"
        },
        {
          "name": "make_directory",
          "description": "Create <dir> directories. If necessary, create parent directories too. If a directory already exists it will be silently ignored",
          "args": [
            {
              "name": "dir",
              "is_variadic": true,
              "template": "folders"
            }
          ]
        },
        {
          "name": "md5sum",
          "description": "Create MD5 checksum of files in md5sum compatible format",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "sha1sum",
          "description": "Create SHA1 checksum of files in sha1sum compatible format",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "sha224sum",
          "description": "Create SHA224 checksum of files in sha224sum compatible format",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "sha226sum",
          "description": "Create SHA226 checksum of files in sha226sum compatible format",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "sha384sum",
          "description": "Create SHA384 checksum of files in sha384sum compatible format",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "sha512sum",
          "description": "Create SHA512 checksum of files in sha512sum compatible format",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "remove",
          "description": "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",
          "options": [
            {
              "names": [
                "-f"
              ],
              "description": "The -f option changes the behavior to return a zero exit code (i.e. success) in such situations instead. remove does not follow symlinks. That means it remove only symlinks and not files it point to"
            }
          ],
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "remove_directory",
          "description": "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",
          "args": [
            {
              "name": "dir",
              "is_variadic": true,
              "template": "folders"
            }
          ]
        },
        {
          "name": "rm",
          "description": "Remove the files <file> or directories dir",
          "options": [
            {
              "names": [
                "-r",
                "-R"
              ],
              "description": "Use -r or -R to remove directories and their contents recursively. If any of the listed files/directories do not exist, the command returns a non-zero exit code, but no message is logged"
            },
            {
              "names": [
                "-f"
              ],
              "description": "The -f option changes the behavior to return a zero exit code (i.e. success) in such situations instead"
            }
          ],
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            },
            {
              "name": "dir",
              "is_variadic": true,
              "template": "folders"
            }
          ]
        },
        {
          "name": "server",
          "description": "Launch cmake-server(7) mode"
        },
        {
          "name": "sleep",
          "description": "Sleep for given number of seconds",
          "args": [
            {
              "name": "number",
              "is_variadic": true
            }
          ]
        },
        {
          "name": "tar",
          "description": "Create or extract a tar or zip archive",
          "options": [
            {
              "names": [
                "c"
              ],
              "description": "Create a new archive containing the specified files. If used, the pathname argument is mandatory"
            },
            {
              "names": [
                "x"
              ],
              "description": "Extract to disk from the archive. The <pathname>... argument could be used to extract only selected files or directories. When extracting selected files or directories, you must provide their exact na"
            },
            {
              "names": [
                "t"
              ],
              "description": "List archive contents. The <pathname>... argument could be used to list only selected files or directories"
            },
            {
              "names": [
                "v"
              ],
              "description": "Produce verbose output"
            },
            {
              "names": [
                "z"
              ],
              "description": "Compress the resulting archive with gzip"
            },
            {
              "names": [
                "j"
              ],
              "description": "Compress the resulting archive with bzip2"
            },
            {
              "names": [
                "J"
              ],
              "description": "Compress the resulting archive with XZ"
            },
            {
              "names": [
                "--zstd"
              ],
              "description": "Compress the resulting archive with Zstandard"
            },
            {
              "names": [
                "--files-from"
              ],
              "description": "Read file names from the given file, one per line. Blank lines are ignored. Lines may not start in - except for --add-file=<name> to add files whose names start in -",
              "takes_arg": true,
              "arg": {
                "name": "file",
                "template": "filepaths"
              }
            },
            {
              "names": [
                "--format"
              ],
              "description": "Specify the format of the archive to be created",
              "takes_arg": true,
              "arg": {
                "name": "format",
                "suggestions": [
                  "7zip",
                  "gnutar",
                  "pax",
                  "paxr",
                  "zip"
                ]
              }
            },
            {
              "names": [
                "--mtime"
              ],
              "description": "Specify modification time recorded in tarball entries",
              "takes_arg": true,
              "arg": {
                "name": "date"
              }
            },
            {
              "names": [
                "--"
              ],
              "description": "Stop interpreting options and treat all remaining arguments as file names, even if they start with -"
            }
          ],
          "args": [
            {
              "name": "pathname"
            }
          ]
        },
        {
          "name": "time",
          "description": "Run command and display elapsed time",
          "args": [
            {
              "name": "command"
            }
          ]
        },
        {
          "name": "touch",
          "description": "Creates <file> if file do not exist. If <file> exists, it is changing <file> access and modification times",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "touch_nocreate",
          "description": "Touch a file if it exists but do not create it. If a file does not exist it will be silently ignored",
          "args": [
            {
              "name": "file",
              "is_variadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "name": "true",
          "description": "Do nothing, with an exit code of 0"
        }
      ]
    }
  ],
  "options": [
    {
      "names": [
        "-S"
      ],
      "description": "Path to root directory of the CMake project to build",
      "takes_arg": true,
      "arg": {
        "name": "path-to-source",
        "template": "folders"
      }
    },
    {
      "names": [
        "--help"
      ]
    },
    {
      "names": [
        "-B"
      ],
      "description": "Path to directory which CMake will use as the root of build directory. If the directory doesn't already exist CMake will make it",
      "takes_arg": true,
      "arg": {
        "name": "path-to-source",
        "template": "folders"
      }
    },
    {
      "names": [
        "-C"
      ],
      "description": "Pre-load a script to populate the cache",
      "takes_arg": true,
      "arg": {
        "name": "initial-cache",
        "template": "filepaths"
      }
    },
    {
      "names": [
        "-D"
      ],
      "description": "Create or update a CMake CACHE entry",
      "takes_arg": true,
      "arg": {
        "name": "key value pair",
        "description": "<var>:<type>=<value> or <var>=<value>"
      }
    },
    {
      "names": [
        "-U"
      ],
      "description": "Remove matching entries from CMake CACHE",
      "takes_arg": true,
      "arg": {
        "name": "globbing_expr"
      }
    },
    {
      "names": [
        "-G"
      ],
      "description": "Specify a build system generator",
      "takes_arg": true,
      "arg": {
        "name": "generator-name"
      }
    },
    {
      "names": [
        "-T"
      ],
      "description": "Toolset specification for the generator, if supported",
      "takes_arg": true,
      "arg": {
        "name": "toolset-spec"
      }
    },
    {
      "names": [
        "-A"
      ],
      "description": "Specify platform name if supported by generator",
      "takes_arg": true,
      "arg": {
        "name": "platform-name"
      }
    },
    {
      "names": [
        "toolchain"
      ],
      "description": "Specify the cross compiling toolchain file, equivalent to setting CMAKE_TOOLCHAIN_FILE variable",
      "takes_arg": true,
      "arg": {
        "name": "path-to-file",
        "template": "filepaths"
      }
    },
    {
      "names": [
        "--install-prefix"
      ],
      "description": "Specify the installation directory, used by the CMAKE_INSTALL_PREFIX variable. Must be an absolute path",
      "takes_arg": true,
      "arg": {
        "name": "directory",
        "template": "folders"
      }
    },
    {
      "names": [
        "-Wno-dev"
      ],
      "description": "Suppress developer warnings"
    },
    {
      "names": [
        "-Wdev"
      ],
      "description": "Enable developer warnings"
    },
    {
      "names": [
        "-Werror"
      ],
      "description": "Enable the type of warnings",
      "takes_arg": true,
      "arg": {
        "name": "type",
        "suggestions": [
          "dev",
          "deprecated"
        ]
      }
    },
    {
      "names": [
        "-Wno-error"
      ],
      "description": "Disable the type of warnings",
      "takes_arg": true,
      "arg": {
        "name": "type",
        "suggestions": [
          "dev",
          "deprecated"
        ]
      }
    },
    {
      "names": [
        "-Wdeprecated"
      ],
      "description": "Enable deprecated functionality warnings"
    },
    {
      "names": [
        "-Wno-deprecated"
      ],
      "description": "Suppress deprecated functionality warnings"
    },
    {
      "names": [
        "-L"
      ],
      "description": "List non-advanced cached-variables"
    },
    {
      "names": [
        "-N"
      ],
      "description": "View mode only"
    },
    {
      "names": [
        "--graphviz"
      ],
      "description": "Generate graphviz of dependencies",
      "takes_arg": true,
      "arg": {
        "name": "file",
        "template": "filepaths"
      }
    },
    {
      "names": [
        "--system-information"
      ],
      "description": "Dump information about this system",
      "takes_arg": true,
      "arg": {
        "name": "file",
        "template": "filepaths"
      }
    },
    {
      "names": [
        "--log-level"
      ],
      "description": "Set log-level",
      "takes_arg": true,
      "arg": {
        "name": "log-level",
        "suggestions": [
          "ERROR",
          "WARNING",
          "NOTICE",
          "STATUS",
          "VERBOSE",
          "DEBUG",
          "TRACE"
        ]
      }
    },
    {
      "names": [
        "--log-context"
      ],
      "description": "Enable the message() command outputting context attached to each message"
    },
    {
      "names": [
        "--debug-trycompile"
      ],
      "description": "Do not delete the try_compile() build tree"
    },
    {
      "names": [
        "--debug-output"
      ],
      "description": "Put cmake in a debug mode"
    },
    {
      "names": [
        "--debug-find"
      ],
      "description": "Put cmake find commands in a debug mode"
    },
    {
      "names": [
        "--trace"
      ],
      "description": "Put cmake in trace mode"
    },
    {
      "names": [
        "--trace-expand"
      ],
      "description": "Put cmake in trace mode with variables expanded"
    },
    {
      "names": [
        "--trace-format"
      ],
      "description": "Put cmake in trace mode and sets the trace output format",
      "takes_arg": true,
      "arg": {
        "name": "format",
        "suggestions": [
          "human",
          "json-v1"
        ]
      }
    },
    {
      "names": [
        "--trace-source"
      ],
      "description": "Put cmake in trace mode, but output only lines of a specified file",
      "takes_arg": true,
      "arg": {
        "name": "file",
        "template": "filepaths"
      }
    },
    {
      "names": [
        "--trace-redirect"
      ],
      "description": "Put cmake in trace mode and redirect trace output to a file instead of stderr",
      "takes_arg": true,
      "arg": {
        "name": "file",
        "template": "filepaths"
      }
    },
    {
      "names": [
        "--warn-uninitialized"
      ],
      "description": "Warn about uninitialized values"
    },
    {
      "names": [
        "--warn-unused-vars"
      ],
      "description": "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 remove"
    },
    {
      "names": [
        "--no-warn-unused-cli"
      ],
      "description": "Don't warn about command line options. Don't find variables that are declared on the command line, but not used"
    },
    {
      "names": [
        "--check-system-vars"
      ],
      "description": "Find problems with variable usage in system files"
    },
    {
      "names": [
        "--preset"
      ],
      "description": "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 argum",
      "takes_arg": true,
      "arg": {
        "name": "preset"
      }
    },
    {
      "names": [
        "--list-presets"
      ],
      "description": "Lists the available presets",
      "takes_arg": true,
      "arg": {
        "name": "type",
        "suggestions": [
          "configure",
          "build",
          "test",
          "all"
        ]
      }
    }
  ],
  "args": [
    {
      "name": "path-to-source | path-to-existing-build",
      "template": "folders"
    }
  ]
}
