Skip to content

Commit

Permalink
Fix for 1842, don't ignore empty string cache variables when configur…
Browse files Browse the repository at this point in the history
…ing from presets (#3264)

Co-authored-by: Garrett Campbell <[email protected]>
  • Loading branch information
andreeis and gcampbell-msft authored Jul 31, 2023
1 parent 5239eb2 commit a596a58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Bug Fixes:
- When using CMake presets, the Project Status View now shows the build target along with the build preset. [PR #3241](https://github.com/microsoft/vscode-cmake-tools/pull/3241)
- Fix per-folder browse configurations returning incorrect information. [#3155](https://github.com/microsoft/vscode-cmake-tools/issues/3155)
- IntelliSense resolves headers coming from MacOS frameworks. CMake 3.27 or later is required. [#2324](https://github.com/microsoft/vscode-cmake-tools/issues/2324)
- Don't ignore empty cache string variables when configuring from presets. [#1842](https://github.com/microsoft/vscode-cmake-tools/issues/1842)
- Fix active build configuration warning coming from CppTools. [#2353](https://github.com/microsoft/vscode-cmake-tools/issues/2353)

Improvements:
Expand Down
2 changes: 1 addition & 1 deletion src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export async function expandConfigurePreset(folder: string, name: string, worksp
const cacheVar = preset.cacheVariables[cacheVarName];
if (typeof cacheVar === 'boolean') {
expandedPreset.cacheVariables[cacheVarName] = cacheVar;
} else if (cacheVar) {
} else if (cacheVar || cacheVar === "") {
if (util.isString(cacheVar)) {
expandedPreset.cacheVariables[cacheVarName] = await expandString(cacheVar, expansionOpts);
} else if (util.isString(cacheVar.value)) {
Expand Down

0 comments on commit a596a58

Please sign in to comment.