question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CMake Tools Does not detect Clang as a kit on Windows

See original GitHub issue

Brief Issue Summary

Potentially a dupe of #732, but this is on Windows 10, not Ubuntu.

CMake Tools Kit Scanning does not detect clang installed to the system path. Steps to reproduce:

  1. Clean install Windows 10 v1903
  2. Install CMake from here
  3. Install Clang from here
  4. Install VSCode and CMake Tools Extension

Expected:

  1. Clang is detected as a Kit when “Scan for kits” is selected

Apparent Behavior:

  1. No kits are detected when “Scan for kits” is selected

CMake Tools Log

I turned on Trace-level logging, which shows that it seems to have found Clang, and decided not to do anything:

[kit] Scanning directory C:\Program Files\LLVM\bin for compilers
....
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-console-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-datetime-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-debug-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-errorhandling-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-file-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-file-l1-2-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-file-l2-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-handle-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-heap-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-interlocked-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-libraryloader-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-localization-l1-2-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-memory-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-namedpipe-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-processenvironment-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-processthreads-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-processthreads-l1-1-1.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-profile-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-rtlsupport-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-string-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-synch-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-synch-l1-2-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-sysinfo-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-timezone-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-core-util-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-conio-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-convert-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-environment-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-filesystem-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-heap-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-locale-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-math-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-multibyte-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-private-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-process-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-runtime-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-stdio-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-string-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-time-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\api-ms-win-crt-utility-l1-1-0.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang++.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-apply-replacements.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-change-namespace.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-check.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-cl.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-cpp.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-doc.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-extdef-mapping.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-format.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-import-test.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-include-fixer.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-offload-bundler.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-query.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-refactor.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-rename.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-reorder-fields.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-scan-deps.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang-tidy.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clang.exe
[kit] Testing Clang-ish binary: C:\Program Files\LLVM\bin\clang.exe
[kit] Testing Clang-ish binary: C:\Program Files\LLVM\bin\clang.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\clangd.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\concrt140.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\find-all-symbols.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\git-clang-format
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\hmaptool
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\ld.lld.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\ld64.lld.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\libclang.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\libiomp5md.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\liblldb.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\libomp.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lld-link.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lld.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lldb-argdumper.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lldb-instr.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lldb-mi.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lldb-vscode.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\lldb.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-ar.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\LLVM-C.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-lib.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-nm.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-objcopy.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-objdump.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-profdata.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-ranlib.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-rc.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\llvm-symbolizer.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\LTO.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\modularize.exe
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\msvcp140.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\Remarks.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\scan-build
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\scan-build.bat
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\scan-view
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\ucrtbase.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\vcruntime140.dll
[kit] Checking file for compiler-ness: C:\Program Files\LLVM\bin\wasm-ld.exe
...
[kit] Found 0 kits in directory C:\Program Files\LLVM\bin
...
[kit] Skipping scan of not existing path C:\Program Files (x86)\LLVM\bin
...
[kit] Scanning directory C:\Program Files\LLVM\bin for compilers
...
[kit] Scanning directory C:\Program Files\LLVM\bin for compilers
...
[kit] Testing Clang-ish binary: C:\Program Files\LLVM\bin\clang-cl.exe
[kit] Testing Clang-ish binary: C:\Program Files\LLVM\bin\clang-cl.exe

Developer Tools Log

Platform and Versions

  • Operating System: Windows 10 1903
  • CMake Version: 3.15.5
  • VSCode Version: 1.39.2
  • CMake Tools Extension Version: 1.1.3
  • Compiler/Toolchain: Clang / LLVM 9.0.0

Other Notes/Information

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
skalldricommented, Oct 31, 2019

Solution is to install Visual Studio.

0reactions
jeremyongcommented, Aug 5, 2020

NVM I see that #823 is an open issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Clang with the Microsoft Game Development Kit (GDK)
Describes how to use the Clang support in Visual Studio to build gaming projects.
Read more >
CMake Kits — CMake Tools 1.4.0 documentation
At the moment, CMake Tools will automatically detect Clang and GCC only. If you'd like auto-detection for more tools, please open an issue...
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 >
cmake-toolchains(7) — CMake 3.25.1 Documentation
Cross Compiling for Windows 10 Universal Applications ... If no project command is in the top-level CMakeLists file, one will be implicitly generated....
Read more >
Unable to build using clang-cl, CMake, and Ninja from a terminal
cmake :62 (message): The C++ compiler "C:/PROGRAM FILES/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/Tools/Llvm/x64/bin/clang-cl.exe" is not able to compile a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found