Skip to content

Commit

Permalink
Enable export compile commands of chip module (#37720)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bukepo authored Feb 22, 2025
1 parent f84fe08 commit a373044
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/common/cmake/chip_gn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ macro(matter_build target)
--root-target=${GN_ROOT_TARGET}
--dotfile=${GN_ROOT_TARGET}/.gn
--script-executable=${Python3_EXECUTABLE}
gen --check --fail-on-unused-args ${CMAKE_CURRENT_BINARY_DIR}
gen --check --fail-on-unused-args --add-export-compile-commands=*
${CMAKE_CURRENT_BINARY_DIR}
COMMAND ninja
COMMAND ${CMAKE_COMMAND} -E echo "Matter library build complete"
INSTALL_COMMAND ""
Expand Down

0 comments on commit a373044

Please sign in to comment.