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/scenarios_incflags/wscript

30 lines
551 B
Python

#! /usr/bin/env python
"""
special include flags
$ waf configure clean build
"""
top = '.'
out = 'build'
def configure(conf):
conf.load('g++')
def build(bld):
bld.program(features='cxx cxxprogram', source='main.cpp', target='test')
from waflib.TaskGen import after, feature
@feature('cxx')
@after('apply_incpaths')
def insert_blddir(self):
self.env.prepend_value('INCPATHS', '.')
@feature('cxx')
@after('apply_incpaths', 'insert_blddir')
def insert_srcdir(self):
path = self.bld.srcnode.abspath()
self.env.prepend_value('INCPATHS', path)