microsoft / microsoft/vscode-cmake-tools

Changing active kit does not respect (unrelated) CMakeCache entries

Open
#3,060 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Feature: cache editor
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

Brief Issue Summary
  1. select active kit, e.g.: "Visual Studio ..." (toolset is set as expected: "CMAKE_GENERATOR_TOOLSET:INTERNAL=host=x64")
  2. change active kit, e.g.: "Clang ... (MSVC CLI) ..." (toolset is set as expected:"CMAKE_GENERATOR_TOOLSET:INTERNAL=ClangCL,host=x64")
  3. run "CMake: Configure"
  4. observe that existing (unrelated) CMakeCache entries are removed/unset, i.e. CMakeCache.txt gets deleted.
CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

To make possible an effective change of the "toolset" it should be sufficient to only remove the "internal CMakeCache", i.e. all entries below the section title

########################
# INTERNAL cache entries
########################

in the CMakeCache.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the active-kit switching flow triggered by selecting a kit, then run the CMake: Configure entry point and inspect how it handles CMakeCache.txt. Reproduce the Visual Studio-to-Clang kit change and verify that unrelated cache entries remain while only internal cache entries are removed or updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.