Score:1

bad cmake executable vscode

us flag

I've recently freshly installed Ubuntu 20.04, and VSCode, meant for c++. I added the C/C++, CMake and CMake Tools extensions. Then I cloned one of my old github repos for testing and tried to Cmake:configure from the command pallete, but I got this error.

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

I've looked through the CMake tools extension github repo for answers, and it appears to be some kind of an issue regarding snaps? I'm not that sure what exactly they're talking about, but I got that its a bug in CMake Tools, however I didnt find a solution for this. Can anyone help me out?

Score:3
zw flag

You have to remove Snap'ed cmake by

snap remove cmake

and install deb-packaged version by

sudo apt-get update
sudo apt-get install cmake

sudo apt-add-repository universe
sudo apt-get install cmake-extras

and then restart VSCode.

yomag1234 avatar
us flag
Thank you very much!
Score:1
ao flag

The cmake version that comes with Snap is more recent on my Ubuntu 20.04.4 LTS:

$ apt show cmake
Package: cmake
Version: 3.16.3-1ubuntu1

while the Snap version I installed

cmake version 3.22.2

So I preferred to use /snap/cmake/current/bin/cmake as CMake Path (as recommended here: "It works when you use /snap/cmake/current/bin/cmake as CMake Path. All snap executables seem to be just symbolic links to /usr/bin/snap, and that seems to work fine when called from a terminal but apparently not from the CMake extension in VSCode ...").

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.