Skip to content

Commit a373044

Browse files
authored
Enable export compile commands of chip module (#37720)
This commit enables generating `compile_commands.json` for `chip-gn` target. Manual tested by building lighting-app/nrfconnect and check the generated compile_commands.json file.
1 parent f84fe08 commit a373044

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/common/cmake/chip_gn.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ macro(matter_build target)
133133
--root-target=${GN_ROOT_TARGET}
134134
--dotfile=${GN_ROOT_TARGET}/.gn
135135
--script-executable=${Python3_EXECUTABLE}
136-
gen --check --fail-on-unused-args ${CMAKE_CURRENT_BINARY_DIR}
136+
gen --check --fail-on-unused-args --add-export-compile-commands=*
137+
${CMAKE_CURRENT_BINARY_DIR}
137138
COMMAND ninja
138139
COMMAND ${CMAKE_COMMAND} -E echo "Matter library build complete"
139140
INSTALL_COMMAND ""

0 commit comments

Comments
 (0)