This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCSTUDIO:如何为 clang-tidy 导出 compile_commands.json

Guru**** 1999175 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1455957/ccstudio-how-to-export-compile_commands-json-for-clang-tidy

器件型号:CCSTUDIO

工具与软件:

您好!

我想通过  clang-tidy 执行代码检查,但 clang-tidy 需要一个数据库文件"compile_commands.json"。

可通过"cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON path/to/llvm/source"生成 cmake 项目

 可以通过" ninja -C out/D -t compdb cc cxx objc objcxx > compile_commands.json"

I want to hnow CCS project how to generate compile_commands.json.

thanks!