Bad CMake executable "C:\Program Files\CMake\bin\cmake.exe".
See original GitHub issueBrief Issue Summary
I had been using the extension for several months with little issue. One day, it stopped working. I get this error:
Bad CMake executable "C:\Program Files\CMake\bin\cmake.exe". Is it installed or settings contain the correct path (cmake.cmakePath)?
That path is correct, and I can still run cmake from the command line using that absolute path, as well as by the command line finding it in my PATH.
Expected:
- Push Configure button
- Project is configured.
Apparent Behavior:
- Push Configure button
- Error pops up. (text given above).
CMake Tools Log
2019-05-16T00:08:57.844Z [debug] [rollbar] Updated Rollbar payload {"environment":"production","packageJSON":{"name":"cmake-tools","version":"1.1.3"},"client":{"code_version":"1.1.3"},"platform":"win32"}
2019-05-16T00:08:57.957Z [debug] [kit] Reading kits file C:\Users\joee\AppData\Local\CMakeTools\cmake-tools-kits.json
2019-05-16T00:08:57.957Z [debug] [kit] Not reading non-existent kits file: c:\Users\joee\dev\cmaketest\.vscode\cmake-kits.json
2019-05-16T00:08:57.994Z [info] [kit] Successfully loaded 12 kits from C:\Users\joee\AppData\Local\CMakeTools\cmake-tools-kits.json
2019-05-16T00:08:57.996Z [debug] [main] Safe constructing new CMakeTools instance
2019-05-16T00:08:57.996Z [debug] [variant] Constructing VariantManager
2019-05-16T00:08:57.998Z [debug] [main] Constructing new CMakeTools instance
2019-05-16T00:08:57.998Z [debug] [main] Starting CMakeTools second-phase init
2019-05-16T00:08:57.998Z [debug] [rollbar] Checking Rollbar permissions
2019-05-16T00:08:57.998Z [debug] [rollbar] Rollbar enabled? true
2019-05-16T00:08:58.033Z [info] [variant] Loaded new set of variants
2019-05-16T00:08:58.034Z [debug] [main] CMakeTools instance initialization complete.
2019-05-16T00:08:58.036Z [debug] [kit] Reading kits file C:\Users\joee\AppData\Local\CMakeTools\cmake-tools-kits.json
2019-05-16T00:08:58.051Z [info] [kit] Successfully loaded 12 kits from C:\Users\joee\AppData\Local\CMakeTools\cmake-tools-kits.json
2019-05-16T00:08:58.063Z [debug] [kit] Not reading non-existent kits file: c:\Users\joee\dev\cmaketest\.vscode\cmake-kits.json
2019-05-16T00:08:58.739Z [error] [main] Failed to get version information for CMake during upgarde
2019-05-16T00:09:04.013Z [debug] [extension] [6342] cmake.configure started
2019-05-16T00:09:04.013Z [debug] [extension] Start selection of kits. Found 13 kits.
2019-05-16T00:09:04.013Z [debug] [extension] Opening kit selection QuickPick
2019-05-16T00:09:07.778Z [debug] [extension] User selected kit {"label":"VisualStudio.14.0 - x86","description":"Using compilers for VisualStudio.14.0 (x86 architecture)","kit":{"name":"VisualStudio.14.0 - x86","visualStudio":"VisualStudio.14.0","visualStudioArchitecture":"x86","preferredGenerator":{"name":"Visual Studio 14 2015"}}}
2019-05-16T00:09:07.779Z [debug] [rollbar] Updated Rollbar payload {"kit":{"name":"VisualStudio.14.0 - x86","visualStudio":"VisualStudio.14.0","visualStudioArchitecture":"x86","preferredGenerator":{"name":"Visual Studio 14 2015"}}}
2019-05-16T00:09:07.779Z [debug] [main] Injecting new Kit into CMake driver
2019-05-16T00:09:07.781Z [debug] [main] Run configure
2019-05-16T00:09:07.781Z [debug] [main] Saving open files before configure/build
2019-05-16T00:09:08.376Z [debug] [extension] [6342] cmake.configure finished (returned -1)
2019-05-16T00:09:38.911Z [debug] [extension] [9226] cmake.viewLog started
bug] [extension] [5962] cmake.viewLog started
2019-05-16T00:06:42.724Z [debug] [extension] [5962] cmake.viewLog finished (returned undefined)
2019-05-16T00:07:54.282Z [debug] [extension] [5563] cmake.configure started
2019-05-16T00:07:54.282Z [debug] [main] Run configure
2019-05-16T00:07:54.282Z [debug] [main] Saving open files before configure/build
2019-05-16T00:07:54.894Z [debug] [extension] [5563] cmake.configure finished (returned -1)
2019-05-16T00:08:01.181Z [debug] [extension] [3999] cmake.configure started
2019-05-16T00:08:01.181Z [debug] [main] Run configure
2019-05-16T00:08:01.182Z [debug] [main] Saving open files before configure/build
2019-05-16T00:08:01.769Z [debug] [extension] [3999] cmake.configure finished (returned -1)
2019-05-16T00:08:05.661Z [debug] [extension] [1908] cmake.configure started
2019-05-16T00:08:05.662Z [debug] [main] Run configure
2019-05-16T00:08:05.662Z [debug] [main] Saving open files before configure/build
2019-05-16T00:08:06.260Z [debug] [extension] [1908] cmake.configure finished (returned -1)
2019-05-16T00:08:07.230Z [debug] [extension] [8321] cmake.configure started
2019-05-16T00:08:07.233Z [debug] [main] Run configure
2019-05-16T00:08:07.233Z [debug] [main] Saving open files before configure/build
2019-05-16T00:08:07.790Z [debug] [extension] [8321] cmake.configure finished (returned -1)
2019-05-16T00:08:18.032Z [debug] [extension] [4776] cmake.viewLog started
2019-05-16T00:08:18.110Z [debug] [extension] [4776] cmake.viewLog finished (returned undefined)
2019-05-16T00:08:53.117Z [debug] [extension] [4252] cmake.resetState started
2019-05-16T00:08:53.118Z [debug] [extension] [4252] cmake.resetState finished (returned undefined)
2019-05-16T00:08:53.168Z [debug] [extension] Deactivate CMakeTools
e.setVariant finished (returned false)
2019-05-15T23:15:01.394Z [debug] [extension] [2983] cmake.setVariant started
2019-05-15T23:15:04.686Z [debug] [extension] [2983] cmake.setVariant finished (returned false)
2019-05-15T23:16:33.379Z [debug] [extension] [7517] cmake.setVariant started
2019-05-15T23:16:37.191Z [debug] [main] Active build variant changed
2019-05-15T23:16:37.194Z [debug] [main] Run configure
2019-05-15T23:16:37.195Z [debug] [main] Saving open files before configure/build
2019-05-15T23:16:38.147Z [debug] [extension] [7517] cmake.setVariant finished (returned true)
2019-05-15T23:19:58.161Z [debug] [extension] [7558] cmake.configure started
2019-05-15T23:19:58.161Z [debug] [main] Run configure
2019-05-15T23:19:58.162Z [debug] [main] Saving open files before configure/build
2019-05-15T23:19:58.795Z [debug] [extension] [7558] cmake.configure finished (returned -1)
2019-05-15T23:25:26.998Z [debug] [extension] [1615] cmake.configure started
2019-05-15T23:25:27.000Z [debug] [main] Run configure
2019-05-15T23:25:27.000Z [debug] [main] Saving open files before configure/build
2019-05-15T23:25:27.638Z [debug] [extension] [1615] cmake.configure finished (returned -1)
2019-05-15T23:28:19.000Z [debug] [extension] [1460] cmake.clean started
2019-05-15T23:28:19.001Z [debug] [main] Run build clean
2019-05-15T23:28:19.637Z [fatal] [rollbar] Unhandled exception: Unhandled Promise rejection: clean Error: Impossible: CMake driver died immediately after successful configure {}
2019-05-15T23:29:42.344Z [debug] [extension] [6241] cmake.clean started
2019-05-15T23:29:42.345Z [debug] [main] Run build clean
2019-05-15T23:29:42.997Z [fatal] [rollbar] Unhandled exception: Unhandled Promise rejection: clean Error: Impossible: CMake driver died immediately after successful configure {}
2019-05-15T23:29:46.657Z [debug] [extension] [8631] cmake.build started
2019-05-15T23:29:46.658Z [debug] [main] Run build
2019-05-15T23:29:47.276Z [fatal] [rollbar] Unhandled exception: Unhandled Promise rejection: build Error: Impossible: CMake driver died immediately after successful configure {}
2019-05-15T23:29:55.438Z [debug] [extension] [2746] cmake.configure started
2019-05-15T23:29:55.439Z [debug] [main] Run configure
Platform and Versions
- Operating System: Windows 10
- CMake Version: 3.14.4
- VSCode Version: 1.33.1
- CMake Tools Extension Version: 1.1.3
- Compiler/Toolchain: multiple.
Other Notes/Information
I uninstalled cmake, reinstalled the latest version. I uninstalled VS code, reinstalled the latest version. I may have had other Cmake extensions installed at some point, but they are all removed now. I already tried resetting the extension just now. No effect.
Issue Analytics
- State:
- Created 4 years ago
- Comments:41 (17 by maintainers)
Top Results From Across the Web
Bad CMake executable "C:\Program Files ... - Bountysource
I had been using the extension for several months with little issue. One day, it stopped working. I get this error:
Read more >Issue with CMake setup in Visual studio - Reddit
Bad CMake executable "C:\Microsoft VS Code". ... No, the executable path would be something like C\:Program Files\CMake\bin\cmake.exe .
Read more >Bad CMake executable "". Is it installed or settings contain the ...
I want to complete the setup in Visual Studio Code for Pixhawk 4 development. So I followed the steps given in this documentation...
Read more >IntelLLVM compiler support code trying to run the MSVC linker
It fails with the following output: Change Dir: H:/Devel/otfft-new/build-clang/CMakeFiles/CMakeTmp Run Build Command(s):C:/PROGRA~2/MICROS~2/ ...
Read more >getting started section 8 VScode [cmake] ELF2UF2 will need ...
I was hoping to use the pico as a place to learn C programming for ... [build] "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have also faced on same problem.
My environment is below.
Ubuntu 18.04 TLS cmake 3.15.0 : /usr/local/cmake vscode 1.37.0
And, my error log in vscode is below.
I faced the same problem on windows. I fixed it by :