You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use cmake.environment and cmake.configureEnvironment for $penv{} expansion in preset includes (#4713)
* feat: use cmake.environment and cmake.configureEnvironment for $penv{} expansion in preset includes
Fixes#3578
When loading CMakePresets.json (v7+), $penv{} macros in the `include`
field now resolve environment variables defined in `cmake.environment`
and `cmake.configureEnvironment` VS Code settings, not just process.env.
Changes:
- PresetsParser: Add settingsEnvironment setter and merge with process.env
as penvOverride in getExpandedInclude() for v7+ and v9+ presets
- PresetsController: Pass merged cmake.environment + cmake.configureEnvironment
to PresetsParser, and subscribe to setting changes to reapply presets
- Add integration test validating $penv{} resolves settings environment vars
- Add CHANGELOG entry under 1.23 Improvements
Co-authored-by: hanniavalera <[email protected]>
* docs: clarify penvOverride conditional comment per code review
Co-authored-by: hanniavalera <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: hanniavalera <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ Features:
8
8
9
9
Improvements:
10
10
- Add MSVC linker error problem matching to the Problems pane. [#4675](https://github.com/microsoft/vscode-cmake-tools/pull/4675)[@bradphelan](https://github.com/bradphelan)
11
+
- Use environment variables from `cmake.environment` and `cmake.configureEnvironment` when expanding `$penv{}` macros in CMake Presets `include` paths. [#3578](https://github.com/microsoft/vscode-cmake-tools/issues/3578)
11
12
12
13
Bug Fixes:
13
14
- Fix extension not switching to preset mode after "CMake: Quick Start" generates a CMakePresets.json, causing variant selection to have no effect. [#4569](https://github.com/microsoft/vscode-cmake-tools/issues/4569)
0 commit comments