diff --git a/CHANGELOG.md b/CHANGELOG.md index 959b68da7..8d6c1c239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Improvements: - Ensure that stopping tests actually forces the tests to stop running. [#2095](https://github.com/microsoft/vscode-cmake-tools/issues/2095) - Retire the Show Options Moved Notification [#4039](https://github.com/microsoft/vscode-cmake-tools/issues/4039) - Improve the pinned commands experience by defaulting settings and using VS Code state rather than modifying user settings. [#3977](https://github.com/microsoft/vscode-cmake-tools/issues/3977) +- Skip project building in the CTest test explorer when `cmake.buildBeforeRun` is set to `false`. [#4241](https://github.com/microsoft/vscode-cmake-tools/pull/4241) [@Dabsunter](https://github.com/Dabsunter) Bug Fixes: diff --git a/src/ctest.ts b/src/ctest.ts index f4a5a88b1..eea66115e 100644 --- a/src/ctest.ts +++ b/src/ctest.ts @@ -1248,6 +1248,11 @@ export class CTestDriver implements vscode.Disposable { } private async buildTests(tests: vscode.TestItem[], run: vscode.TestRun): Promise { + // If buildBeforeRun is set to false, we skip the build step + if (!this.ws.config.buildBeforeRun) { + return true; + } + // Folder => status const builtFolder = new Map(); let status: number = 0;