-
Notifications
You must be signed in to change notification settings - Fork 19
/
wscript
30 lines (24 loc) · 800 Bytes
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def options(ctx):
ctx.load('compiler_cxx')
ctx.load('unittest_gtest')
def configure(ctx):
ctx.env.CXXFLAGS += ['-O2', '-Wall', '-g', '-pipe']
ctx.load('compiler_cxx')
ctx.load('unittest_gtest')
def build(bld):
bld.program(
features = 'gtest',
source = 'iconv_test.cpp',
target = 'iconv_test',
)
bld.install_files('${PREFIX}/include', 'iconv.hpp')
def cpplint(ctx):
cpplint_args = '--filter=-runtime/references,-build/include_order --extensions=cpp,hpp'
src_dir = ctx.path.find_node('.')
files = []
for f in src_dir.ant_glob('*.cpp *.hpp'):
files.append(f.path_from(ctx.path))
args = 'cpplint %s %s 2>&1 | grep -v "^\(Done\|Total\)"' % (cpplint_args,' '.join(files))
result = ctx.exec_command(args)
if result == 0:
ctx.fatal('cpplint failed')