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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
source_root_replacer = "${PROJECT_SOURCE_DIR}"
binary_root_replacer = "${PROJECT_BINARY_DIR}"
[platforms]
linux="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND NOT HAVE_CUDA"
linux-x86_64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND NOT HAVE_CUDA"
linux-x86_64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND HAVE_CUDA"
linux-aarch64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND NOT HAVE_CUDA"
linux-arm64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND NOT HAVE_CUDA"
linux-aarch64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND HAVE_CUDA"
linux-arm64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND HAVE_CUDA"
linux-ppc64le="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"ppc64le\" AND NOT HAVE_CUDA"
linux-ppc64le-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"ppc64le\" AND HAVE_CUDA"
darwin="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\""
darwin-x86_64="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\""
darwin-arm64="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"arm64\""
windows="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND NOT HAVE_CUDA"
windows-x86_64="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND NOT HAVE_CUDA"
windows-x86_64-cuda="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND HAVE_CUDA"
android-arm="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm\""
android-arm32="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm\""
android-arm64="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm64\""
android-x86="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"x86\""
android-x86_64="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"x86_64\""
[root]
templates=[
{ path="conanfile.py.jinja", dest="conanfile.py" },
{ path="root_cmake_lists.jinja", dest="CMakeLists.txt" },
{ path="root_global_vars.jinja", dest="cmake/global_vars.cmake" },
]
copy=[
"cmake/global_flags.compiler.gnu.march.cmake",
"cmake/global_flags.compiler.gnu.cmake",
"cmake/global_flags.compiler.msvc.cmake",
"cmake/global_flags.linker.gnu.cmake",
"cmake/global_flags.linker.msvc.cmake",
"cmake/global_flags.cmake",
]
[targets.EMPTY]
template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
[targets.EXTRA_ONLY]
template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
[targets.add_executable]
template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
[targets.add_global_library_for]
is_extra_target = true
[targets.add_library]
template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
[targets.add_shared_library]
template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
[targets.add_fat_object]
template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
[targets.add_recursive_library]
is_extra_target = true
[targets.add_swig_jni_library]
is_extra_target = true
[attrs.root]
# All Conan attributes make sorted_set for stability generated conanfile,
# order has no effect for all conan options
# All OS conan attributes
conan-requires="sorted_set"
conan-tool_requires="sorted_set"
conan-imports="sorted_set"
conan-options="sorted_set"
conan-generators="sorted_set"
# OS depends conan attributes
conan-os_depends="list"
conan-os_depends-ITEM="dict"
conan-os_depends-os="str"
conan-os_depends-requires="sorted_set"
conan-os_depends-tool_requires="sorted_set"
conan-os_depends-imports="sorted_set"
conan-os_depends-options="sorted_set"
conan-os_depends-generators="sorted_set"
# For project languages order important only for ASM, it must be after C/CXX,
# this special logic maked in template, here use sorted_set for stability generated vars
project_languages="sorted_set"
vanilla_protobuf="flag"
# Use sorted_set for include(*.cmake) for stability generated CMakeLists.txt
includes="sorted_set"
[attrs.platform]
platform_vars-FAT_OBJECT_PREFIX="str"
platform_vars-FAT_OBJECT_SUFFIX="str"
platform_vars-RAGEL_FLAGS="str"
platform_vars-YASM_FLAGS="str"
platform_vars-CMAKE_CUDA_STANDARD="str"
platform_vars-BISON_FLAGS="str"
platform_vars-LEX_FLAGS="str"
platform_vars-FBS_CPP_FLAGS="str"
platform_vars-COMMON_PROTOC_FLAGS="str"
[attrs.dir]
dir_macroses="list"
dir_macroses-ITEM="dict"
dir_macroses-macro="str"
dir_macroses-args="list"
# This dir_includes translated to add_subdirectory(), order may be important (depends on the code),
# that is why here use set and not sort it
dir_includes="set"
[attrs.target]
is_fake_module="bool"
# Module packages (not induced, applied in current module only)
mpackages="list"
mpackages-ITEM="dict"
mpackages-name="str"
mpackages-components="list"
target_properties="list"
target_properties-ITEM="dict"
target_properties-name="str"
target_properties-value="list"
protoc_extra_outs="list"
target_options="dict"
target_options-interfaces="list"
target_options-interfaces-ITEM="dict"
target_options-interfaces-option="str"
target_options-interfaces-args="list"
target_options-publics="list"
target_options-publics-ITEM="dict"
target_options-publics-option="str"
target_options-publics-args="list"
target_options-privates="list"
target_options-privates-ITEM="dict"
target_options-privates-option="str"
target_options-privates-args="list"
target_commands="list"
target_commands-ITEM="dict"
target_commands-macro="str"
target_commands-args="list"
target_commands-args_escaped="list"
target_macroses="list"
target_macroses-ITEM="dict"
target_macroses-macro="str"
target_macroses-args="list"
target_macroses-merge_args="flag"
add_test_requirements="list"
add_ytest_requirements="list"
[attrs.induced]
# Induced packages
packages="list"
packages-ITEM="dict"
packages-name="str"
packages-components="list"
# Induced link libraries
link-interfaces="list"
link-publics="list"
link-privates="list"
allocators="list"
[[rules]]
attrs=["packages-name=AIO"]
copy=["cmake/FindAIO.cmake"]
add_values=[{attr="includes", values=["cmake/FindAIO.cmake"]}]
[[rules]]
attrs=["packages-name=IDN"]
copy=["cmake/FindIDN.cmake"]
add_values=[{attr="includes", values=["cmake/FindIDN.cmake"]}]
[[rules]]
attrs=["packages-name=JNITarget"]
copy=["cmake/FindJNITarget.cmake"]
add_values=[{attr="includes", values=["cmake/FindJNITarget.cmake"]}]
[[rules]]
attrs=["target_commands-macro=run_antlr"]
copy=["cmake/antlr.cmake"]
add_values=[{attr="includes", values=["cmake/antlr.cmake"]}]
[[rules]]
attrs=["target_commands-macro=run_antlr4"]
copy=["cmake/antlr4.cmake"]
add_values=[{attr="includes", values=["cmake/antlr4.cmake"]}]
[[rules]]
attrs=[
"target_macroses-macro=target_bison_parser",
"target_macroses-macro=target_flex_lexers"
]
copy=["cmake/bison.cmake"]
add_values=[{attr="includes", values=["cmake/bison.cmake"]}]
[[rules]]
attrs=[
"conan-requires",
"conan-tool_requires",
"conan-imports",
"conan-options",
"conan-generators",
]
copy=["cmake/conan1_deprecated.cmake", "cmake/conan_provider.cmake"]
add_values=[{attr="includes", values=["cmake/conan1_deprecated.cmake"]}]
[[rules]]
attrs=[
"target_options-privates-option=target_ev_messages",
"target_options-privates-option=target_proto_messages",
"target_macroses-macro=target_proto_plugin",
"target_macroses-macro=target_proto_outs",
"target_macroses-macro=target_proto_addincls",
]
copy=[
"cmake/protobuf.cmake",
"build/scripts/re_replace.py",
]
add_values=[{attr="includes", values=["cmake/protobuf.cmake"]}]
[[rules]]
attrs=[
"add_global_library_for",
"target_macroses-macro=generate_enum_serilization",
"target_macroses-macro=target_joined_source",
"target_macroses-macro=target_ragel_lexers",
"target_macroses-macro=target_yasm_source",
"target_macroses-macro=vcs_info",
"target_macroses-macro=target_sources_custom",
"target_macroses-macro=use_export_script",
"target_commands-macro=add_yunittest",
"target_commands-macro=set_yunittest_property",
]
copy=[
"cmake/common.cmake",
"build/scripts/export_script_gen.py",
"build/scripts/split_unittest.py",
"build/scripts/generate_vcs_info.py"
]
add_values=[{attr="includes", values=["cmake/common.cmake"]}]
[[rules]]
attrs=[
"target_macroses-macro=llvm_compile_c",
"target_macroses-macro=llvm_compile_cxx",
]
copy=["cmake/llvm-tools.cmake"]
add_values=[{attr="includes", values=["cmake/llvm-tools.cmake"]}]
[[rules]]
attrs=["dir_macroses-macro=curdir_masm_flags"]
copy=["cmake/masm.cmake"]
add_values=[{attr="includes", values=["cmake/masm.cmake"]}]
[[rules]]
attrs=["target_macroses-macro=target_fbs_source"]
copy=["cmake/fbs.cmake"]
add_values=[{attr="includes", values=["cmake/fbs.cmake"]}]
[[rules]]
attrs=["add_fat_object"]
copy=["cmake/fat_object.cmake"]
add_values=[{attr="includes", values=["cmake/fat_objects.cmake"]}]
[[rules]]
attrs=["add_recursive_library"]
copy=[
"cmake/recursive_library.cmake",
"build/scripts/create_recursive_library_for_cmake.py"
]
add_values=[{attr="includes", values=["cmake/recursive_library.cmake"]}]
[[rules]]
attrs=["add_shared_library"]
copy=["cmake/shared_libs.cmake"]
add_values=[{attr="includes", values=["cmake/shared_libs.cmake"]}]
[[rules]]
attrs=[
"target_macroses-macro=target_cuda_flags",
"target_macroses-macro=target_cuda_cflags",
"target_options-privates-option=target_cuda_sources"
]
copy=["cmake/cuda.cmake"]
add_values=[{attr="includes", values=["cmake/cuda.cmake"]}]
[[rules]]
attrs=["target_macroses-macro=target_rodata_sources"]
copy=["cmake/archive.cmake"]
add_values=[{attr="includes", values=["cmake/archive.cmake"]}]
[[rules]]
attrs=[
"target_options-privates-option=target_cython_sources",
"target_macroses-macro=target_cython_options",
"target_macroses-macro=target_cython_include_directories",
"target_macroses-macro=set_python_type_for_cython",
]
copy=["cmake/cython.cmake"]
add_values=[{attr="includes", values=["cmake/cython.cmake"]}]
[[rules]]
attrs=[
"swig_add_library",
"target_commands-macro=add_jar"
]
copy=[
"cmake/swig.cmake",
"build/scripts/gather_swig_java.cmake"
]
add_values=[{attr="includes", values=["cmake/swig.cmake"]}]
[[rules]]
attrs=[
"packages-name=IDN",
]
copy=[
"cmake/FindIDN.cmake",
]
add_values=[{attr="includes", values=["cmake/FindIDN.cmake"]}]
[[rules]]
attrs=[
"packages-name=AIO",
]
copy=[
"cmake/FindAIO.cmake",
]
add_values=[{attr="includes", values=["cmake/FindAIO.cmake"]}]
# Conan profiles for platforms
[[rules]]
platforms=[
"android-arm",
"android-arm32"
]
copy=["cmake/conan-profiles/android.armv7.profile"]
[[rules]]
platforms=["android-arm64"]
copy=["cmake/conan-profiles/android.arm64.profile"]
[[rules]]
platforms=["android-x86"]
copy=["cmake/conan-profiles/android.x86.profile"]
[[rules]]
platforms=["android-x86_64"]
copy=["cmake/conan-profiles/android.x86_64.profile"]
[[rules]]
platforms=[
"linux-aarch64",
"linux-arm64",
"linux-aarch64-cuda",
"linux-arm64-cuda"
]
copy=["cmake/conan-profiles/linux.aarch64.profile"]
[[rules]]
platforms=[
"linux-ppc64le",
"linux-ppc64le-cuda"
]
copy=["cmake/conan-profiles/linux.ppc64le.profile"]
[[rules]]
platforms=["darwin-x86_64"]
copy=["cmake/conan-profiles/macos.x86_64.profile"]
[[rules]]
platforms=["darwin-arm64"]
copy=["cmake/conan-profiles/macos.arm64.profile"]
|