1 import { Command } from "./command.mjs";
2 import Logger from "../logger.mjs";
3 import { window, workspace } from "vscode";
4 import { configureCmakeNinja } from "../utils/cmakeUtil.mjs";
6 export default class ConfigureCmakeCommand extends Command {
7 private _logger: Logger = new Logger("ConfigureCmakeCommand");
9 public static readonly id = "configureCmake";
12 super(ConfigureCmakeCommand.id);
15 async execute(): Promise<void> {
16 const workspaceFolder = workspace.workspaceFolders?.[0];
18 // check if is a pico project
19 if (workspaceFolder === undefined) {
20 this._logger.warn("No workspace folder found.");
21 await window.showWarningMessage("No workspace folder found.");
26 await configureCmakeNinja(workspaceFolder.uri);
27 await window.showInformationMessage("CMake has configured your build.");