0

I am using waf in windows and I cannot figure out how to use the boost tool.

I tried waf update, but it says the following:

Could not find the tool in the remote repository 'update' finished successfully (0.597s)

  1. How can I use the boost tool (or any) in extras?
  2. How should I distribute my project? I saw waf-light --tools=compat15,boost and things like that.
Germán Diago
  • 7,473
  • 1
  • 36
  • 59

2 Answers2

1

1) In the Waf Book you can find different examples of this.

Under section "3.2.2. Loading and using Waf tools", you'll see that they load the tool 'dang.py' from a folder '.' by using:

def configure(ctx):
     ctx.load('dang', tooldir='.')

When it loads dang.py it will also call the 'configure' function inside it. Same goes for 'options', 'build' etc.

Another example is using the extras ("11.1.2. Build visualization"):

def configure(ctx):
    ctx.load('parallel_debug', tooldir='waf-1.7.13/waflib/extras')


2) When distributing, I always use vanilla waf, and instead provide the wscripts and tools files.

But if you do run that command line:

waf-light --tools=compat15,boost

you'll get a waf executable that has the tools built in. You can distribute that exe if I understand it correctly.

Note that you still need to load the tools as usual

ctx.load('boost')
JCash
  • 312
  • 1
  • 3
  • 10
  • Do I need to download waflib/extras separately? I took waf-1.7 and it was a single executable and I cannot find where the directory structure was uncompressed, so I cannot find the extras, and I tried what I explained above. So the book is not of much help for this. I am in the previous step: where to find these tools – Germán Diago Nov 30 '13 at 13:31
  • When you download from https://code.google.com/p/waf/downloads/list choose a package that contains source, book demos: E.g. waf-1.7.13.tar.bz2. That contains the extras folder (and everything else, even the executable). You can see its contents here too: https://code.google.com/p/waf/source/browse/ – JCash Dec 01 '13 at 09:18
  • You should add your solution as an answer, to close the question. It will also be easier for others to see your solution. – JCash Dec 02 '13 at 16:13
1

In order to use the boost tool, this is the way to go:

waf update --files=boost

That will upload the extra tool boost.

Germán Diago
  • 7,473
  • 1
  • 36
  • 59
  • 1
    You should be able to select it as the accepted answer too I think :) – JCash Dec 03 '13 at 09:09
  • this no longer works; it complains `The command "update" is dangerous; include the tool "use_config" in your project!` – Jason S Oct 06 '15 at 23:21
  • I stopped using waf long ago. If you want something industry ready: cmake. If you want to try something I really like: meson build system. If you need make-like functionality only for building: tup. tup is *impressive*. But cannot do everything that make can do. – Germán Diago Oct 07 '15 at 04:23