#! /usr/bin/env python """ This wscript demonstrates the use of bld.add_group to schedule tasks into totally separate groups. This is useful when building a compiler later used for building other things See also: http://code.google.com/p/waf/wiki/TaskSystem """ srcdir = '.' blddir = 'out' def set_options(opt): opt.tool_options('g++') def configure(conf): conf.check_tool('g++') def build(bld): # without the 'add_group' line, both a.cpp and c.cpp are compiled and # then both were linked at the same time # a.cpp is compiled and linked before c.cpp is even compiled bld( features = 'cxx cprogram', source = 'a.cpp', target = 'AA') bld.add_group('sep') # <- acts like a separator bld( features = 'cxx cprogram', source = 'c.cpp', target = 'CC')