About compile_commands.json(CLion 24.3.4)
Answered
I'm using Xmake to build my embedded project(because it's easier to write config file than cmake), and i use it to generate a compile_commands.json in order to manage my project src files. But i have a question ,i don't have a CmakeList.txt in peoject ,when i open the compile_command.json as a project ,Clion always tell me that i don't have a cmakelist.txt. what i want to know is that it's possible to use compile_command.json to activate clangd's syntax checking and highlighting without making a cmakelist.txt? And i found that the Compile DB in my Setting show that “No Compile DB Found”,but i true have a compile_commands.json in my project root.
here's my compile_commands.json and my Settings show:


Please sign in to leave a comment.
Hello!
Based on the provided screenshots, it looks like the project is, for some reason, opened as a CMake project in CLion. Please do the following:
File | Close Project
);.idea
andcmake-build-debug-armclang
subdirectories from the project;Open
on the “Welcome to CLion” screen;compile_commands.json
file and then clickOpen
;Open as Project
.After that, the project will be opened as a compilation database project in CLion.
Out of the box, CLion supports GCC-based compilers, Clang, Clang-cl, Visual Studio C++ compiler, and IAR compiler. If the compiler is not recognized by CLion, you can use the custom compiler option - https://www.jetbrains.com/help/clion/custom-compilers.html.