Skip to content

Instantly share code, notes, and snippets.

View LeeRuns's full-sized avatar

Lee Runyon LeeRuns

  • Fort Collins Co
View GitHub Profile
@LeeRuns
LeeRuns / cc_merge.js
Created February 5, 2021 19:41 — 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: https://gist.github.com/iauns/6276327.
#!/usr/bin/env node
var fs = require('fs');
var argv = require('optimist')
.usage('Merge multiple clang compile_commands.json into one file.')
.demand('o')
.alias('o', 'output')
.describe('o', "Output merged compile_command.json file.")
.argv;
var commands = [];