Special python modules called Waf tools provide functions and classes to help using compilers, libraries or programs. The typical usage from a user script is:
def function(ctx): # ... ctx.load('toolname')
Where the function is usually:
The tools will usually enhance the application by adding:
As a general rule, existing methods or classes are hardly ever replaced.
The following Waf tools are used for loading specific C or C++ compilers. They may be used directly, for example:
def options(opt): opt.load('compiler_c') def configure(conf): conf.load('compiler_c')
The following modules contain the functions and classes required for building C and C++ applications. They are almost always loaded by other Waf tools. Among these, the most important from a user point of view is waflib.Tools.c_config which provides the waflib.Tools.c_config.check() and waflib.Tools.c_config.check_cfg() functions.
The first three tools in the following list may be used for detecting D compilers. The remaining contain the support functions and classes.
The first four tools in the following list are used for detecting fortran compilers. The three remaining contain the routines for compiling fortran applications.