Skip to content

Latest commit

 

History

History
33 lines (32 loc) · 9.29 KB

all_commands.md

File metadata and controls

33 lines (32 loc) · 9.29 KB

All commands Provide by this plugin

Command Description
CMakeGenerate[!] Configure the project and generate native build system. if ! is added, it will firstly clean, then configure and generate. Additional arguments will be passed to "cmake" command. eg. Use "CMakeGenerate -G MinGW\ Makefiles" to specify "MinGW Makefiles" generator.
CMakeBuild[!] Use pre-generated build system to actually compile/link targets. if ! is added, it will firstly clean, then build. Additional arguments will be passed to "cmake" command.
CMakeBuildCurrentFile[!] Build targets related to current file.
CMakeRun Run selected launch-able target, Additional arguments will be passed to "CMakeGenerate" and "CMakeBuild", if you want to specify command line arguments for targets, please use "CMakeLaunchArgs" below.
CMakeRunCurrentFile Run targets related to current file, Additional arguments will be passed to "CMakeGenerate" and "CMakeBuild", if you want to specify command line arguments for targets, please use "CMakeLaunchArgs" below.
CMakeDebug Use nvim-dap to debug selected launch-able target, works like CMakeRun
CMakeDebugCurrentFile Debug targets related to current file.
CMakeRunTest [args] Use ctest to run specified test or all of them. Pass ctest arguments to the command.
CMakeLaunchArgs Set the command line arguments to pass to the selected launch target when invoke "CMakeRun". Each target has it's own set of arguments which are preserved when switching targets. Arguments are split by whitespace, which can be prevented by using \ to escape the whitespace
CMakeSelectBuildType Select build type, including "Debug", "Release", "RelWithDebInfo", "MinSizeRel" by default. But when "cmake-variants.[json|yaml]" or "CMakeVariants.[json|yaml]" is provided, it will read configuration from it
CMakeSelectBuildTarget Select target to be built, including executable and library targets
CMakeSelectLaunchTarget Select target to be launched, only including executable targets
CMakeSelectKit Select kits defined from "CMakeKits.json" or "cmake-kits.json"
CMakeSelectConfigurePreset Select configure preset, this only works when "cmake[-user]-presets.json" or "CMake[User]Presets.json" is provided
CMakeSelectBuildPreset Select build preset, this only works when "cmake[-user]-presets.json" or "CMake[User]Presets.json" is provided
CMakeSelectCwd Opens an input popup to select a directory with the main CMakeLists.txt file. If there's an argument given, that will be treated as the path to the main directory. Attention if you change current working dir, the build directory will still be as before, to change build directory, you should use CMakeSelectBuildDir.
CMakeSelectBuildDir Opens an input popup to select a directory where should the build files in. If there's an argument given, that will be treated as the path to the build directory.
CMakeOpen(Executor/Runner) Open CMake Executor/Runner window
CMakeClose(Executor/Runner) Close CMake Executor/Runner window
CMakeInstall Install CMake targets. Additional arguments will be passed to "cmake" command.
CMakeClean Cleans All targets, intermediates and deps
CMakeStop(Executor/Runner) Stop CMake Executor/Runner process
CMakeQuickBuild [target] Build target without changing currently selected target. Pass target as argument or select via dialog.
CMakeQuickRun [target] [args] Run target without changing currently selected target. Pass target as argument or select via dialog.
CMakeQuickDebug [target] [args] Run target without changing currently selected target. Pass target as argument or select via dialog.
CMakeShowTargetFiles [target] Show files associated with target via the cmake code model. Uses telescope. Pass target as argument or select via dialog.
CMakeQuickStart Create barebones C/Cpp Exec/Lib based on on a minimal template.
CMakeSettings Opens a configuration popup window to configure various settings. For more info see settings
CMakeTargetSettings [target] Opens a configuration popup window to configure various settings specific to a single target. For more info see settings