-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
${buildType} doesnt work in launch.json #334
Comments
That's not how this works. The variable substitution, at least to my knowledge, only works in the settings.json and maybe in the variant and kit json files (I can't remember right now). |
CMake Tools has no access to do those substitutions. You may want to look at |
@vector-of-bool Thanks, I actually found that, however I still need the buildType, because there are some other folders I need to set as Link directories. Is there a way to get that with a ${command:cmake.}? |
Not at the moment, but it's a valid feature request. I'll log it |
Is there any progress on this feature ? I actually have pretty close needs.
Maybe any workaround to advice ? |
I found myself wanting this feature, too, but in tasks.json. A task to use conan to install dependencies might look like this: "tasks": [
{
"label": "conan install",
"type": "shell",
"options": {
"cwd": "${command:cmake.buildDirectory}"
},
"command": "conan install ${workspaceRoot} -s build_type=${command:cmake.buildType}",
"problemMatcher": []
}
] |
Hoping |
I forgot to close this issue since it was fixed in 1.2. @xgdgsc the referenced Pull Request shows what needs to be done to add a new command. If you want to follow that pattern to add support for |
Great. I will send a PR in a month. |
@mfdeveloper I'm going to move your request to a new issue. This issue should have been closed. The solution for the original request is to use |
I'm trying to set up a launch.json in VSCode, where upon launching, the currently selected built type is selected. So if I set cmake to debug, the Build/Debug/MyApp will launch, but if I select release, then Build/Release/MyApp will launch.
I tried to accomplish this according to the documentation here (I'm not sure if I followed it correctly): https://vector-of-bool.github.io/docs/vscode-cmake-tools/configuring.html?highlight=
In my launch.json I have something like this:
Platform and Versions
The text was updated successfully, but these errors were encountered: