Build system (was Re: Future of KDE Development)

Alexander Neundorf neundorf at kde.org
Mon Feb 14 18:46:30 GMT 2005


On Monday 14 February 2005 17:02, Guillaume Laurent wrote:
> Stephan Kulow wrote:
> > I would like to clean up the build system majorly and surely would like
> > to finish it before KDE4. I have tons of ideas and would like to
> > basically start from scratch - what tools would we have choosen if we had
> > started now? Don't say qmake, I won't believe you. Anyway: different
> > thread, but surely a lot of work, that also includes the risk of scaring
> > people away. Answer this: what is more scary: the current build system or
> > the idea of throwing anything you know about the current build system
> > away?
>
> The current build system is *way* scarier IMHO :-).

Ok, so here comes my short cmake introduction I already posted on kde-devel. 
If there are no objections, I'll add cmake support to kfind in cvs.

cmake (http://www.cmake.org) is a cross-platform build-system. It is intended 
to be a replacement for autotools.

Here you can read a short introduction, why it was written, etc. :
http://tools.devchannel.org/devtoolschannel/03/12/15/2139255.shtml


Pros:

-portable, works natively on linux and any unix, Mac OS X, Windows and cygwin
-can create: unix Makefiles, KDevelop3 project files (since version 2.1 e.g. 
current cvs), cygwin makefiles, msvc project files, borland make files, Apple 
X Code support is planned
-extensible (without recompiling) 
-can build executables, shared libs, static libs, plugins (didn't try this 
yet)
-is written in C++ -> understandable by the average KDE developer
-is free software (GPL)
-supports configure checks in various ways
-comes already with basic KDE support (needs work)
-is actively maintained by a company (kitware inc.)
-short and comprehensible documentation: 
  http://www.cmake.org/HTML/Documentation.html
-for the ones who need more docs there's a cmake book: 
http://www.amazon.com/exec/obidos/tg/detail/-/1930934114/qid=1108406225/
sr=8-1/ref=sr_8_xs_ap_i1_xgl14/104-5191794-4231164?v=glance&s=books&n=507846
-used for several big software projects: VTK, ITK, ecos 
 ( http://www.neundorf.net/cmake/using_ecos_with_cmake.php )
-out of source builds are supported and encouraged
-supports (optionally) a GUI for adjusting build options (ccmake)
-only *one* (simple) tool to learn in order to build software, 
instead of: autoconf+automake+libtool+m4 (each of which is complicated)
-bug reporting system: http://www.cmake.org/Bug
-KDE comes with syntax highlighting for cmake files
-not a complete programming language to learn (like scons)


Cons:

-since it's written in C++ it needs to be compiled
-not very wide spread yet
-not very unixish feel, i.e. slighty strange naming conventions: the files you 
have to write (instead of makefile.am) are named "CMakeLists.txt" and all 
commands in cmake are upper case
-probably not as powerful as a full programming language (python)

Last but not least, here comes the most simple CMakeLists.txt:

#create an executable "helloworld" from the file main.cpp
ADD_EXECUTABLE(helloworld main.cpp)

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list