Skip to content
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

cmake.generator fails when casing is incorrect #917

Open
bobbrow opened this issue Nov 14, 2019 · 2 comments
Open

cmake.generator fails when casing is incorrect #917

bobbrow opened this issue Nov 14, 2019 · 2 comments
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure help wanted we currently are not planning work on this and would like help from the open source community quick fix the fix is estimated to be quick
Milestone

Comments

@bobbrow
Copy link
Member

bobbrow commented Nov 14, 2019

@bobbrow Thanks for the update. I am still having issues. I now see:

[cms-client] Configuring using the "ninja" CMake generator with plattform "undefined" and toolset {}
[rollbar] Unhandled exception: Unhandled Promise rejection: Post-folder-open [cmake-server] Failed to activate protocol version: Generator "ninja" not supported. {"folder":{"uri":{"$mid":1,"fsPath":"c:\\SVNProj\\zodiac\\branches\\TRY_TML_CMake_3Oct2019","_sep":1,"external":"file:///c%3A/SVNProj/zodiac/branches/TRY_TML_CMake_3Oct2019","path":"/c:/SVNProj/zodiac/branches/TRY_TML_CMake_3Oct2019","scheme":"file"},"name":"TRY_TML_CMake_3Oct2019","index":0}}

I guess the first message is related to #913?

The main issue seems to be:

Failed to activate protocol version: Generator "ninja" not supported. 

I can run Ninja from a cmd prompt (it is in the system path). How can I fix this problem in Code?

Originally posted by @DavidA2014 in #908 (comment)

@bobbrow bobbrow changed the title @bobbrow Thanks for the update. I am still having issues. I now see: cmake.generator fails when casing is incorrect Nov 14, 2019
@bobbrow
Copy link
Member Author

bobbrow commented Nov 14, 2019

Hi David, I think I was able to reproduce your problem. This might sound silly, but can you capitalize the first letter in "Ninja"? It looks like CMake is case-sensitive...

D:\test\cmaketest2\build>cmake -G ninja ..
CMake Error: Could not create named generator ninja

I think the extension can help by checking the casing before sending the raw cmake.generator string down to CMake.

@bobbrow bobbrow added enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure help wanted we currently are not planning work on this and would like help from the open source community tweak labels Nov 14, 2019
@bobbrow bobbrow added this to the On Deck milestone Nov 14, 2019
@TheJCAB
Copy link
Member

TheJCAB commented Jul 25, 2020

Hi! I just bumped into this problem. But with a wrinkle added to it.

I had added a "cmake.generator" line to my settings file, and as stated, I wrote "ninja" without the capitalization. But... then, after correcting the line in the settings, the extension insisted in calling it "ninja". Not even deleting the line from the settings file, nor the "CMake: Delete Cache and Reconfigure" command, was able to bring it back to life. Only physically deleting the build directory did the trick for me.

Fixing that so any change to the generator name does the right thing would be great, if possible.

@gcampbell-msft gcampbell-msft added quick fix the fix is estimated to be quick and removed tweak labels Oct 3, 2023
@github-project-automation github-project-automation bot moved this to Triage Needed in CMake Tools Nov 29, 2023
@gcampbell-msft gcampbell-msft moved this from Triage Needed to Pending Prioritization in CMake Tools Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure help wanted we currently are not planning work on this and would like help from the open source community quick fix the fix is estimated to be quick
Projects
Status: Pending Prioritization
Development

No branches or pull requests

3 participants