microsoft / microsoft/vscode-cmake-tools

cmake.skipConfigureWhenCachePresent should also apply to switching variants

Open
#2,124 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This issue doesn't seem to be entirely resolved. I have two variants Debug vs. Release, which use two different build directories ("build/Debug" and "build/Release") and therefore caches. Even if I set "Skip over the configure process if cache is present", configure seems to always rerun upon switching between the variants. Is there currently a way to prevent this, or does this require a fix?

I can confirm that in other circumstances this fix/option seems to do the right thing: If I simply stop the build and restart (without switching variants) I see the following in the output and configure is indeed skipped:

The extension determined that a configuration is needed at this moment but we are skipping because the setting cmake.skipConfigureWhenCachePresent is ON. Make sure the CMake cache is in sync with the latest configuration changes.

Originally posted by @wkjarosz in https://github.com/microsoft/vscode-cmake-tools/issues/984#issuecomment-920242135

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 by reproducing the behavior with Debug and Release variants using separate build directories, with cmake.skipConfigureWhenCachePresent enabled. Compare switching variants with stopping and restarting, and consider the issue complete when switching to a variant with an existing cache skips configuration as described.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.