-
Notifications
You must be signed in to change notification settings - Fork 0
/
sconstruct
65 lines (54 loc) · 922 Bytes
/
sconstruct
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
def glob(dirs):
files = []
for dir in dirs:
files.append(Glob(dir + "/*.cxx"))
files.append(Glob(dir + "/*.cpp"))
return files
flags = [
"-std=c++2a",
"-O3",
"-W",
"-Wall",
"-Wextra",
"-pedantic",
"-Wpedantic",
"-pedantic-errors",
"-Wunused",
"-Wwrite-strings",
"-Wzero-length-array",
"-Wconversion",
"-Wunreachable-code",
"-Wuninitialized",
"-Wold-style-cast",
"-Walloca",
"-Wparentheses",
"-Wunreachable-code-aggressive",
"-Wno-unknown-pragmas"
]
libs = [
"-lpthread",
"-lsfml-graphics",
"-lsfml-audio",
"-lsfml-network",
"-lsfml-system",
"-lsfml-window",
]
comp = [
"sfx",
"test",
]
incl = [
".",
]
env = Environment(
CXX = "clang++",
# CXX = "g++",
CXXFLAGS = flags,
CPPPATH = incl,
CPPDEFINES = [],
LIBS = libs,
LIBPATH = ".",
SCONS_CXX_STANDART="c++20",
CXXCOMSTR = "[Compiling] $TARGET",
LINKCOMSTR = "[Linking] $TARGET")
env.Program('bin/test', glob(comp))