From 04a944598f244b7a3cc743c790a20b9dd4ca5b7c Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Fri, 9 Feb 2018 16:35:35 +0800 Subject: [PATCH] cmake: Export compile_commands.json as part of build --- tools/cmake/idf_functions.cmake | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.40.0