[cmake-developers] Extracting target metadata, IDE integration

Aleix Pol aleixpol at kde.org
Sat Mar 7 12:05:15 EST 2015


On Fri, Aug 29, 2014 at 4:20 AM, Aleix Pol <aleixpol at kde.org> wrote:
> Dear cmake'rs,
> I'm rewriting the KDevelop plugin from scratch to fetch the information from
> the build directory.
>
> Now in the first implementation I'm using the compile_commands.json file
> that cmake already can generate for some time. It works quite well already,
> given how data just comes out ready to be consumed (almost). The problem now
> is that we're lacking some information, namely information about the
> targets, their location and such *.
>
> To that end, I wrote a little patch to be taken as a proof of concept, that
> generates (some of) the needed information. I would like to know if you
> think it's an approach that would be accepted in the cmake code-base or if I
> need to take a different approach.
>
> Patch http://proli.net/meu/kdevelop/cmake-targetsdata.patch
> Output: http://proli.net/meu/kdevelop/AwesomeTargets.json
>
> Cheers!
> Aleix
>
> * Yes, I'm aware of generators, but I'm not comfortable with the idea of
> tying a build directory to an editor (even if it's my editor). Our users
> usually build the projects with different tools and asking them to re-create
> their build only for being comfortable with KDevelop sometimes is a burden.
> It would be for me too!

I just pushed my change into a github clone for easier testing and reviewing.
https://github.com/aleixpol/CMake

Aleix


More information about the cmake-developers mailing list