[CMake] XML CMake ?

David Somers dsomers at trevezel.com
Sun Feb 27 10:21:39 EST 2005


Hi Jurgen,

> Well one of my arguments was that it would be nice that it is parsable
> and better readable.

Hmmm. I'm not sure that XML would be better readable. Too many angle
brackets getting in the way :-) For example,

compare:

SET(CXREF_SRCS
comment.c
cxref.c
)

With

<SET var="CXREF_SRCS">
	<FILE>comment.c</FILE>
	<FILE>cxref.c</FILE>
</SET>

Which is easier to read/understand?

> There are tons of standard XML parsers out there,
> and it would be nice if it would allow (future) config tools to parse
> and present the CMake scripts more visual where the user can add e.g.
> project properties in a GUI. With the current language, parsing becomes
> more difficult and less transparent.

I think one of the problems with development is the separation (or rather
decoupling) of project management and build management.

In an ideal world, there would be a unified project configuration file that
could be used by an IDE for its  project-oriented view, and by the build
system to do the building.

At present, there is the situation that CMake is generating project-oriented
files for KDevelop/XCode/VS, but this is a one-way street... no
changes/updates can be made in these IDE's... the CMake files need to be
changed/updated and the project files re-generated. This isn't a bad thing,
since it means CMake effectively holds meta-build information which is then
used to generate builds on different platforms/IDEs (which is actually one
of the reasons I'm using CMake: I do multi-platform development).

Now, if, for example, CMake could not only generate KDevelop project files,
but KDevelop itself could modify/generate CMake files, that bit of
round-trip engineering would be quite nice to see.

> I am not banging on the language being horrid, it isn't THAT bad .. but
> XML just seems to be a nice addition.

Sure, its not that bad. Believe me when I say I've seen a lot worse.

However, I've yet to see a programming language encoded in XML that didn't
look completely silly.

> Ohh by the way, greetings from a snow covered Holland (although it is
> already melting here ;-)

I though the snow missed your guys up there? We had a bit more snowfall
today, and now the sky is a perfect clear bue, the ground is covered in
snow, and its currently -2 and dropping. Wonderful.

Greetings from frozen and snow-covered Luxembourg,

David




More information about the CMake mailing list