summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunJ <[email protected]>2022-04-29 15:05:19 +0800
committerguo <[email protected]>2022-05-10 10:13:20 +0800
commit8c18ec64bda97ad30c36f1bcb974401f317b4d35 (patch)
tree9d3ee1ac18ec831e3e3c575324e9e6b523917585
parentc14dbe8a2eda81ef0da10bb6c2a725b328cd431a (diff)
cmake默认开启生成编译数据库
tools/cmake: Add CMAKE_EXPORT_COMPILE_COMMANDS ON Signed-off-by: SunJ <[email protected]>
-rw-r--r--tools/cmake.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/cmake.py b/tools/cmake.py
index eb89067914..2129c2d612 100644
--- a/tools/cmake.py
+++ b/tools/cmake.py
@@ -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")