CMake Tools doesn't recognize CMakeLists.txt on Windows
See original GitHub issueBrief Issue Summary
On Windows, when configuring cmake through CMake Tools, the “You do not have a CMakeLists.txt” message appears even though the file does exist.
Expected:
The project configures
Apparent Behavior:
CMake Tools doesn’t find the CMakeLists.txt
CMake Tools Log
[cms-client] Configuring using the "Ninja" CMake generator
[cms-client] Configuring using the "Ninja" CMake generator
Developer Tools Log
INFO no standard startup: panel is active
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.211Z [debug] [rollbar] Updated Rollbar payload {"environment":"production","packageJSON":{"name":"cmake-tools","version":"1.1.1"},"client":{"code_version":"1.1.1"},"platform":"win32"}
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.439Z [debug] [kit] Reading kits file C:\Users\Justin\AppData\Roaming\CMakeTools\cmake-tools.json
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.440Z [debug] [kit] Not reading non-existent kits file: c:\Users\Justin\Documents\CPP\pitchfork\.vscode\cmake-kits.json
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.606Z [info] [kit] Successfully loaded 12 kits from C:\Users\Justin\AppData\Roaming\CMakeTools\cmake-tools.json
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.609Z [debug] [main] Safe constructing new CMakeTools instance
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.611Z [debug] [variant] Constructing VariantManager
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.613Z [debug] [main] Constructing new CMakeTools instance
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.615Z [debug] [main] Starting CMakeTools second-phase init
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.617Z [debug] [rollbar] Checking Rollbar permissions
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.625Z [debug] [rollbar] Rollbar enabled? true
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.739Z [info] [variant] Loaded new set of variants
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.742Z [debug] [main] CMakeTools instance initialization complete.
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.743Z [debug] [main] Injecting new Kit into CMake driver
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.747Z [debug] [kit] Reading kits file C:\Users\Justin\AppData\Roaming\CMakeTools\cmake-tools.json
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.767Z [info] [kit] Successfully loaded 12 kits from C:\Users\Justin\AppData\Roaming\CMakeTools\cmake-tools.json
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.769Z [debug] [kit] Not reading non-existent kits file: c:\Users\Justin\Documents\CPP\pitchfork\.vscode\cmake-kits.json
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.771Z [debug] [rollbar] Updated Rollbar payload {"kit":{"name":"Visual Studio Community 2017 - amd64","visualStudio":"e3c5dd2b","visualStudioArchitecture":"amd64","preferredGenerator":{"name":"Visual Studio 15 2017","platform":"x64"}}}
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:19.771Z [debug] [main] Injecting new Kit into CMake driver
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] activating extension
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:22.349Z [debug] [extension] Configuring workspace on open file:///c%3A/Users/Justin/Documents/CPP/pitchfork
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:22.351Z [debug] [main] Run configure
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:22.351Z [debug] [main] Saving open files before configure/build
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:22.795Z [debug] [main] Starting new CMake driver
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:22.796Z [debug] [main] Starting CMake driver
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:22.797Z [debug] [driver] CMakeDriver Kit set to Visual Studio Community 2017 - amd64
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:24.148Z [debug] [driver] Run _refreshExpansions
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:24.149Z [debug] [cms-driver] Run doRefreshExpansions
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:24.149Z [debug] [driver] Run _refreshExpansions cb
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:24.159Z [debug] [cms-client] Started new CMake Server instance with PID 6536
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.162Z [debug] [driver] Trying to detect generator supported by system
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.192Z [info] [cms-client] Configuring using the "Ninja" CMake generator
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.196Z [debug] [driver] Setting new variant , Emit debug information without performing optimizations
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.196Z [debug] [driver] Run _refreshExpansions
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.197Z [debug] [cms-driver] Run doRefreshExpansions
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.197Z [debug] [driver] Run _refreshExpansions cb
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:25.265Z [debug] [cms-client] Started new CMake Server instance with PID 3496
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:26.266Z [debug] [driver] Trying to detect generator supported by system
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:26.301Z [info] [cms-client] Configuring using the "Ninja" CMake generator
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:26.398Z [debug] [driver] Start configure
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:26.398Z [debug] [driver] Runnnig pre-configure checks and steps
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:272 [Extension Host] [CMakeTools] 2018-09-03T04:29:26.399Z [debug] [driver] No configuring: There is no c:/users/justin/documents/cpp/pitchfork/cmakelists.txt
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2386 You do not have a CMakeLists.txt
t.onDidNotificationChange @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2386
Platform and Versions
- Operating System: Windows
- CMake Version: 3.12.1
- VSCode Version: 1.26.1
- CMake Tools Extension Version: 1.1.1
- Compiler/Toolchain: Visual C++ 2017
Other Notes/Information
Clicking “Quickstart a new CMake project” fails with the message: “This workspace already contains a CMakeLists.txt!”
I’m guessing this has to do with the fact that Windows uses case insensitive file paths.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
CMake projects in Visual Studio | Microsoft Learn
Use the CMakeLists. txt file in each project folder just as you would in any CMake project. You can specify source files, find...
Read more >Failed to configure preset with Clang/LLVM compilers when ...
Problem Description. First of all, I already installed Clang/LLVM by running the following winget command: winget install LLVM.LLVM.
Read more >vscode-cmake-tools/support - Gitter
I'm using Clang 10.0.0 to compile, VSCode 1.53.2, CMake 3.19.6 (on the machine that doesn't work) and 3.17.0-rc2 on the one that does....
Read more >Setting Up CMake | Qt Creator Manual - Qt Documentation
CMake automates the configuration of build systems. It controls the software compilation process by using simple configuration files, called CMakeLists.txt ...
Read more >How to configure VS Code's CMake Tools Extension for GCC ...
You probably need to select a different build tool. [cmake] CMake Error: CMake was unable to find a build program corresponding to "MSYS ......
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
Here’s what happened: I created the directory from the Windows Subsystem for Linux (WSL), even though it is a Windows folder. Windows automatically enables case sensitivity for files created from the WSL, meaning that the paths are actually case sensitive.
I verified it by running
fsutil.exe
:I have no idea how to fix this but in the meantime a small error message change would really go a long way and save a number of lives. Something like: