From c5567ff6925eb9aca2658f702e9a310beea9ad27 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Fri, 8 Aug 2025 14:51:22 +0200 Subject: [PATCH] feat(cmakev2/idf): enable the generation of compile_commands.json Signed-off-by: Frantisek Hrbata --- tools/cmakev2/idf.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/cmakev2/idf.cmake b/tools/cmakev2/idf.cmake index 07bd1a74517..e023807edaf 100644 --- a/tools/cmakev2/idf.cmake +++ b/tools/cmakev2/idf.cmake @@ -463,6 +463,9 @@ idf_build_set_property(PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") # Set build directory property. idf_build_set_property(BUILD_DIR "${CMAKE_BINARY_DIR}") +# Enable the generation of compile_commands.json. +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # Initialize IDF_PATH and set it as a global and environmental variable, as # well as a build property. __init_idf_path()