Open rpavlik opened 1 year ago
Related to this: https://github.com/microsoft/vscode-cmake-tools/issues/2912
Same basic pain point.
@rpavlik Thanks for your report.
A clarifying question: You mentioned that "the presence of CMakePresets.json turns off existing toolchain-finding". Are you referencing the finding of toolchains
or are you referencing the usage and finding of kits
?
Additionally, have you confirmed that MSVC is installed on your Windows remote machine?
Thanks for any information that can help us investigate.
Sorry, yes I meant kits. The stuff is definitely installed, I just don't always want to turn sideways to use my windows laptop (bad ergonomics) so I see this when using ssh from my Linux desktop. Works fine without presets files, but put a preset file there and you've got trouble. The project I first noticed this with is https://gitlab.freedesktop.org/monado/monado but any with similar presets files will do it. My colleagues have also seen this and will just delete the presets files to get the original behavior back even when not using ssh. (And I'm blocking merge of presets files in the project root in other projects to avoid this problem.)
Brief Issue Summary
To get presets that are designed for cross-platform projects (so, using ninja generator, etc - I haven't tried using the Visual Studio/vcproj generators because I do not want to use them and never had to use them before Presets) to work:
Enter-VsDevShell
with this https://gitlab.freedesktop.org/ryan.pavlik/powershell-enter-vsdevenv so I can get to it quicker, but it's still a pain)I think the fundamental problem here is that the kits and CMakePresets are not inherently in conflict, but are treated as such by the extension. It might be OK to default to not setting up kits when you have a presets file, but I want to be able to tell the extension to please set up the environment for a kit before doing what the presets file says. This doesn't matter as much on Linux where there are standard system locations for a toolchain (though I would still like to pick which one), but on Windows with MSVC installed as usual, you can't just run cmake (at least using any non-vcproj generator) from a command line with no advance setup.
This is actively keeping me from using the otherwise nice CMakePresets functionality because it makes developing and contributing to projects on Windows so painful.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response