-
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
PATH issue since v1.19 #4019
Comments
I think I'm experiencing this too, but when setting the toolchain file - env var However it is expanded correctly inside my CMakeLists.txt file - |
I experienced the same problem with |
Same here, "CMAKE_TOOLCHAIN_FILE": {
"type": "FILEPATH",
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}, CMake's output: -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/scripts/buildsystems/vcpkg.cmake |
Same here with "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" In the |
same on my side. The bug cannot be that old... |
@Skyblade14 @marcogmaia @KorkiFork @danny-mhlv @PatrickKa @kimbirkelund Thank you all for quickly posting an issue! We just released the official 1.19 version yesterday, so it sounds like there may be a regression. However, we can't necessarily properly investigate this without reproduction steps and repro projects. Could you all please provide these so that we can quickly investigate a fix? |
@Skyblade14 @marcogmaia @KorkiFork @danny-mhlv @PatrickKa @kimbirkelund I believe I've found the issue specifically for Presets, I haven't taken a look at kits yet. Could you install the below vsix and test to confirm? You'll need to modify the file extension from .zip to .vsix. |
It works 🎉. Environment variables in presets are now expanded correctly again. Thanks for the fast fix. |
Perfect, we will work to get a PR merged today and then a fix into pre-release as soon as possible. |
@KorkiFork I'm currently not able to reproduce the issue in the kits environment. I think the issue actually is related to this one #4020 and #4005, not an issue with the environment. I'll track this in the other issue. |
@Skyblade14 @marcogmaia @KorkiFork @danny-mhlv @PatrickKa @kimbirkelund We have a PR open here #4024, once merged, it will go into pre-release the next morning. @KorkiFork Please let me know if this fixes your issue, but since it's with kits, it may not. Please provide any more information about the error, the repro, etc, in order to help us reproduce your issue. Thanks! |
@gcampbell-msft huge thanks for your replies and work! |
Sorry for the late reply, but I had a busy day. |
Reproduce issue like this: Open a CMake project and try to configure it with the "JOM test kit".
|
@KorkiFork Got it. I'll get to this issue and try to repro it as soon as possible. |
@KorkiFork To workaround this, can you set the |
Tested with v1.20.1 (pre-release), setting cmake.generator in settings.json, the issue is still present. |
@gcampbell-msft, I can confirm the same results as @KorkiFork, I've tested with the |
@marcogmaia What is your scenario? I can't repro or investigate your issues without reproduction steps and more info. We tested pretty thoroughly the use of VS devenv in Presets, so are you using Kits? |
@gcampbell-msft I've described what's happening with me in #4031. |
It seems that the bug comes back, #4218 |
@vipcxj Does this issue reproduce on the most recent pre-release version? |
On version 1.20.42 the issue seems to be resolved by the CMake Extension in VS Code. But I guess this is our of scope for this conversation and should be reported to the CMake project, if it is considered to be a bug. |
Brief Issue Summary
Hi!
Since CMake Tools version v1.19, the kits in the cmkae-tools-kits.json no longer read the system/user environment PATH correctly on Windows.
E.g. download Qt jom and add the jom.exe location to the system/user environment PATH.
Set a kit's preferredGenerator to "NMake Makefiles JOM", and when selecting the kit in a project configuration, the extension won't be able to find jom.exe.
Even adding path jom.exe via kit's environmentVariables won't help, e.g. environmentVariables{"PATH": "path_to_jom;${env.PATH}"}
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: