@@ -3,6 +3,7 @@ import os
3
3
4
4
Import ("env" )
5
5
6
+
6
7
def build_lexy (env ):
7
8
env .Append (CPPDEFINES = ["LEXY_HAS_UNICODE_DATABASE=1" ])
8
9
lexy_env = env .Clone ()
@@ -17,13 +18,19 @@ def build_lexy(env):
17
18
else :
18
19
lexy_env .Append (CXXFLAGS = ["-std=c++20" ])
19
20
20
- lexy_env .Append (CXXFLAGS = ["-pedantic-errors" , "-Werror" , "-Wall" , "-Wextra" , "-Wconversion" , "-Wsign-conversion" ])
21
+ lexy_env .Append (
22
+ CXXFLAGS = ["-pedantic-errors" , "-Werror" , "-Wall" , "-Wextra" , "-Wconversion" , "-Wsign-conversion" ]
23
+ )
21
24
if lexy_env ["CXX" ] == "clang++" :
22
25
lexy_env .Append (CXXFLAGS = ["-Wno-shift-op-parentheses" , "-Wno-parentheses-equality" ])
23
26
else :
24
- lexy_env .Append (CXXFLAGS = [
25
- "-Wno-parentheses" , "-Wno-unused-local-typedefs" , "-Wno-array-bounds" #, "-Wno-maybe-uninitialized", "-Wno-restrict"
26
- ])
27
+ lexy_env .Append (
28
+ CXXFLAGS = [
29
+ "-Wno-parentheses" ,
30
+ "-Wno-unused-local-typedefs" ,
31
+ "-Wno-array-bounds" , # , "-Wno-maybe-uninitialized", "-Wno-restrict"
32
+ ]
33
+ )
27
34
28
35
include_path = "lexy/include"
29
36
source_path = "lexy/src"
@@ -46,6 +53,7 @@ def build_lexy(env):
46
53
env .Append (LIBPATH = [source_dir ])
47
54
env .Prepend (LIBS = [library_name ])
48
55
56
+
49
57
def build_dryad (env ):
50
58
include_path = "dryad/include"
51
59
include_dir = env .Dir (include_path )
@@ -59,6 +67,7 @@ def build_dryad(env):
59
67
60
68
env .exposed_includes += env .dryad ["INCPATH" ]
61
69
70
+
62
71
def build_fmt (env ):
63
72
fmt_env = env .Clone ()
64
73
@@ -70,26 +79,43 @@ def build_fmt(env):
70
79
else :
71
80
fmt_env .Append (CXXFLAGS = ["-std=c++20" ])
72
81
73
- fmt_env .Append (CXXFLAGS = [
74
- "-Werror" , "-Wall" , "-Wextra" , "-pedantic" , "-Wconversion" , "-Wundef"
75
- ])
82
+ fmt_env .Append (CXXFLAGS = ["-Werror" , "-Wall" , "-Wextra" , "-pedantic" , "-Wconversion" , "-Wundef" ])
76
83
if fmt_env ["CXX" ] == "clang++" :
77
- fmt_env .Append (CXXFLAGS = [
78
- "-Wweak-vtables" , "-Wshadow" ,
79
- "-Wno-gnu-zero-variadic-macro-arguments"
80
- ])
84
+ fmt_env .Append (CXXFLAGS = ["-Wweak-vtables" , "-Wshadow" , "-Wno-gnu-zero-variadic-macro-arguments" ])
81
85
else :
82
- fmt_env .Append (CXXFLAGS = [
83
- "-Wold-style-cast" , "-Wundef" , "-Wredundant-decls" , "-Wwrite-strings" ,
84
- "-Wpointer-arith" , "-Wcast-qual" , "-Wformat=2" ,
85
- "-Wmissing-include-dirs" , "-Wcast-align" , "-Wctor-dtor-privacy" ,
86
- "-Wdisabled-optimization" , "-Winvalid-pch" , "-Woverloaded-virtual" ,
87
- "-Wconversion" , "-Wundef" , "-Wno-ctor-dtor-privacy" , "-Wno-format-nonliteral" ,
88
- "-Wno-dangling-else" , "-Wno-unused-local-typedefs" , "-Wdouble-promotion" ,
89
- "-Wtrampolines" , "-Wzero-as-null-pointer-constant" , "-Wuseless-cast" ,
90
- "-Wvector-operation-performance" , "-Wsized-deallocation" , "-Wshadow" ,
91
- "-Wshift-overflow=2" , "-Wnull-dereference" , "-Wduplicated-cond"
92
- ])
86
+ fmt_env .Append (
87
+ CXXFLAGS = [
88
+ "-Wold-style-cast" ,
89
+ "-Wundef" ,
90
+ "-Wredundant-decls" ,
91
+ "-Wwrite-strings" ,
92
+ "-Wpointer-arith" ,
93
+ "-Wcast-qual" ,
94
+ "-Wformat=2" ,
95
+ "-Wmissing-include-dirs" ,
96
+ "-Wcast-align" ,
97
+ "-Wctor-dtor-privacy" ,
98
+ "-Wdisabled-optimization" ,
99
+ "-Winvalid-pch" ,
100
+ "-Woverloaded-virtual" ,
101
+ "-Wconversion" ,
102
+ "-Wundef" ,
103
+ "-Wno-ctor-dtor-privacy" ,
104
+ "-Wno-format-nonliteral" ,
105
+ "-Wno-dangling-else" ,
106
+ "-Wno-unused-local-typedefs" ,
107
+ "-Wdouble-promotion" ,
108
+ "-Wtrampolines" ,
109
+ "-Wzero-as-null-pointer-constant" ,
110
+ "-Wuseless-cast" ,
111
+ "-Wvector-operation-performance" ,
112
+ "-Wsized-deallocation" ,
113
+ "-Wshadow" ,
114
+ "-Wshift-overflow=2" ,
115
+ "-Wnull-dereference" ,
116
+ "-Wduplicated-cond" ,
117
+ ]
118
+ )
93
119
94
120
include_path = "fmt/include"
95
121
source_path = "fmt/src"
@@ -103,7 +129,6 @@ def build_fmt(env):
103
129
Default (library )
104
130
105
131
include_dir = fmt_env .Dir (include_path )
106
- source_dir = fmt_env .Dir (source_path )
107
132
108
133
env .fmt = {}
109
134
env .fmt ["INCPATH" ] = [include_dir ]
@@ -119,6 +144,7 @@ def build_fmt(env):
119
144
120
145
env .exposed_includes += env .fmt ["INCPATH" ]
121
146
147
+
122
148
def build_range_v3 (env ):
123
149
include_path = "range-v3/include"
124
150
sources = env .GlobRecursive ("*.cpp" , [include_path ])
@@ -137,6 +163,7 @@ def build_range_v3(env):
137
163
138
164
env .exposed_includes += env .range_v3 ["INCPATH" ]
139
165
166
+
140
167
def build_vmcontainer (env ):
141
168
vmcontainer_env = env .Clone ()
142
169
@@ -167,8 +194,9 @@ def build_vmcontainer(env):
167
194
168
195
env .exposed_includes += env .vmcontainer ["INCPATH" ]
169
196
197
+
170
198
build_dryad (env )
171
199
build_fmt (env )
172
200
build_lexy (env )
173
201
build_range_v3 (env )
174
- build_vmcontainer (env )
202
+ build_vmcontainer (env )
0 commit comments