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
Ninja generator is used instead of Visual Studio 16 2019 #1084
Comments
Probably a duplicate of #426? |
@ghuser404, #426 has something in common with this issue indeed but they are not perfect duplicates. In there the users are complaining also about inconsistent caching, refreshing, updating (etc...) of kits and generator settings which I'm going to look at separately, after ensuring the proper priority rules for generatos are respected. No reload of window should be required to have kits/generator settings take effect. @Celeborn2BeAlive , I am testing a fix for this but what I wasn't able to reproduce on my side is your not having Ninja chosen for 2017. Just to make sure I'm not overlooking anything or fixing this wrong, I want to get to the bottom of this inconsistent behavior. Do you have any generator setting anywhere that might explain why 2017 generator is chosen over Ninja? Are the two scenarios happening on the same machine and user? Having ninja installed on one and not installed on the other would explain the different choice. |
@andreeis Just tried again on my home and work computer.
So maybe the extension choose Ninja for VS Community but not VS Professional. Or it may be because I don't have 2019 installed at all at work. |
A workaround for now is to set |
@Celeborn2BeAlive , maybe the difference is that Ninja is not installed on your work computer? The code I fixed in CMake Tools was always picking Ninja first, if installed. If not installed, it would give a chance for the VS generator to be discovered. |
@bobbrow Sadly that workaround doesn't work if I need a specific architecture. It always picks the host one. |
This is going to be fixed also with the same PR that is attached. |
CMake Tools 1.4.0 Beta is available on GitHub. Please try it out and let us know if you encounter any issues. |
@andreeis Now it initializes a correct cross-compiler for MSVC CMake generator, but there is an issue. If you have |
Thanks @Minimonium! I moved your comment to a new issue. I can reproduce the problem. We'll get it fixed for 1.4.0. |
This fix is available in CMake Tools #1.4.0 which has been released. |
This change (to use Visual Studio as a generator instead of Ninja when compiling with MSVC) has broken my build environment :(. This was is a breaking change but doesn't appear to have been treated as such. This was also previously advertised as a feature of this extension, per the documentation linked in the extension's homepage. https://vector-of-bool.github.io/docs/vscode-cmake-tools/kits.html#kits Quote:
|
Brief Issue Summary
When I select the kit "Visual Studio Community 2019 Release - amd64", vscode-cmake-tools is passing '-G Ninja' to cmake instead of '-G "Visual Studio 16 2019" -A x64'.
My cmake-tools-kit.json file contains the entry:
What is strange is that I get the correct behavior when I select "Visual Studio Community 2017 Release - amd64" (in that case I can see '-G "Visual Studio 15 2017" -A x64' passed to cmake, which is correct). For this one the entry is:
that seems pretty similar to the one for VS 2019. So I don't know how vscode-cmake-tools interprets the file cmake-tools-kits.json, but it seems that it does treat both cases in the same way.
Expected:
Apparent Behavior:
CMake Tools Log
Platform and Versions
The text was updated successfully, but these errors were encountered: