[cmake-developers] Generating buildsystem metadata from CMake
Stephen Kelly
steveire at gmail.com
Sat Apr 18 05:56:47 EDT 2015
Stephen Kelly wrote:
> The aim is to generate a structured file containing metadata relating the
> buildsystem.
I've been quiet on this thread for a while, so I think it is time for an
update.
I became more ambitious in mid March and started prototyping a more-complete
design for CMake IDE integration.
Instead of teaching CMake to generate a metadata file, I want to add a
server mode to CMake, so that IDEs can run the server in the build directory
and query it for buildsystem metadata, code completion, etc. It can be
implemented efficiently and it doesn't have to re-configure the build from
the beginning each time. A lot of things become possible with such a design,
but I'm being economic with details because I don't want to make promises I
don't deliver in the end, even though I have high confidence that I actually
can :).
The good news is that I have done some proof of concept work on all aspects
of this, but I don't yet have one branch which contains all of the
individual proof of concepts combined. Doing this properly requires
refactoring CMake quite a bit, which I've already been doing for a while to
create a cmState class.
The bad news is that because this is more ambitious, it will take more time
and will not be part of the CMake 3.3 release early this summer. I do
believe it can be implemented for the following release 3 months later
though.
Here's some prior art in other tools:
http://thread.gmane.org/gmane.comp.compilers.clang.devel/21780
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html
http://thread.gmane.org/gmane.comp.lib.boost.build/26905
We can use JSON as the wire protocol, and we can talk about exactly what the
protocol will be once the refactoring of CMake is done (that will take some
more weeks). I'll post a more complete design proposal and my prototype at
that point too.
Thanks,
Steve.
More information about the cmake-developers
mailing list