]> granicus.if.org Git - esp-idf/commitdiff
cmake: Export compile_commands.json as part of build
authorAngus Gratton <angus@espressif.com>
Fri, 9 Feb 2018 08:35:35 +0000 (16:35 +0800)
committerAngus Gratton <gus@projectgus.com>
Sun, 29 Apr 2018 23:59:20 +0000 (09:59 +1000)
tools/cmake/idf_functions.cmake

index c6ecd5ed5e05a93dd37b28e0bd1269266414bb58..458425f335fc650573d0ce35a74bf815b5b74999 100644 (file)
@@ -28,6 +28,8 @@ macro(idf_set_global_variables)
   # path to idf.py tool
   set(IDFTOOL ${PYTHON} "${IDF_PATH}/tools/idf.py")
 
+  # generate compile_commands.json
+  set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
 endmacro()
 
 # Add all the IDF global compiler & preprocessor options