-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwscript
31 lines (23 loc) · 1.02 KB
/
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
#! /usr/bin/env python
def go(ctx):
from waflib.Options import commands, options
commands += ["configure", "build"]
def options(opt):
opt.load("compiler_c compiler_cxx waf_unit_test")
def configure(conf):
conf.load("compiler_c compiler_cxx waf_unit_test")
conf.check_cfg(package="protobuf", uselib_store="protobuf", args="--libs --cflags", mandatory=True)
conf.check_cxx(lib="snappy", uselib_store="snappy", mandatory=False, define_name="HAVE_SNAPPY")
conf.write_config_header('config.h')
def build(bld):
bld.load("compiler_c compiler_cxx waf_unit_test")
bld.stlib(source=["compressed_stream.cc", "block_wrappers.cc", "gzip_stream.cc", "lz4.cc"],
target="protobuf-zerocopy-compression",
use="protobuf snappy",
includes=".")
bld.program(source="test.cc",
target="test",
use="protobuf-zerocopy-compression protobuf snappy",
includes=".")
from waflib.Tools import waf_unit_test
bld.add_post_fun(waf_unit_test.summary)