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

Bad CMake executable message appears erroneously #2368

Closed
bobbrow opened this issue Feb 8, 2022 · 17 comments
Closed

Bad CMake executable message appears erroneously #2368

bobbrow opened this issue Feb 8, 2022 · 17 comments
Assignees
Labels
bug a bug in the product Feature: settings in progress actively being working on
Projects
Milestone

Comments

@bobbrow
Copy link
Member

bobbrow commented Feb 8, 2022

While investigating #2361, it appears that the "Bad CMake executable" message appears one more time after fixing the cmake.cmakePath setting and saving the settings.json file. Despite the message, the save works and the new cmake.cmakePath setting is used in the next Configure operation.

@bobbrow bobbrow changed the title Bad CMake executable Bad CMake executable message appears erroneously Feb 8, 2022
@bobbrow bobbrow added bug a bug in the product Feature: settings labels Feb 8, 2022
@H-G-Hristov
Copy link

H-G-Hristov commented Feb 10, 2022

I just found out (I think) that Workspace setting always overwrites User even if it is empty. So basically I am unable to use CMake from a shared directory between macOS host/Linux on a VM.
So i attempted to set CMake location in User but I get

Bad CMake executable "". Is it installed or settings contain the correct path (cmake.cmakePath)?

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

Yes, Workspace and Folder settings always override User. I'm not 100% clear on what you're trying to do though. Are you setting "cmake.cmakePath": "" in the Workspace setting? That will never work.

@H-G-Hristov
Copy link

Yes, I tried that. So we can't have a global setting for cmake.cmakePath or am I doing something wrong?

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

If you don't set anything for cmake.cmakePath in Workspace or Folder settings, then User settings will be used. So if the User setting would work for both workspaces, then delete whatever you set for cmake.cmakePath in Workspace and Folder settings.

@H-G-Hristov
Copy link

So I use the same folder on a Mac. I'm accessing it also via Virtual Box which has Linux. Linux uses snaps so I need to explicitly set: cmake.cmakePath to /snap/cmake/current/bin/cmake but then this breaks my Mac settings :)

@H-G-Hristov
Copy link

If you don't set anything for cmake.cmakePath in Workspace or Folder settings, then User settings will be used. So if the User setting would work for both workspaces, then delete whatever you set for cmake.cmakePath in Workspace and Folder settings.

If I clear:

Screen Shot 2022-02-10 at 6 31 59 PM

I get: Bad CMake executable "". Is it installed or settings contain the correct path (cmake.cmakePath)?

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

You can't clear it by deleting the contents, you have to use the gear icon. The blue line to the left of the setting indicates that it has a value (empty string in this case).
image

@H-G-Hristov
Copy link

This setting sets it to "cmake".

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

Yes, that's the default value, but that value is not used because you didn't explicitly set it. You should see something like this that indicates it is set in the User settings.

image

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

I feel like VS Code used to show the User value if you didn't set it in Workspace settings. This looks confusing and perhaps is a regression from previous versions.

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

I just cleared my Workspace setting, set something bogus in User so I could get the message (I'm on Windows currently), and it does pick up the User setting:

image

@H-G-Hristov
Copy link

That's confusing! Thank you!

@bobbrow
Copy link
Member Author

bobbrow commented Feb 10, 2022

Apparently it's always been this way. I'm adding a 👍 to this issue in hopes that they'll redesign it: microsoft/vscode#50827

Though, honestly, I almost always use the JSON view for settings.

@H-G-Hristov
Copy link

Just for the record. Another workaround: #838 (comment)

@Juanc179
Copy link

Hi, im running into the same problem. I checked my cmake path and it's like it should be. anyways, it doesn't detect it or it is missing something.
image

@Sinetian
Copy link

bad. Hopes it will be fixed.

@benmcmorran benmcmorran added this to Triage in 1.15 via automation May 22, 2023
@benmcmorran benmcmorran added this to the 1.15 milestone May 22, 2023
@benmcmorran benmcmorran moved this from Triage to To do in 1.15 May 22, 2023
@andreeis andreeis added the in progress actively being working on label Jul 25, 2023
@andreeis
Copy link
Contributor

andreeis commented Aug 1, 2023

Fix is merged in and should be included in the 1.15 release.

@andreeis andreeis closed this as completed Aug 1, 2023
1.15 automation moved this from To do to Done Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product Feature: settings in progress actively being working on
Projects
No open projects
1.15
Done
Development

No branches or pull requests

6 participants