Repository navigation
Is there API to get the selected Kit - e.g. the getter equivalent to cmake.setKitByName #4886
Replies: 1 comment
|
There is a command for the selected kit name, but there is an important caveat for your “only if it has not already been set” use case: const kitName = await vscode.commands.executeCommand<string | null>(
"cmake.buildKit",
folder // a vscode.WorkspaceFolder; omit to use the active project
);
It is not a side-effect-free check for an unset kit. The command goes through For your extension, I would preserve an existing AI-assisted answer; checked against the current source linked above. I have not run this inside your extension host. |
Uh oh!
There was an error while loading. Please reload this page.
I have an extension that automates creating a CMake project for my custom work. As part of this I do a
executeCommand('cmake.setKitByName', 'mykitname');But I want to do this only if the kit has not already been set by other methods.Is there a method/command to get the kit name or a boolean to find out if it is unspecified?
All reactions