11

We are looking for adequate build tool for a desktop GUI application to be written in D (using Qt toolkit), consisting of several native libraries, using 3rd party C-lib(s). It has to build on Linux (native development) and Mac as well on Windows. We might adopt Code::Blocks as IDE.

Waf already has support for D language, while CMake is just receiving it cmaked2.

CMake uses special language, while Waf is pure Python...Otoh, CMake, via CPack, can produce packages in several formats as well as GUI installer for e.g. Windoze.

Any pro/cons and what would you use?

We excluded Scons for speed reasons and autoconf, so, please, advice against CMake/waf only.

Update: Although not received any reply here, we were researching in other places, did some reading & testing and decided to use Waf (1.6. release is just around the corner).

gour
  • 967
  • 9
  • 22

2 Answers2

9

Waf is very fast and has been chosen as the build system for Samba (http://samba.org/). It is also used by many proprietary projects because it lets you do crazy things that are impossible in Make/CMake.

user476695
  • 91
  • 1
  • 5
    What kinds of crazy things? Good crazy, or bad kludgy crazy? – DarenW Dec 22 '10 at 17:05
  • 2
    waf provides you with the power of python, docs are great, and a bunch of usecases exist for the common tasks (e.g. glib/gtk bindings and alike) I'd go for it anytime, and it's lightning fast – drahnr Jun 15 '12 at 15:29
5

I would/do use CMake

I've seen CMake used in many more places than Waf. Most importantly the KDE project is now using CMake.

I did some research on google code search:
there are 2,097 wscript files in various opensource projects
compared to 36,914 CMakeLists.txt.

So CMake is definitely more popular.

I also tried to use google trends to see which was gaining more traction CMake or Waf. I wasn't succesful as Waf is too general at term (ie Wife Acceptance Factor), and "Waf build" doesn't show up in google trends at all.

Scons is known to have terrible performance issues. As Waf is a Scons derived I worry about its performance.

Lastly, CMake has terrible syntax and Waf has beautiful syntax. Since you're going with D it looks like you're willing to go off the beaten path for superior tools. In that case Waf may be the perfect fit.

Community
  • 1
  • 1
deft_code
  • 57,255
  • 29
  • 141
  • 224
  • 5
    As far as performance, have you seen this benchmark: http://tinyurl.com/9chgax ? Yes, I prefer nice tools and investing time in brushing my python skills instead of learning obscure scripting language. – gour Oct 15 '10 at 06:08
  • Those benchmarks are really informative. It makes we wish CMake had a bjam generator. – deft_code Oct 15 '10 at 16:37
  • I've used waf for several projects, and in my experience it is very fast. – Lstor Dec 19 '11 at 13:36
  • @gour CMake has a macro language not a scripting language. – Alex Bitek Jan 07 '14 at 15:03
  • @9emE0iL18gxCqLT "CMake has its own basic scripting language..." (http://www.cmake.org/Wiki/CMake/Language_Syntax) ;) – gour Jan 08 '14 at 16:44