microsoft / microsoft/vscode-cmake-tools
Compile File option doesn't use the selected configuration/build set
Nobody has claimed this yet.
- 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.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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