[cmake-developers] cmake -E capabilities

Tobias Hunger Tobias.Hunger at qt.io
Thu Jun 30 09:51:57 EDT 2016


Hello CMake Developers!

As laid out in the last mail thread about daemon-mode in CMake (for your
reference: http://public.kitware.com/pipermail/cmake-developers/2016-June/028777
.html ), Stephen and me agreed that we needed a way for IDEs to figure out which
generators are available to cmake and more static information built into CMake.

There is actually a bug report about the need for this feature here:
https://gitlab.kitware.com/cmake/cmake/issues/15462

This is my attempt to solve the issue:
https://github.com/hunger/CMake/commits/cmake-capabilities

The output looks like this:
> cmake -E capabilities --pretty-print
{
   "generators" : [
      {
         "extraGenerators" : [],
         "name" : "Watcom WMake",
         "toolSetSupport" : false
      },
      {
         "extraGenerators" : [ "CodeBlocks", "CodeLite", "Eclipse CDT4", "Kate",
"Sublime Text 2" ],
         "name" : "Ninja",
         "toolSetSupport" : false
      },
      {
         "extraGenerators" : [
            "CodeBlocks",
            "CodeLite",
            "Eclipse CDT4",
            "KDevelop3",
            "Kate",
            "Sublime Text 2"
         ],
         "name" : "Unix Makefiles",
         "toolSetSupport" : false
      }
   ],
   "server-mode" : false,
   "version" : {
      "major" : 3,
      "minor" : 6,
      "patch" : 20160630,
      "string" : "3.6.20160630-g2c759-dirty"
   }
}

This is running on my Linux machine.

What do you think? What else should we report here?

Compared to the bug report mentioned above the fields "multiconfig" and
"recursive" are missing. I could not figure out how to get that information:-/

I could also not yet figure out a way to retrieve information on supported
platforms and toolsets. At least I did get whether a generator supports
toolsets, but nothing similar seems to exist for the platform part.

Does anyone have an idea how I could retrieve this information?

I would also welcome some code review on the patch. The remaining items on my
server-mode todo list are all about removing similar information from the
server-mode commands:-)

Best Regards,
Tobias

-- 
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B


More information about the cmake-developers mailing list