2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00
waf/docs/sphinx/confmap_example.txt

23 lines
513 B
Plaintext
Raw Normal View History

2011-09-10 11:13:51 +02:00
The configuration methods `@conf` are bound to the configuration context, and to the build context::
@waflib.Configure.conf
def find_program(ctx):
pass
def configure(conf):
conf.find_program(...)
The object `conf.env` is usually modified during the execution. If several methods have to be called, then
a transaction should be used, for example::
def configure(conf):
conf.env.stash()
try:
conf.find_program('strip')
conf.env.append_value('CFLAGS', '-O3')
finally:
conf.env.revert()