-
Notifications
You must be signed in to change notification settings - Fork 450
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
Variable substitution stopped working in version 1.7 #1914
Comments
Are you using |
I believe I am using kits. I have configured the kits in a separate cmake-kits.json file. And I am setting the cmake.sourceDirectory in the settings.json |
I see what happened. This commit disabled using certain variables in vscode-cmake-tools/src/extension.ts Lines 437 to 438 in c1f11cb
|
Yes I can fix this. The original mistake on my part was that I was focused on scenarios where we want to identify if a project is or not a CMake project and that needs to happen before that annoying popup that we had about setting a kit. So I thought any kit information that is missing shouldn't block our analysis of having or not having a CMakeLists.txt (via "cmake.sourceDirectory"). But I didn't realize that if we do have a kit set then we need to expand any variables kit related. Quick fix. |
Hwo to fix? |
I try to use I use it as an argument to the clangd startup and it passes the non evaluated string |
@ToBoMi we support that feature, but your syntax is incorrect which is why it's not substituting it properly. Try |
Already tried that and many variations after reading the docs. None of them worked. This: "clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}/${command:cmake.activeConfigurePresetName}",
] leads to the following clangd call (I replaced some things with [...] in the workspace folder)
|
We don't own the |
Brief Issue Summary
I am having an issue similar to the one described in #1526. I am trying to set the cmake.sourceDirectory using the variable ${buildKit} as follows:
"cmake.sourceDirectory": "${workspaceFolder}/project_1/${buildKit}",
I cannot configure the cmake project and I receive the error shown below.
I was able to later solve this by installing the previous version of cmaketools version. 1.6.0, and the substitution worked fine. I believe something broke in the transition to 1.7
CMake Tools Log
Platform and Versions
The text was updated successfully, but these errors were encountered: