[cmake-developers] Generating information for C++ tools in cmake (patch)

Brad King brad.king at kitware.com
Wed Jan 12 13:05:26 EST 2011


On 1/12/2011 12:52 PM, Manuel Klimek wrote:
> Exporting the information in a defined way into the script language
> would be an option, too.

Typically build rules depend on the configuration (Debug, Release).
For Makefile generators there is only one configuration, but for
Xcode and VS IDE generators several configurations are written to
the build system for selection at build time.  Also, since the
functionality we're discussion will work only for Makefile generators
I don't think it makes sense to add an API in the CMake language
for this.  It is also better if the analysis tools can work on
projects whose CMake code was not specifically written to support
them.

> one reason I propose a JSON format is that it is both easy to
> parse and easy to extend.

Okay.

> It is actually a matter of writing one extra file globally

That makes sense.  One more concern is that the size of this file
will grow linearly with the size of the rest of the build system.
Writing it could add noticeable overhead during normal generation.
It is simple enough to enable with a cache option added on the
command line though.

-Brad



More information about the cmake-developers mailing list