You are viewing hughsient

Technical Blog of Richard Hughes - Building GNOME with cmake

Richard Hughes
Date: 2007-01-05 16:07
Subject: Building GNOME with cmake
Security: Public
Okay, after my last post where I discussed waf, I've been pointed to cmake. This is what KDE4 will use, and is meant to be better than automake.

I'll cut to my personal conclusions:
  • cmake would need lots of GNOME-specific extra modules written (for instance gnome-doc-utils) and POTFILES support.
  • cmake is fast to configure and build and has pretty output
  • cmake syntax is much more concise and easy to learn than m4
  • It's not obvious how you enable make dist or make check, although I'm new to all this
  • cmake has an optional gui based (easier to use in my opinion) configuration system.
  • Lots of useful modules have already been written, for example pkg_check_modules
  • Executing stuff like "libtool --mode=execute dbus-binding-tool" is quite difficult, although this should probably be wrapped up and abstracted in a module.
  • There are not that many standards in cmake, for example do you include directories before or after you've checked for dependencies? There would need to be GNOME guidelines on this sort of stuff.
  • The supplied examples are really simple, which don't help much.
  • It's a single system-wide install leaving single CMakeLists.txt in each directory. Very clean.
  • It's an established product with many people supporting it.
I have done some testing with gnome-power-manager and found it to be stable, and fast - although it does require you practically re-writing how the build is done.

So, anybody had any good or bad experiences with cmake? Thanks.
Post A Comment | 7 Comments | Add to Memories | Share | Link



User: (Anonymous)
Date: 2007-01-05 16:53 (UTC)
Subject: scons
In my company, we were looking for an automake replacement and after several investigations (cons, cmake...) we have found a great tool in scons.

http://www.scons.org/

Try it and you will understand why this tool is awesome.
Reply | Thread | Link



Richard Hughes
User: hughsient
Date: 2007-01-05 17:10 (UTC)
Subject: Re: scons
Yes, I agree scons is great for building small projects, but is not a suitable automake replacement. It just hasn't got the infrastructure support. I played with scons seriously for gnome-power-manager a year or so ago, and it wasn't suitable. Maybe I'll have to re-evaluate it today.
Reply | Parent | Thread | Link



User: didzej1
Date: 2007-01-05 17:33 (UTC)
Subject: an example
Keyword:pic#30270810
Just ask the developers of Scribus :) For me as a packager it helped with many autohell issues like inproper linking, etc. which strangely didn't want to work in PLD Linux....
Reply | Thread | Link



User: whoffmanny
Date: 2007-01-09 20:34 (UTC)
Subject: Help from CMake developers
Hi,

I found your blog, I am one of the principal developers of CMake, I am of course interested in GNOME using CMake. If you need any help you can find me on the cmake mailing list.

-Bill Hoffman
Reply | Thread | Link



Richard Hughes
User: hughsient
Date: 2007-01-13 17:20 (UTC)
Subject: Re: Help from CMake developers
Will do, many thanks.
Reply | Parent | Thread | Link



User: (Anonymous)
Date: 2007-01-12 20:47 (UTC)
Subject: The need of change
I think that the autotools systems are TOO ANCIENT! I am a .NET developer interested in switching and contributing into open source and I hope that CMake gets adopted! Because autotools is so hard to learn and mantain... :(
Reply | Thread | Link



User: trondd
Date: 2007-01-28 14:18 (UTC)
Subject: CMakeLists.txt for gnome-power-manager
Is the CMakeLists.txt file for gnome-power-manager available for the general public?
Reply | Thread | Link



browse
my journal
April 2008