Skip to content

Commit

Permalink
Fixed how we use our '--warn-unused-cli' flag (#3860)
Browse files Browse the repository at this point in the history
* '--warn-unused-cli' is now used to remove the default '--no-warn-unused-cli' command instead of removing and also adding itself to the arguments

* only removed '--warn--unused-cli' instead of all initial_common_flgs
  • Loading branch information
snehara99 authored Jul 2, 2024
1 parent c1c2412 commit 391646f
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 @@ -19,6 +19,7 @@ Bug Fixes:
- Fix issue where new presets couldn't inherit from presets in CmakeUserPresets.json. These presets are now added to CmakeUserPresets.json instead of CmakePresets.json. [#3725](https://github.com/microsoft/vscode-cmake-tools/issues/3725)
- Fix issue where CMakeTools does not recheck CMake Path to see if user installed CMake after launching VS Code. [3811](https://github.com/microsoft/vscode-cmake-tools/issues/3811)
- Fix issue where `cmake.buildToolArgs` was sometimes applied incorrectly when presets are used [#3754](https://github.com/microsoft/vscode-cmake-tools/issues/3754)
- Still allow for users to add `--warn-unused-cli`. Now instead of overriding, it will remove our default `--no-warn-unused-cli`. [#1090](https://github.com/microsoft/vscode-cmake-tools/issues/1090)

## 1.18.42

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/cmakeDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ export abstract class CMakeDriver implements vscode.Disposable {
// Cache flags will construct the command line for cmake.
const init_cache_flags = await this.generateInitCacheFlags();
const initial_common_flags = extra_args.concat(this.config.configureArgs);
const common_flags = initial_common_flags.includes("--warn-unused-cli") ? initial_common_flags : initial_common_flags.concat("--no-warn-unused-cli");
const common_flags = initial_common_flags.includes("--warn-unused-cli") ? initial_common_flags.filter(f => f !== "--warn-unused-cli") : initial_common_flags.concat("--no-warn-unused-cli");
const define_flags = withoutCmakeSettings ? [] : this.generateCMakeSettingsFlags();
const final_flags = define_flags.concat(common_flags, init_cache_flags);

Expand Down

0 comments on commit 391646f

Please sign in to comment.