-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMalterlib_Core_boost.MHeader
More file actions
327 lines (304 loc) · 6.36 KB
/
Malterlib_Core_boost.MHeader
File metadata and controls
327 lines (304 loc) · 6.36 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
// Copyright © Unbroken AB
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Property
{
MalterlibBoostModulesCalcTemplate function(string _Module) [type(CEntity)] = []
MalterlibBoostModulesCalcTemplate =+ `boost_@(_Module)`
}
%Repository MalterlibBoostModules->Unique()->ForEach(&MalterlibBoostModulesCalcTemplate)
{
Repository
{
Submodule false
Type "External"
ConvertUnderscoreToPath true
Remotes =+ {Name: "upstream", URL: `https://github.com/boostorg/@(this.Identity->Replace("boost_", "")).git`}
{
!!MalterlibAddUpstreams true
}
}
}
Property
{
MalterlibAllBoostModules: bool = false // User(Repository)=true: Sync all boost repositories
MalterlibBoostModules: [string] = []
MalterlibBoostModules =+ [
"align"
, "atomic"
, "beast"
, "algorithm"
, "array"
, "asio"
, "assert"
, "assign"
, "bind"
, "chrono"
, "concept_check"
, "config"
, "container"
, "container_hash"
, "core"
, "date_time"
, "describe"
, "detail"
, "endian"
, "exception"
, "foreach"
, "function"
, "function_types"
, "functional"
, "fusion"
, "integer"
, "intrusive"
, "io"
, "iostreams"
, "iterator"
, "lexical_cast"
, "logic"
, "math"
, "move"
, "mp11"
, "mpl"
, "numeric_conversion"
, "optional"
, "phoenix"
, "predef"
, "preprocessor"
, "proto"
, "range"
, "ratio"
, "regex"
, "smart_ptr"
, "spirit"
, "static_assert"
, "system"
, "thread"
, "throw_exception"
, "tuple"
, "type_index"
, "type_traits"
, "typeof"
, "utility"
, "variant"
, "winapi"
]
{
!!MalterlibAllBoostModules true
}
}
%Group "~Automatic/Boost Include Roots"
{
Property
{
SubDirectory: string
FullPath: string
RelativePath: string
Module: string
DirectoryModules: [string] = ["chrono", "detail", "exception", "functional", "pending", "utility"]
}
Property
{
g_DSStoreName: string = ".DS_Store"
BoostRootPath: string = `../../External/boost/@(Module)/include/boost`->MakeAbsolute()
RelativeBoostPath function(string _File) string
RelativeBoostPath _File->MakeRelative(BoostRootPath)
ExpandTemplate2 function(string _File) [type(CEntity)] = []
ExpandTemplate2 += {
Name: `@(MalterlibBoostIncludeOutputDir)/boost/@(RelativeBoostPath(_File))`
, Properties: {
RelativePath: RelativeBoostPath(_File)
, FullPath: _File
}
}
{
&
{
!g_DSStoreName _File->GetFile()
|
{
!SubDirectory ""
!DirectoryModules->ContainsListElement(_File->GetFile()) true
}
}
}
GetBoostIncludePath function(string _Module) string
GetBoostIncludePath `@(`../../External/boost/@(_Module)/include`->MakeAbsolute())/boost@(SubDirectory)`
ExpandTemplateFiles function(string _Module) [type(CEntity)] = []
ExpandTemplateFiles =+ GetBoostIncludePath(_Module)->FindFilesIn('*')->ForEach(&ExpandTemplate2, {Module: _Module})
ExpandTemplateDirectories function(string _Module) [type(CEntity)] = []
ExpandTemplateDirectories =+ GetBoostIncludePath(_Module)->FindDirectoriesIn('*')->ForEach(&ExpandTemplate2, {Module: _Module})
}
GenerateFile
{
Name this.Identity
Contents FullPath
Executable false
UnixLineEnds true
UnicodeBOM true
Symlink true
SymlinkBasePath MalterlibBoostIncludeOutputDir
Group `@(Platform) @(Architecture) @(FullConfiguration)/@(RelativePath->GetPath())`
{
!!MalterlibIncludePerConfig true
}
Group RelativePath->GetPath()
{
!MalterlibIncludePerConfig true
}
}
%Group "General"
{
Property.SubDirectory ""
Compile.Type "Header"
%GenerateFile MalterlibBoostModules->ForEach(&ExpandTemplateFiles)
%GenerateFile MalterlibBoostModules->ForEach(&ExpandTemplateDirectories)
{
Compile.Type "Header"
GenerateFile.SymlinkDirectory true
}
}
%Group DirectoryModules
{
Property.SubDirectory `/@(Group:this.Identity)`
Compile.Type "Header"
%GenerateFile MalterlibBoostModules->ForEach(&ExpandTemplateFiles)
%GenerateFile MalterlibBoostModules->ForEach(&ExpandTemplateDirectories)
{
Compile.Type "Header"
GenerateFile.SymlinkDirectory true
}
}
}
Target
{
&
{
!MalterlibBoostModules undefined
MalterlibIncludeLevel "Target"
}
ExtraGroups =+ "~Automatic/Boost Include Roots"
{
!!MalterlibIncludePerConfig true
}
}
Property
{
MalterlibBoostIncludeOutputDir: string
MalterlibBoostIncludeOutputDir `@(GeneratedDirectory)BoostRootInclude`
{
&
{
MalterlibIncludeLevel "Target"
MalterlibIncludePerConfig true
}
}
MalterlibBoostIncludeOutputDir `@(GeneratedDirectoryNoConfig)BoostRootInclude`
{
&
{
MalterlibIncludeLevel "Target"
!MalterlibIncludePerConfig true
}
}
MalterlibBoostIncludeOutputDir `@(GeneratedWorkspaceDirectory)BoostRootInclude`
{
&
{
MalterlibIncludeLevel "Workspace"
MalterlibIncludePerConfig true
}
}
MalterlibBoostIncludeOutputDir `@(GeneratedWorkspaceDirectoryNoConfig)BoostRootInclude`
{
&
{
MalterlibIncludeLevel "Workspace"
!MalterlibIncludePerConfig true
}
}
}
Compile
{
&
{
CompileDialect "C"
!MalterlibBoostModules undefined
}
SystemSearchPath =+ MalterlibBoostIncludeOutputDir
}
%Group "BoostLibraries"
{
Target
{
Type "StaticLibrary"
Group "External/boost"
}
Compile
{
!!CompileDialect "C"
Warnings_NoUnused true
{
!!PlatformFamily "macOS"
!!PlatformFamily "Linux"
}
PreprocessorDefines =+ ["BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE", "_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING"]
{
!!PlatformFamily "Windows"
}
}
%Target "Lib_boost_regex"
{
!!true MalterlibBoostModules->ContainsListElement("regex")
Target
{
BaseName "boost_regex"
}
%Group "Source"
{
%File "../../External/boost/regex/src/^*.cpp"
}
}
%Target "Lib_boost_system"
{
!!true MalterlibBoostModules->ContainsListElement("system")
Target
{
BaseName "boost_system"
}
%Group "Source"
{
%File "../../External/boost/system/src/^*.cpp"
}
}
%Target "Lib_boost_thread"
{
!!true MalterlibBoostModules->ContainsListElement("thread")
Target
{
BaseName "boost_thread"
}
Compile
{
PreprocessorDefines =+ "BOOST_THREAD_BUILD_LIB"
}
%Group "thread"
{
%Group "pthread"
{
Compile.Disabled true
{
!!PlatformFamily "Windows"
}
%File "../../External/boost/thread/src/pthread/^*.cpp"
}
%Group "win32"
{
Compile.Disabled true
{
!PlatformFamily "Windows"
}
%File "../../External/boost/thread/src/win32/^*.cpp"
}
}
}
}