microsoft / microsoft/vscode-cmake-tools
Make sure "toolset" keyword is generated for all the VS generators that support it
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
@andreeis I am experiencing the same issue with visual studio code 1.57.1 and the CMake Tools extension's version 1.7.3. I see your fix in the release notes. Therefore there is certainly something I am doing wrong. Here's my `cmake-tools-kits.json`:
```json
[
{
"name": "GCC 9.2.0",
"compilers": {
"C": "C:\\MinGW\\bin\\gcc.exe",
"CXX": "C:\\MinGW\\bin\\g++.exe"
},
"preferredGenerator": {
"name": "MinGW Makefiles"
},
"environmentVariables": {
"CMT_MINGW_PATH": "C:\\MinGW\\bin"
}
},
{
"name": "GCC 9.2.0 mingw32",
"compilers": {
"C": "C:\\MinGW\\bin\\mingw32-gcc.exe",
"CXX": "C:\\MinGW\\bin\\mingw32-g++.exe"
},
"preferredGenerator": {
"name": "MinGW Makefiles"
},
"environmentVariables": {
"CMT_MINGW_PATH": "C:\\MinGW\\bin"
}
},
{
"name": "GCC for mingw32 9.2.0",
"compilers": {
"C": "C:\\MinGW\\bin\\mingw32-gcc.exe",
"CXX": "C:\\MinGW\\bin\\mingw32-g++.exe"
},
"preferredGenerator": {
"name": "MinGW Makefiles"
},
"environmentVariables": {
"CMT_MINGW_PATH": "C:\\MinGW\\bin"
}
},
{
"name": "Visual Studio Professional 2019 Release - amd64",
"visualStudio": "33a40df0",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 16 2019",
"platform": "x64",
"toolset": "host=x64"
}
},
{
"name": "Visual Studio Professional 2019 Release - amd64_x86",
"visualStudio": "33a40df0",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 16 2019",
"platform": "win32",
"toolset": "host=x64"
}
},
{
"name": "Visual Studio Professional 2019 Release - x86",
"visualStudio": "33a40df0",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 16 2019",
"platform": "win32",
"toolset": "host=x86"
}
},
{
"name": "Visual Studio Professional 2019 Release - x86_amd64",
"visualStudio": "33a40df0",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 16 2019",
"platform": "x64",
"toolset": "host=x86"
}
},
{
"name": "VisualStudio.10.0 - amd64",
"visualStudio": "VisualStudio.10.0",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 10 2010",
"platform": "x64"
}
},
{
"name": "VisualStudio.10.0 - x86",
"visualStudio": "VisualStudio.10.0",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 10 2010",
"platform": "win32"
}
},
{
"name": "VisualStudio.10.0 - x86_amd64",
"visualStudio": "VisualStudio.10.0",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 10 2010",
"platform": "x64"
}
}
]
```
That is what I get after a `CMake: Scan for kits`. How do make the `toolset` appear for my visual studio 2010 kits or how do I prevent visual studio code from adding the options `-T host=x64 -A x64` to the cmake command?
_Originally posted by @zadigus in https://github.com/microsoft/vscode-cmake-tools/issues/1352#issuecomment-873842853_
Contributor guide
Research direction
Reproduce the issue from the supplied cmake-tools-kits.json and the CMake: Scan for kits command, focusing on Visual Studio 2010 and 2019 entries. Trace how supported Visual Studio generators produce the CMake generator options; done means toolset is generated where supported, or the unwanted -T and -A options are not added, for the reported kits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript, vscode
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100