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

Alexander Neundorf neundorf at kde.org
Thu Jan 13 14:43:58 EST 2011


On Wednesday 12 January 2011, Manuel Klimek wrote:
...
> Yes, I agree that it is very conceivable that we'll want that in the
> future - one reason I propose a JSON format is that it is both easy to
> parse and easy to extend.

Any special reason why you choose json and not xml ?
xml is still a bit more widespread.

I have two things in mind (not short term, but mid or long term):

* have cmake write some project or buildfile which can be used as a build-tool 
independent buildfile ... well, i.e. it should contain all information to 
build the project (as makefiles do), be easily parseble (e.g. xml or json...) 
and provide enough information for IDEs, so that e.g. QtCreator could use 
this as primary project file. It should be possible that it includes not only 
the commands to compile the files, but also to link, to install, to 
preprocess only, etc. This would probably be the file you are writing now, 
but heavily extended later on.

* have cmake install some FooConfig.xml or FooConfig.json file (instead or 
additionally to FooConfig.cmake), which contains information about an 
installed package (like pkg-config), and which can be easily parsed by other 
tools (e.g. xml or json). This is only related to what you are doing now in 
that I think it should use the same markup language as that will use one day. 

I would have opted for xml, but simply because I consider it the default 
choice. I don't have a real opinion on json.

Alex



More information about the cmake-developers mailing list