Skip to content

Commit

Permalink
fix regression (#3445)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampbell-msft authored Nov 15, 2023
1 parent 45be63a commit 9e5cd11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# What's New?

## 1.16
## 1.16.30
Bug Fixes:
- Fixed an issue where finding cl.exe and ninja from Visual Studio was broken. [PR #3445](https://github.com/microsoft/vscode-cmake-tools/pull/3445)

## 1.16.29
Features:
- Support different debug config for different targets. [PR #2801](https://github.com/microsoft/vscode-cmake-tools/pull/2801) [@RichardLuo0](https://github.com/RichardLuo0)
- Add ability to get a test's `WORKING_DIRECTORY` in launch.json via `cmake.testWorkingDirectory` [PR #3336](https://github.com/microsoft/vscode-cmake-tools/pull/3336)
Expand All @@ -23,7 +27,7 @@ Bug Fixes:
- Paths containing `mingw` are no longer removed from the `PATH` environment variable because the selected MinGW kit is added before the `PATH` environment variable, rather than after. [#3220](https://github.com/microsoft/vscode-cmake-tools/issues/3220)
- Fix a bug where `CMake: Show Configure` or `CMake: Show Build` commands would run them. [#3381](https://github.com/microsoft/vscode-cmake-tools/issues/3381) [@AbdullahAmrSobh](https://github.com/AbdullahAmrSobh)

## 1.15
## 1.15.31
Features:
- Added support for the CMake Debugger. [#3093](https://github.com/microsoft/vscode-cmake-tools/issues/3093)
- Added support for passing a folder parameter to the `cmake.selectActiveFolder` command. [#3256](https://github.com/microsoft/vscode-cmake-tools/issues/3256) [@cvanbeek](https://github.com/cvanbeek13)
Expand Down
10 changes: 4 additions & 6 deletions src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,6 @@ async function expandConfigurePresetHelper(folder: string, name: string, preset:
const expansionOpts: ExpansionOptions = await getExpansionOptions(workspaceFolder, sourceDir, preset);
expansionOpts.envOverride = inheritedEnv;

preset.environment = EnvironmentUtils.mergePreserveNull([inheritedEnv, preset.environment]);

// [Windows Only] If CMAKE_CXX_COMPILER or CMAKE_C_COMPILER is set as cl, clang, clang-cl, clang-cpp and clang++,
// but they are not on PATH, then set the env automatically.
if (process.platform === 'win32') {
Expand All @@ -937,10 +935,10 @@ async function expandConfigurePresetHelper(folder: string, name: string, preset:
const expandedPreset: ConfigurePreset = { name };
const expansionOpts: ExpansionOptions = await getExpansionOptions(workspaceFolder, sourceDir, preset);
if (compilerName) {
expandedPreset.environment = EnvironmentUtils.createPreserveNull();
for (const key in preset.environment) {
if (preset.environment[key]) {
expandedPreset.environment[key] = await expandString(preset.environment[key]!, expansionOpts);
expandedPreset.environment = EnvironmentUtils.mergePreserveNull([inheritedEnv, preset.environment]);
for (const key in expandedPreset.environment) {
if (expandedPreset.environment[key]) {
expandedPreset.environment[key] = await expandString(expandedPreset.environment[key]!, expansionOpts);
}
}
const compilerLocation = await execute('where.exe', [compilerName], null, {
Expand Down

0 comments on commit 9e5cd11

Please sign in to comment.