From 9a7ca218b8422fd2d870aa32753312d3b0521bc1 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Tue, 6 Feb 2018 21:59:16 -0800 Subject: Add 'output' field to compdb output --- src/ninja.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ninja.cc b/src/ninja.cc index 30f89c2..4a31d52 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -691,6 +691,8 @@ int NinjaMain::ToolCompilationDatabase(const Options* options, int argc, char* a EncodeJSONString((*e)->EvaluateCommand().c_str()); printf("\",\n \"file\": \""); EncodeJSONString((*e)->inputs_[0]->path().c_str()); + printf("\",\n \"output\": \""); + EncodeJSONString((*e)->outputs_[0]->path().c_str()); printf("\"\n }"); first = false; -- cgit v0.12