cmake默认开启生成编译数据库

tools/cmake: Add CMAKE_EXPORT_COMPILE_COMMANDS ON

Signed-off-by: SunJ <jsun@bouffalolab.com>
This commit is contained in:
SunJ 2022-04-29 15:05:19 +08:00 committed by guo
parent c14dbe8a2e
commit 8c18ec64bd
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ def GenerateCFiles(env,project):
cm_file.write("SET(CMAKE_SYSTEM_NAME Generic)\n")
cm_file.write("SET(CMAKE_SYSTEM_PROCESSOR " + rtconfig.CPU +")\n")
cm_file.write("#SET(CMAKE_VERBOSE_MAKEFILE ON)\n\n")
cm_file.write("SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n\n")
cm_file.write("SET(CMAKE_C_COMPILER \""+ CC + "\")\n")
cm_file.write("SET(CMAKE_ASM_COMPILER \""+ AS + "\")\n")