-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwscript
50 lines (44 loc) · 975 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
APPNAME = 'concurrent_revisions'
VERSION = '0.1.0'
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_cxx')
opt.load('unittest_gtest')
def configure(conf):
conf.load('compiler_cxx')
conf.load('unittest_gtest')
conf.check_cxx(lib = 'pthread')
if conf.env.CXX == ['clang++']:
conf.env.append_unique(
'CXXFLAGS',
['-std=c++0x', '-stdlib=libc++']
)
# conf.env.LINK_CXX = ['llvm-ld']
conf.env.append_unique(
'LINKFLAGS',
['-lc++', '-O2']
)
else:
conf.env.append_unique(
'CXXFLAGS',
['-std=c++0x', '-Wall', '-O2', '-g']
)
conf.env.append_unique(
'LINKFLAGS',
[]
)
def build(bld):
bld.program(
features = 'gtest',
source = 'test.cpp',
includes = '.',
target = 'test',
use = 'concurrent_revisions'
)
bld.program(
source = 'bench.cpp',
includes = '.',
target = 'parallel_sum_bench',
use = 'concurrent_revisions'
)