Is it by design that the CMake extension correctly evaluates environment variables from presets when using the ${env:<var>} syntax instead of $env{<var>}? #4531
bhubavenski
started this conversation in
General
Replies: 1 comment
-
@bhubavenski This is a great question! Based on your investigation, I would say that it currently is by design. This was likely introduced as an effort to make it easier to develop in VS Code. However, you make a great point in that it could make the presets you are using less portable to CI, CLI, and other usages if we support it (specifically in VS Code). I'm going to create an issue from this and we can investigate/brainstorm what the best way forward for this is. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Today, I accidentally wrote in
CMakePresets.json
"toolchainFile": "${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
(using the VS Code environment variable expansion syntax) instead of
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
(which is the CMake environment variable expansion syntax), and both worked the same.
So I’m wondering — is it by design that both syntaxes are supported, or is this considered a bug?
Beta Was this translation helpful? Give feedback.
All reactions