Skip to content

Commit c19f34c

Browse files
OmotolaCopilot
andcommitted
Update docs and changelog for \ variable support
- Add \ to the variable substitution table in cmake-settings.md - Update ctestArgs/ctestDefaultArgs setting descriptions in docs - Add changelog entry under Improvements citing #4416 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b85ad50 commit c19f34c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Features:
77
- Add support for `${workspaceFolder}`, `${workspaceFolder:name}` variables and relative paths in `cmake.exclude` setting for multi-root workspaces. [#4689](https://github.com/microsoft/vscode-cmake-tools/pull/4689)
88

99
Improvements:
10+
- Add `${testName}` variable support for `cmake.ctestArgs` and `cmake.ctestDefaultArgs`, enabling per-test argument expansion (e.g., unique log file paths per test). [#4416](https://github.com/microsoft/vscode-cmake-tools/issues/4416)
1011
- Improve responsiveness to CMake path changes made by vendor extensions during configure-on-open retry. [#4908](https://github.com/microsoft/vscode-cmake-tools/pull/4908) Contributed by STMicroelectronics
1112
- Improve ergonomics of the test explorer UI by removing the project source directory, improving horizontal scrolling experience. [#4562](https://github.com/microsoft/vscode-cmake-tools/issues/4562) [@miss-programgamer](https://github.com/miss-programgamer)
1213

docs/cmake-settings.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Options that support substitution, in the table below, allow variable references
4141
| `cmake.ctest.parallelJobs` | Specify the number of jobs to run in parallel for ctest. Using the value `0` will detect and use the number of CPUs. Using the value `1` will disable test parallelism. | `0` | no |
4242
| `cmake.ctest.testExplorerIntegrationEnabled` | If `true`, configure CMake to generate information needed by the test explorer. | `true` | no |
4343
| `cmake.ctest.testSuiteDelimiter` | Character(s) that separate test suite name components. | `null` | no |
44-
| `cmake.ctestArgs` | An array of additional arguments to pass to CTest. | `[]` | yes |
45-
| `cmake.ctestDefaultArgs` | Default arguments to pass to CTest. | `["-T", "test", "--output-on-failure"]` | no |
44+
| `cmake.ctestArgs` | An array of additional arguments to pass to CTest. Supports `${testName}` for per-test expansion (see [Variable substitution](#variable-substitution)). | `[]` | yes |
45+
| `cmake.ctestDefaultArgs` | Default arguments to pass to CTest. Supports `${testName}` for per-test expansion (see [Variable substitution](#variable-substitution)). | `["-T", "test", "--output-on-failure"]` | no |
4646
| `cmake.ctestPath` | Path to CTest executable. | `null` | no |
4747
| `cmake.debugConfig`| The debug configuration to use when debugging a target. When `type` is specified, automatic debugger detection is skipped and a custom debug adapter can be used. Additional properties required by the debug adapter can be added freely. See [Debug and launch](debug-launch.md#customize-the-debug-adapter) for examples, including Natvis via `visualizerFile` without a `launch.json`. | `null` (no values) | yes |
4848
| `cmake.defaultActiveFolder`| The name of active folder, which be used as default (Only works when `cmake.autoSelectActiveFolder` is disabled). | `""` | no |
@@ -141,6 +141,7 @@ The following built-in variables are expanded in supported `cmake.*` settings on
141141
|`${buildKitVersionMajor}`| The current CMake kit major version. For example: `7`|
142142
|`${buildKitVersionMinor}`| The current CMake kit minor version. For example: `3`|
143143
|`${generator}`| The name of the CMake generator. For example: `Ninja`|
144+
|`${testName}`| The name of the current CTest test. Only expanded in `cmake.ctestArgs` and `cmake.ctestDefaultArgs` when running a single test (non-parallel mode or single-test selection). When multiple tests run in a batch, the variable is not expanded and a warning is logged.|
144145
|`${projectName}`|**DEPRECATED**. Expands to the constant string `"ProjectName"` CMake does not consider there to be just one project name to use. The concept of a single project does not work in CMake. Use `${workspaceRootFolderName}`, instead.|
145146
|`${userHome}`| The full path to the current user's home directory. |
146147

0 commit comments

Comments
 (0)