[CMake] Parsing XML from CMAke

Tyler Roscoe tyler at cryptio.net
Tue Sep 29 10:58:05 EDT 2009


On Tue, Sep 29, 2009 at 11:10:29AM +0200, Martin Guillon wrote:
> IN our project we currently use ini file for configuration and so i read them from CMake.
> I am thinking about using XML because it allows me a lot more things.
> SO i was wondering if i could parse XML files from CMake ?

What kind of configuration are you reading from these ini files with
CMake?

AFAIK CMake has no native xml support. You could probably hack something
together but if you're reading CMake configuration data, I would store
that in a format that is as friendly as possible for CMake. Thus, I
would choose to use a CMake script. Something like:

set (var1 "value1")
set (var2 "value2")
...

It's really the same as XML, just with different syntax :).

tyler


More information about the CMake mailing list