From: Angus Gratton Date: Fri, 9 Feb 2018 08:35:35 +0000 (+0800) Subject: cmake: Export compile_commands.json as part of build X-Git-Tag: v3.1-rc2~9^2~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04a944598f244b7a3cc743c790a20b9dd4ca5b7c;p=esp-idf cmake: Export compile_commands.json as part of build --- diff --git a/tools/cmake/idf_functions.cmake b/tools/cmake/idf_functions.cmake index c6ecd5ed5e..458425f335 100644 --- a/tools/cmake/idf_functions.cmake +++ b/tools/cmake/idf_functions.cmake @@ -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