microsoft / microsoft/vscode-cmake-tools

Compile File option doesn't use the selected configuration/build set

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

Nobody has claimed this yet.

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

Description

Brief Issue Summary

I don't know if this is a bug or intended behaviour, but when I click to compile an individual file it doesn't use the selected configuration and build preset.

As you can see in the images - I have chosen "release" as the preset (which does not set -fsanitize_address) but the output from the individual compile shows this flag and appears to be using my debug-asan preset, which uses DebugAsan.

Is it intended to work this way? It seems strange compiling an individual file wouldn't use the current settings for the project.

Screenshot 2023-10-01 at 14 33 39 Screenshot 2023-10-01 at 14 34 14

If "Compile File" uses its own config/build preset, how can I select it?

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

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

Reproduce the Compile File action with multiple CMake presets, including release and debug-asan, and inspect how the selected configuration is resolved. Trace the Compile File entry point and compare its generated compile command with the active project settings; done means the behavior matches the selected preset or clearly documents how its configuration is selected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, developer-experience
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.