On Fri, Sep 19, 2014 at 7:44 PM, Brad King <brad.k...@kitware.com> wrote:
> 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. > Cool! Thanks a lot for taking your time to look into this! > > 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. > Sure, can't hurt. So you'd encapsulate it such as: { version: "1.0", targets: [...] } > > * 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. > I've never worked with those, but it sounds like it would make sense. What about: { version: .. configurations: { { name: "Debug", targets: [...] }, { name: "Release", targets: [...] } } } > > * Don't IDEs want to know the list of source files so they can > be used for editing? > It would probably make sense, yes. We can introduce an input field. > > 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 > Aleix
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers