[cmake-developers] Extracting target metadata, IDE integration

Nils Gladitz nilsgladitz at gmail.com
Mon Sep 22 05:03:06 EDT 2014


On 09/20/2014 09:57 PM, Tobias Hunger wrote:
> Hello!
>
> Sorry for breaking the threading, I only joined this ML just now to
> comment on this thread:-) Thanks Stephen for pointing me here!
>
> I am not a regular cmake user (used to be a couple of years ago), but
> I im interested in this topic since I work on Qt Creator. While cmake
> currently is not our focus, I would personally like to see better
> cmake integration into our tool. Unfortunately I do not have the time
> to work on this myself:-/
>
> I do want to provide some input to this discussion though.
>
>  From my experience we would need a bit more information than proposed
> in http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/focus=1100
>
> This is the structure suggested for each target:
>
> <snip>
>    {
>      "name": "testc1",
>      "type": "STATIC_LIBRARY",
>      "directory": "/tmp/COnly-bld",
>      "location": "/tmp/COnly-bld//libtestc1.a",
>      "exportName": "testc1",
>      "backtrace": ["/tmp/COnly-src/CMakeLists.txt:6"],
>      "installed": false
>    },
> <snip>
>
> That information will be valuable.
>
> I would love to see two additional field with information:
>
> The first is should this be run in a terminal or is this a GUI. Not
> sure whether cmake has that information.

At least on windows where there are distinct link time subsystems for 
console and gui applications the information is known; don't think it is 
available anywhere else(?)

>
> Secondly the linker flags would be nice to know. That way the
> LD_LIBRARY_PATH can be set correctly by the IDE so that all the
> libraries are found.

That might not be necessary since CMake automatically constructs build 
time RPATHs by default.

Might be nice for platforms where RPATHs aren't supported (e.g. Windows) 
though a generic, non IDE specific solution might be preferable:
 
http://public.kitware.com/pipermail/cmake-developers/2014-September/011373.html

Nils



More information about the cmake-developers mailing list