You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And it failed as I expected when operating in Terminal.
F:\Git-Repo\cmake-project-template-conan>cmake --preset win32-gcc-x64-mingw-debug
CMake Error: Could not read presets from F:/Git-Repo/cmake-project-template-conan: Invalid macro expansion
However, it somehow could work with CMake Tools in Visual Studio Code. According to what Kyle Edwards said:
The $env{...} macro is supposed to reference other environment variables within the environment map, or the environment inherited from the parent process if the corresponding variable doesn’t exist. The problem is that if PATH contains $env{PATH}, then it’s referencing itself, creating a circular dependency. The purpose of $penv{...} is to break this cycle by only using the environment inherited from the parent process. If "PATH": "$env{PATH}" works in VSCode then it sounds like they didn’t implement their preset support properly.
Environments and Versions
Visual Studio Code: 1.71.2
CMake Tools: 1.13.11
Screenshots
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
hwhsu1231
changed the title
[bug] Not implement preset support properly with $env{} and $penv{}.
[bug] Not implement preset support properly with $env{}.
Oct 8, 2022
qarni
changed the title
[bug] Not implement preset support properly with $env{}.
[bug] Preset with $env{} are not checked for circular references.
Jul 9, 2024
qarni
changed the title
[bug] Preset with $env{} are not checked for circular references.
[bug] Presets with $env{} are not checked for circular references.
Jul 9, 2024
Brief Issue Summary
This issue is related to the topic I posted in CMake Discourse.
In short, it should FAIL to configure the project when using
$env{}
like the following example:And it failed as I expected when operating in Terminal.
However, it somehow could work with CMake Tools in Visual Studio Code. According to what Kyle Edwards said:
Environments and Versions
Screenshots
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: