Skip to content

Instantly share code, notes, and snippets.

@qlibp
Forked from AlexisTM/merge.sh
Created May 31, 2023 01:20
Show Gist options
  • Save qlibp/af46fefb81dcc43a4bcb76cbc0413858 to your computer and use it in GitHub Desktop.
Save qlibp/af46fefb81dcc43a4bcb76cbc0413858 to your computer and use it in GitHub Desktop.
Merge multiple compile_commands.json
# This is to be used with catkin_make or catkin_tools if we want to merge compile_commands.txt in a single file to allow some tools to work such as Sourcetail.
sudo apt install jq
jq -s 'map(.[])' PATH_TO_COMPILE_COMMANDS_ROOT/**/compile_commands.json > compile_commands.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment