[cmake-developers] Extracting target metadata, IDE integration
Brad King
brad.king at kitware.com
Fri Sep 19 13:44:45 EDT 2014
On 09/18/2014 08:10 PM, Aleix Pol wrote:
> I added a CMAKE_OUTPUT_PROJECT_TARGETS variable that can be used to
> enable the generation of the file.
> I also renamed the file to ProjectTargets.json.
>
> http://www.proli.net/meu/kdevelop/cmake-targetsdata.patch
Thanks. I made some style updates and converted it to a patch
generated with 'git format-patch'. See attached. I also
attached a sample ProjectTargets.json generated for the "COnly"
test from our test suite.
I'd really like to hear from others on the file format itself.
Some comments on the format:
* A version number field is needed at the top.
* There needs to be support for multi-config generators.
Perhaps everything that can be affected by the configuration
needs to be inside a list that enumerates all configurations.
In single-configuration generators the list would have only
one entry for the CMAKE_BUILD_TYPE. In multi-configuration
generators it would be all of the CMAKE_CONFIGURATION_TYPES.
* Don't IDEs want to know the list of source files so they can
be used for editing?
I haven't looked at what the Extra generators produce in a
while but since they are meant for IDEs they would be a good
reference for the information needed. However, AFAIK there
is not an extra generator for a multi-config generator.
-Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cmake-Add-option-to-generate-target-metadata-for-IDE.patch
Type: text/x-diff
Size: 4887 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140919/e4117351/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProjectTargets.json
Type: application/json
Size: 1001 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140919/e4117351/attachment-0002.json>
More information about the cmake-developers
mailing list