Boost logo

Boost-Build :

Subject: Re: [Boost-build] [RFC] output events
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-02-18 14:09:22


Hi Jürgen,

On 02/18/2015 07:21 PM, Jürgen Hunold wrote:
> 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.

Yep, perfectly understandable - it's just right now, my goal is to improve
IDE integration on smaller projects, depth-first approach. I hope to get back
to wider compatibility after that.

>> 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.

It's interesting, and I suppose I can eventually output similar. However, for
integration with Eclipse CDT, we actually need build properties such as include
and define, since CDT does its own parsing of source files.

- Volodya

-- 
Vladimir Prus
http://vladimirprus.com

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