-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathSConstruct
More file actions
71 lines (60 loc) · 1.41 KB
/
SConstruct
File metadata and controls
71 lines (60 loc) · 1.41 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import os
env = Environment(
ENV = os.environ,
CXXFLAGS= ['-g', '-Wall', '-Wextra',
'-pedantic', '-std=c++11',
'-I/usr/local/include', '-I.'],
CPPPATH='..',
LINKFLAGS=['-L/usr/local/lib'])
# allows highighting to print to terminal from compiler output
env['ENV']['TERM'] = os.environ['TERM']
progs = Split(
'''
accumulate
chain
chunked
combinations
combinations_with_replacement
compress
count
cycle
dropwhile
enumerate
filter
filterfalse
groupby
imap
permutations
powerset
product
range
repeat
reversed
slice
sliding_window
sorted
shuffled
takewhile
unique_everseen
unique_justseen
zip
iteratoriterator
iterbase
mixed
helpers
'''
)
conf = Configure(env)
# if catch isn't available, exit
if not conf.CheckCXXHeader('catch.hpp'):
print("WARNING: catch.hpp not found, run ./download_catch.sh first")
print("note: you may receive this warning if the c++ compiler specified "
"by CXX at the top of the SConstruct file is invalid.")
Exit(1)
if conf.CheckCXXHeader('boost/optional.hpp'):
progs.append('zip_longest')
env = conf.Finish()
test_sources = ['test_{}.cpp'.format(p) for p in progs]
for test_src in test_sources:
env.Program([test_src, 'test_main.cpp'])
env.Program('test_all', ['test_main.cpp'] + test_sources)