Boost logo

Boost-Build :

Subject: Re: [Boost-build] [RFC] output events
From: Jürgen Hunold (jhunold_at_[hidden])
Date: 2015-02-18 11:21:08


HI Volodya

Am Mittwoch, 18. Februar 2015, 13:20:44 schrieb Vladimir Prus:
> Hi,
>
> I've checked in, on a branch, a patch that makes Python port emit
> JSON-formatted message describing what is being built, like so:
>
> {"properties":
>
> {"output": "app/app.cpp: In function \u2018int
> main()\u2019:\napp/app.cpp:14:9: warning: unused variable \u2018x\u2019
> [-Wunused-variable]\n int x;\n ^\n", "token": 140050619569144,
> "type": "event", "event": "build-action-output", "stream": 0}
>
> {"exit-status": 0, "token": 140050619569144, "type": "event", "event":
> "build-action-finished"}
>
> The ultimate goal of this is to make it more easy for an IDE to see what's
> happening - in particular, some time ago Mateusz was asking for a way to
> discover include paths that Boost.Build uses, and there was no good answer.

Cool. This might be the way to improve IDE support (like QtCreator) but is
useless (at least for me) as long as the Python port is not complete.

> The patch is at:
>
> https://github.com/boostorg/build/commit/f7aaa9539ff5cb2577916f5bbe0d9609e1
> 01f854

Noted. Though don't know if I'll find the time to test this thoroughly.

> It's not final, but I though that before I get too carried away, I'd give
> everybody a chance to comment.

It might be a bit too verbose. All I currently need would be support for
"compile_commands.json" as generated by cmake using the old b2.
Rationale: the clang tools (clang static analyser,...) can work directly on
this file.
Right now I use Bear (https://github.com/rizsotto/Bear) for intercepting
Boost.Build and getting the commands. The page has a bit more information on
compile_commands.json, too.

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold  ! 
* voice: ++49 4257 300       ! Fährstraße 1
* fax  : ++49 4257 300       ! 31609 Balge/Sebbenhausen
* jhunold_at_gmx.eu             ! Germany

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk