You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
waf_old/docs/book/examples/configuration_sets/wscript

26 lines
579 B
Python

#! /usr/bin/env python
"""
The configuration set such as conf.env behave like dicts
Lists are usually stored in them, and may be shared by several
configuration sets.
For this reason, the methods append_unique, append_value
and prepend_value should be used whenever possible
"""
top = '.'
out = 'build'
def configure(ctx):
ctx.env['CFLAGS'] = ['-g']
ctx.env.CFLAGS = ['-g']
ctx.env.append_value('CXXFLAGS', ['-O2', '-g'])
ctx.env.append_unique('CFLAGS', ['-g', '-O2'])
ctx.env.prepend_value('CFLAGS', ['-O3'])
print(type(ctx.env))
print(ctx.env)
print(ctx.env.FOO)