[cmake-developers] Generating information for C++ tools in cmake (patch)
Manuel Klimek
klimek at google.com
Wed Jan 12 13:19:00 EST 2011
On Wed, Jan 12, 2011 at 10:05 AM, Brad King <brad.king at kitware.com> wrote:
> 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.
Good point.
>> 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.
I actually don't think writing out a single text file will be
noticeable in the overall generation. If I assume that I can write 60
MB/s, I'd need a code base 250 times the size of the cmake code base
before hitting 1 second. Since the cmake code base seems to be around
200k LOC C++ code, this would be a 50M LOC code base. I don't expect
one second in the generation phase to matter for such a code base.
As I said, I'm happy enough to put it behind a cache option though.
Cheers,
/Manuel
More information about the cmake-developers
mailing list