microsoft / microsoft/vscode-cmake-tools
Add gesture to create default variants file
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### Brief Issue Summary
How do you append a build type?
I want to keep the default build types, Debug, Release, MinSizeRel and RelWithDebInfo, with all their attributes, parameters etc.
I want to append my build type "Deploy".
Deploy will refer to the correspondent build type created on CMakeLists.txt as:
```
# Add new configuration
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} Deploy)
message("generated with config types:" ${CMAKE_CONFIGURATION_TYPES})
set(CMAKE_EXE_LINKER_FLAGS_DEPLOY ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
```
currently this seems to call correctly the build type, but all the other default variants disappeared from the menu:
```
{
"buildType": {
"default": "Debug",
"description": "Build Type Selection",
"choices": {
"Deploy": {
"short": "Deploy",
"long": "Build to deploy to windows server 1607",
"buildType": "Deploy"
}
}
}
}
```
Notes:
A) when you create the first time the file, and save it, this will not trigger the update of the variants on the menu, and it's not clear how to trigger this manually. After closing and reopening VSCode, this makes the trick.
B) The default build types on the popup menu should take into account if a custom build type is defined on the CMakeLists.txt files.
Having a default file created by the plugin would solve both problems (or at least a command/button to create one).
### CMake Tools Diagnostics
_No response_
### Debug Log
_No response_
### Additional Information
_No response_
Contributor guide
Research direction
The issue names no repository files or tests; start by tracing how the variant menu reads its configuration and how CMakeLists.txt build types are detected. Done means a custom Deploy type can be added without removing Debug, Release, MinSizeRel, or RelWithDebInfo, and newly created or saved configuration files refresh the menu without restarting VS Code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100