Skip to content

How to use CMake kits with a code-workspace #3943

Answered by gcampbell-msft
chrisjaquet asked this question in Q&A
Discussion options

You must be logged in to vote

I'll start with suggesting that if you migrate to CMakePresets.json, you'd be able to have more control over it because it is based on the presence of the file in the folder.

For kits, to my knowledge, in the .code-workspace file, you can specify which folders are opened when you open the workspace file. In that case, you should be able to use the folder .vscode/cmake-kits.json. As for specifying a kit (or even a preset for that matter) for an entire workspace is not explicitly supported.

I think the only other possible option is to define various cmake settings in the code-workspace file to help with this (for example, you could set cmake.sourceDirectory to the folders that are opened wi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gcampbell-msft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants