-
Notifications
You must be signed in to change notification settings - Fork 463
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
${workspaceFolder} is not working for "environmentSetupScript" option in project cmake-kits.json file #1309
Comments
This appears to have been an oversight. Tagging this for the next release. |
|
… in project cmake-kits.json file microsoft#1309 Signed-off-by: alan-wr <[email protected]>
Hi @alan-wr I have a similar problem to the one described by @Yaxley123 and I was wondering if your fix is also going to address my problem? I'm using the Remote-SSH extension, and in my .vscode folder on the Linux remote host I have a
This is the output I get at start-up:
I guess I'm asking whether I need to file a separate bug report, or whether your change will address this. Thank you for your time. Regards, Peter. |
@amazingmo The extension support workspaceFolder variable on kit's property toolchain file. I see you use WorkspaceFolder, it should be workspaceFolder. ( The first char 'W' is a lowercase letter.) I test it on local host, it is fine. If there exists problem still, you can ping me. |
I took out the ${WorkspaceFolder} variable and I can see that the toolchain file value is just being passed directly to CMake's -DCMAKE_TOOLCHAIN_FILE. |
https://code.visualstudio.com/docs/editor/variables-reference Predefined variables# ${workspaceFolder} - the path of the folder opened in VS Code |
@alan-wr Thank you. I see it now. |
@amazingmo You are welcome. |
… in project cmake-kits.json file microsoft#1309 Signed-off-by: alan-wr <[email protected]>
#1406) * ${workspaceFolder} is not working for "environmentSetupScript" option in project cmake-kits.json file #1309 Signed-off-by: alan-wr <[email protected]> * Tool kit not update after create .vscode/cmake-kits.json on new workspace/folder. #1416 Signed-off-by: alan-wr <[email protected]> * ${workspaceFolder} is not working for "environmentSetupScript" option in project cmake-kits.json file #1309 Signed-off-by: alan-wr <[email protected]> * Fix string|undefined error Co-authored-by: Andreea Isac <[email protected]> Co-authored-by: Andreea Isac <[email protected]>
This should be fixed in CMake Tools 1.5.0 which was published today. |
Brief Issue Summary
As pre the documentation specifies, the "environmentSetupScript" option only accepts absolute paths. When I would like to access a setup script with ${workspaceFolder} variable, the script is neglected. If I replace the variable to hardcoded path, the setup script runs successfully. If I use the ${workspaceFolder} variable in any other option in the same file (for example in "toolchainFile"), the variable in expanded successfully.
Expected:
${workspaceFolder} and other variables are expanded successfully in the "environmentSetupScript" option in the project cmake-kits.json file.
Apparent Behavior:
If I use the ${workspaceFolder} variable, the setup script does not run. If I replace the variable with a hardcoded path, the setup script runs successfully.
CMake Tools Log
The "environmentSetupScript" option does not provide any logs, just fails.
Platform and Versions
Thank you!
The text was updated successfully, but these errors were encountered: