Various configuration tests.
Task generator method
The configuration test waflib.Tools.ccroot.run_c_code() declares a unique task generator, so we need to create other task generators from here to check if the linker is able to link libraries.
Feature : | link_lib_test |
---|
Configuration Method bound to waflib.Configure.ConfigurationContext
Check if libraries can be linked with the current linker. Uses waflib.Tools.c_tests.link_lib_test_fun().
Parameters: | mode (string) – c or cxx or d |
---|
Configuration Method bound to waflib.Configure.ConfigurationContext
Check for the right value for inline macro. Define INLINE_MACRO to 1 if the define is found. If the inline macro is not ‘inline’, add a define to the config.h (#define inline __inline__)
Parameters: |
|
---|
Configuration Method bound to waflib.Configure.ConfigurationContext
Check for large file support and define the macro HAVE_LARGEFILE The test is skipped on win32 systems (DEST_BINFMT == pe).
Parameters: |
|
---|
Feature : | grep_for_endianness |
---|
Configuration Method bound to waflib.Configure.ConfigurationContext
Execute a configuration test to determine the endianness
Decorator: attach new configuration functions to waflib.Build.BuildContext and waflib.Configure.ConfigurationContext. The methods bound will accept a parameter named ‘mandatory’ to disable the configuration errors:
def configure(conf):
conf.find_program('abc', mandatory=False)
Parameters: | f (function) – method to bind |
---|
Decorator: register a task generator method that will be executed when the object attribute ‘feature’ contains the corresponding key(s):
from waflib.Task import feature
@feature('myfeature')
def myfunction(self):
print('that is my feature!')
def build(bld):
bld(features='myfeature')
Parameters: | k (list of string) – feature names |
---|
Decorator: register a task generator method which will be executed before the functions of given name(s):
from waflib.TaskGen import feature, before
@feature('myfeature')
@before_method('fun2')
def fun1(self):
print('feature 1!')
@feature('myfeature')
def fun2(self):
print('feature 2!')
def build(bld):
bld(features='myfeature')
Parameters: | k (list of string) – method names |
---|
Decorator: register a task generator method which will be executed after the functions of given name(s):
from waflib.TaskGen import feature, after
@feature('myfeature')
@after_method('fun2')
def fun1(self):
print('feature 1!')
@feature('myfeature')
def fun2(self):
print('feature 2!')
def build(bld):
bld(features='myfeature')
Parameters: | k (list of string) – method names |
---|
Features defined in this module: