Skip to content
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

workspaceFolderBasename not resolved #869

Closed
rhaschke opened this issue Nov 3, 2019 · 5 comments
Closed

workspaceFolderBasename not resolved #869

rhaschke opened this issue Nov 3, 2019 · 5 comments
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure Feature: settings
Milestone

Comments

@rhaschke
Copy link

rhaschke commented Nov 3, 2019

The variable ${workspaceFolderBasename} officially listed here is not resolved in cmake.buildDirectory, but yields:
Invalid variable reference ${workspaceFolderBasename} in string.

If cmake.buildDirectory is empty, cmake configure fails as well (obviously).
It would be great if the user would be prompted for a buildDirectory in this case.

@bobbrow bobbrow added Feature: settings enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure labels Nov 4, 2019
@bobbrow
Copy link
Member

bobbrow commented Nov 4, 2019

The variables you referenced are resolved by VS Code when you use them in tasks.json or launch.json. Extensions have to explicitly build support for them when they are used elsewhere.

cmake.buildDirectory defaults to ${workspaceFolder}/build when not set. Did you set it to an invalid location, or the empty string ""?

@rhaschke
Copy link
Author

rhaschke commented Nov 5, 2019

Indeed I tried to customize the build directory and thus changed the default value.
As I wanted to be asked for the build directory each time, I also tried the empty string in the user settings.

@Zingam
Copy link
Contributor

Zingam commented Nov 18, 2019

The variables you referenced are resolved by VS Code when you use them in tasks.json or launch.json. Extensions have to explicitly build support for them when they are used elsewhere.

@bobbrow Do you have any tips how can this be implemented?

@bobbrow
Copy link
Member

bobbrow commented Nov 18, 2019

In cpptools we treat them as additional environment variables and pass them into the resolver as such. I haven't looked to see how CMake Tools does this yet.

@bobbrow
Copy link
Member

bobbrow commented Feb 12, 2020

This was fixed in 1.3.0

@bobbrow bobbrow closed this as completed Feb 12, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure Feature: settings
Projects
None yet
Development

No branches or pull requests

3 participants