vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Independent projects / CMakeLists.txt
Now I should have main CMakeLists.txt in workspace root.
But I have several independent folders each with its own CMakeLists.txt.
If I open another VSCode having one of my folders as workspace root, everything is ok, but it's not convenient.
I tried to configure CMake Tools:
{
"cmake.buildDirectory": "${fileDirname}/build",
"cmake.sourceDirectory": "${fileDirname}"
}
But it seems ${fileDirname} is ignored, unlike ${workspaceFolder}.
As I see, one can say
{
"cmake.buildDirectory": "${workspaceRoot}/build.${buildType}"
}
so ${buildType} is also available.
Is it possible to add support for ${fileDirname} into plugin settings?
Or may be another way to use multiple independent projects inside single VSCode workspace?
There is an open ticket for multi-root workspace support. It's on the roadmap, but might be a while since the extension deals tightly with file paths and the like.
Having a similar problem I think.
I created a workspace and added multiple folders to it, where each folder contains a separate CMake project that I want to build. CMake Tools seems to only recognize the first project, and does not let me configure or build the others.
Is this forcing me to build a super project just for CMake Tools integration? I would prefer not to do this yet, as these projects come from separate git repos.
This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.
Stale bots are extremely user-hostile. Just because this has fallen off the developers' radar doesn't mean it isn't valid. Going to unsubscribe from this issue because I don't want to see this happen again.
Hi @HunterZ I apologize that our bot seems hostile, maybe we can better improve the wording. Please let us know if you have suggestions. We only mean to gauge continued interest and don't mean to comment on an issue's validity. Since there seems to be continued current and future interest, I will add the 'stale-exempt' label. If you want to resubscribe, you can be assured that this issue won't be marked 'stale' or 'stale-old' again as long as the 'stale-exempt' label is applied.
@ukoloff @HunterZ There should be support for selecting the active folder in the CMake Tools project, does this not meet your needs? If not, we should mark consider this as an improvement needed in our multi-root scenarios.
Apparently it's been 5 years since I first commented, and a year since I tried to opt out of caring about this issue. I don't even remember what it's about, but I'm angry about user-hostile bots again.
@HunterZ I'm not sure I understand you r comment about user-hostile bots, but since you said that you don't care about this issue anymore, we will close it in favor of other issues that are better tracking multi-root support.
See those items here: #1042 #4112 #2338
Thank you