-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathxmake.lua
More file actions
192 lines (126 loc) · 5.04 KB
/
xmake.lua
File metadata and controls
192 lines (126 loc) · 5.04 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
-- Reference solutions for cpp11 chapter exercises.
-- Each target name mirrors dslings/cpp11/<NN-feat-K> with a "-ref" suffix.
-- Used by CI to verify exercise infrastructure (xmake target / include paths /
-- language standard) and that the canonical answer actually passes all
-- d2x_assert / d2x_assert_eq checks.
if is_host("windows") then
set_languages("cxx14")
else
set_languages("cxx11")
end
-- target: cpp11-00-auto-and-decltype
target("cpp11-00-auto-and-decltype-0-ref")
add_files("00-auto-and-decltype-0.cpp")
target("cpp11-00-auto-and-decltype-1-ref")
add_files("00-auto-and-decltype-1.cpp")
target("cpp11-00-auto-and-decltype-2-ref")
add_files("00-auto-and-decltype-2.cpp")
target("cpp11-00-auto-and-decltype-3-ref")
add_files("00-auto-and-decltype-3.cpp")
target("cpp11-00-auto-and-decltype-4-ref")
add_files("00-auto-and-decltype-4.cpp")
-- target: cpp11-01-default-and-delete
target("cpp11-01-default-and-delete-0-ref")
add_files("01-default-and-delete-0.cpp")
target("cpp11-01-default-and-delete-1-ref")
add_files("01-default-and-delete-1.cpp")
target("cpp11-01-default-and-delete-2-ref")
add_files("01-default-and-delete-2.cpp")
-- target: cpp11-02-final-and-override
target("cpp11-02-final-and-override-0-ref")
add_files("02-final-and-override-0.cpp")
target("cpp11-02-final-and-override-1-ref")
add_files("02-final-and-override-1.cpp")
target("cpp11-02-final-and-override-2-ref")
add_files("02-final-and-override-2.cpp")
-- target: cpp11-03-trailing-return-type
target("cpp11-03-trailing-return-type-ref")
add_files("03-trailing-return-type.cpp")
-- target: cpp11-04-rvalue-references
target("cpp11-04-rvalue-references-ref")
set_optimize("none")
add_cxxflags("-fno-elide-constructors")
add_files("04-rvalue-references.cpp")
-- target: cpp11-05-move-semantics
target("cpp11-05-move-semantics-0-ref")
add_files("05-move-semantics-0.cpp")
target("cpp11-05-move-semantics-1-ref")
add_files("05-move-semantics-1.cpp")
target("cpp11-05-move-semantics-2-ref")
add_files("05-move-semantics-2.cpp")
-- target: cpp11-06-scoped-enums
target("cpp11-06-scoped-enums-0-ref")
add_files("06-scoped-enums-0.cpp")
target("cpp11-06-scoped-enums-1-ref")
add_files("06-scoped-enums-1.cpp")
-- target: cpp11-07-constexpr
target("cpp11-07-constexpr-0-ref")
add_cxxflags("-Wpedantic -Werror")
add_files("07-constexpr-0.cpp")
target("cpp11-07-constexpr-1-ref")
add_files("07-constexpr-1.cpp")
-- target: cpp11-08-literal-type
target("cpp11-08-literal-type-0-ref")
set_languages("c++17") -- TODO: optimize it
add_files("08-literal-type-0.cpp")
target("cpp11-08-literal-type-1-ref")
add_files("08-literal-type-1.cpp")
-- target: cpp11-09-list-initialization
target("cpp11-09-list-initialization-0-ref")
add_files("09-list-initialization-0.cpp")
target("cpp11-09-list-initialization-1-ref")
add_files("09-list-initialization-1.cpp")
target("cpp11-09-list-initialization-2-ref")
add_files("09-list-initialization-2.cpp")
target("cpp11-09-list-initialization-3-ref")
add_files("09-list-initialization-3.cpp")
-- target: cpp11-10-delegating-constructors
target("cpp11-10-delegating-constructors-0-ref")
add_files("10-delegating-constructors-0.cpp")
target("cpp11-10-delegating-constructors-1-ref")
add_files("10-delegating-constructors-1.cpp")
-- target: cpp11-11-inherited-constructors
target("cpp11-11-inherited-constructors-0-ref")
add_files("11-inherited-constructors-0.cpp")
target("cpp11-11-inherited-constructors-1-ref")
add_files("11-inherited-constructors-1.cpp")
target("cpp11-11-inherited-constructors-2-ref")
add_files("11-inherited-constructors-2.cpp")
-- target: cpp11-12-nullptr
target("cpp11-12-nullptr-0-ref")
add_files("12-nullptr-0.cpp")
target("cpp11-12-nullptr-1-ref")
add_files("12-nullptr-1.cpp")
target("cpp11-12-nullptr-2-ref")
add_files("12-nullptr-2.cpp")
-- target: cpp11-13-long-long
target("cpp11-13-long-long-0-ref")
add_files("13-long-long-0.cpp")
target("cpp11-13-long-long-1-ref")
add_files("13-long-long-1.cpp")
-- target: cpp11-14-type-alias
target("cpp11-14-type-alias-0-ref")
add_files("14-type-alias-0.cpp")
target("cpp11-14-type-alias-1-ref")
add_files("14-type-alias-1.cpp")
target("cpp11-14-type-alias-2-ref")
add_files("14-type-alias-2.cpp")
target("cpp11-14-type-alias-3-ref")
add_files("14-type-alias-3.cpp")
-- target: cpp11-15-variadic-templates
target("cpp11-15-variadic-templates-0-ref")
add_files("15-variadic-templates-0.cpp")
target("cpp11-15-variadic-templates-1-ref")
add_files("15-variadic-templates-1.cpp")
-- target: cpp11-16-generalized-unions
target("cpp11-16-generalized-unions-0-ref")
add_files("16-generalized-unions-0.cpp")
target("cpp11-16-generalized-unions-1-ref")
add_files("16-generalized-unions-1.cpp")
-- target: cpp11-17-pod-type
target("cpp11-17-pod-type-0-ref")
add_files("17-pod-type-0.cpp")
target("cpp11-17-pod-type-1-ref")
add_files("17-pod-type-1.cpp")
target("cpp11-17-pod-type-2-ref")
add_files("17-pod-type-2.cpp")