microsoft / microsoft/vscode-cmake-tools

Support for microsoft.com/VisualStudioSettings/CMake/1.0 vendor option in CMakePresets.json

Open
#1,885 16 comments 1 reaction 0 assignees View on GitHub
enhancement Feature: presets stale-old
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary
CMakePresets for windows targets using msvc cannot be configured easily as there is no support for the cmakeGenerateCommand vendor option. The only reason this is useful is due to the fact that we must call vcvarsall.bat to load all the required envs to build against msvc. We've been achomplishing this through bat files that use vswhere to first locate, then execute the vcvarsall bat file.

Note I am able to use cmake presets in visual studio 2019 preview, and it works great.

The vendor section in question is:

``` "vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"cmakeGenerateCommand": "setup.bat Debug"
}
}
```

I will note that this is in the json schema definition in vscode, however there is no logic to execute it.

So until this is supported I am relying on the cmake-kits/cmake-variants flow as it supports the option 'environmentSetupScript'

Contributor guide

Open the contributing guide

Research direction

Start with CMakePresets.json vendor handling and the VS Code JSON schema definition mentioned in the issue; trace where preset configure and generate commands are executed. Compare the existing cmake-kits environmentSetupScript flow, then verify that cmakeGenerateCommand runs setup.bat for Windows/MSVC presets and preserves existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.