Ensure cmake.buildAll actually builds all targets

Before this change, cmake.buildAll would fall back to the default
build target if no targets were specified, which leads to the
counter-intuitive behavior of not actually building all targets if a
default build target was selected (e.g. in the statusbar).
This commit is contained in:
Ben McMorran 2023-03-14 15:22:22 -07:00
Родитель ae95d99407
Коммит e4e4757af1
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -15,6 +15,7 @@ Bug Fixes:
- Implement cmake.parseBuildDiagnostics. [#1932](https://github.com/microsoft/vscode-cmake-tools/issues/1932)
- CMake tools not fully loaded when opening multi-project folders. [#3000](https://github.com/microsoft/vscode-cmake-tools/issues/3000)
- Fix typo in `cmake.skipConfigureWhenCachePresent`. [#3040](https://github.com/microsoft/vscode-cmake-tools/issues/3040) [@Mlekow](https://github.com/Mlekow)
- `cmake.buildAll` now builds all targets even if a default build target is selected. [#3048](https://github.com/microsoft/vscode-cmake-tools/issues/3048)
## 1.13.45
Bug Fixes:

Просмотреть файл

@ -1082,9 +1082,9 @@ export class ExtensionManager implements vscode.Disposable {
buildAll(name?: string | string[]) {
telemetry.logEvent("build", { all: "true"});
return this.runCMakeCommandForAll(cmakeProject => {
return this.runCMakeCommandForAll(async cmakeProject => {
const targets = util.isArrayOfString(name) ? name : util.isString(name) ? [name] : undefined;
return cmakeProject.build(targets);
return cmakeProject.build(targets || [await cmakeProject.allTargetName]);
},
this.ensureActiveBuildPreset,
true);