Skip to content

Instantly share code, notes, and snippets.


Lee Runyon LeeRuns

  • Fort Collins Co
View GitHub Profile
LeeRuns / cc_merge.js
Created Feb 5, 2021 — forked from iauns/cc_merge.js
Merges multiple compilation databases (compile_commands.json -- output from CMake) into one. See this other gist for an example bash function that is responsible for compile_commands.json files and passing them into this script:
View cc_merge.js
#!/usr/bin/env node
var fs = require('fs');
var argv = require('optimist')
.usage('Merge multiple clang compile_commands.json into one file.')
.alias('o', 'output')
.describe('o', "Output merged compile_command.json file.")
var commands = [];