generator.toml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. source_root_replacer = "${PROJECT_SOURCE_DIR}"
  2. binary_root_replacer = "${PROJECT_BINARY_DIR}"
  3. [platforms]
  4. linux="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND NOT HAVE_CUDA"
  5. linux-x86_64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND NOT HAVE_CUDA"
  6. linux-x86_64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND HAVE_CUDA"
  7. linux-aarch64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND NOT HAVE_CUDA"
  8. linux-arm64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND NOT HAVE_CUDA"
  9. linux-aarch64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND HAVE_CUDA"
  10. linux-arm64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND HAVE_CUDA"
  11. linux-ppc64le="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"ppc64le\" AND NOT HAVE_CUDA"
  12. linux-ppc64le-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"ppc64le\" AND HAVE_CUDA"
  13. darwin="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\""
  14. darwin-x86_64="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\""
  15. darwin-arm64="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"arm64\""
  16. windows="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND NOT HAVE_CUDA"
  17. windows-x86_64="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND NOT HAVE_CUDA"
  18. windows-x86_64-cuda="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND HAVE_CUDA"
  19. android-arm="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm\""
  20. android-arm32="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm\""
  21. android-arm64="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm64\""
  22. android-x86="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"x86\""
  23. android-x86_64="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"x86_64\""
  24. [root]
  25. templates=[
  26. { path="conanfile.py.jinja", dest="conanfile.py" },
  27. { path="root_cmake_lists.jinja", dest="CMakeLists.txt" },
  28. { path="root_global_vars.jinja", dest="cmake/global_vars.cmake" },
  29. ]
  30. copy=[
  31. "cmake/global_flags.compiler.gnu.march.cmake",
  32. "cmake/global_flags.compiler.gnu.cmake",
  33. "cmake/global_flags.compiler.msvc.cmake",
  34. "cmake/global_flags.linker.gnu.cmake",
  35. "cmake/global_flags.linker.msvc.cmake",
  36. "cmake/global_flags.cmake",
  37. ]
  38. [targets.EMPTY]
  39. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  40. merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
  41. [targets.add_executable]
  42. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  43. merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
  44. [targets.add_global_library_for]
  45. is_extra_target = true
  46. [targets.add_library]
  47. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  48. merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
  49. [targets.add_shared_library]
  50. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  51. merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
  52. [targets.add_fat_object]
  53. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  54. merge_platform_template={ path="merge_platforms_cmake_lists.jinja", dest="CMakeLists.txt" }
  55. [targets.add_recursive_library]
  56. is_extra_target = true
  57. [targets.add_swig_jni_library]
  58. is_extra_target = true
  59. [attrs.root]
  60. # DEPRECATED - Skipped old hardcoded-cmake attributes
  61. conan_require="skip"
  62. conan_require_tool="skip"
  63. conan_import="skip"
  64. conan_options="skip"
  65. add_language="skip"
  66. set_global_flags="skip"
  67. find_package="skip"
  68. include="skip"
  69. # Really used attributes
  70. # All Conan attributes make sorted_set for stability generated conanfile,
  71. # order has no effect for all conan options
  72. # All OS conan attributes
  73. conan-requires="sorted_set"
  74. conan-tool_requires="sorted_set"
  75. conan-imports="sorted_set"
  76. conan-options="sorted_set"
  77. conan-generators="sorted_set"
  78. # OS depends conan attributes
  79. conan-os_depends="list"
  80. conan-os_depends-ITEM="dict"
  81. conan-os_depends-os="str"
  82. conan-os_depends-requires="sorted_set"
  83. conan-os_depends-tool_requires="sorted_set"
  84. conan-os_depends-imports="sorted_set"
  85. conan-os_depends-options="sorted_set"
  86. conan-os_depends-generators="sorted_set"
  87. # For project languages order important only for ASM, it must be after C/CXX,
  88. # this special logic maked in template, here use sorted_set for stability generated vars
  89. project_languages="sorted_set"
  90. vanilla_protobuf="flag"
  91. # Use sorted_set for include(*.cmake) for stability generated CMakeLists.txt
  92. includes="sorted_set"
  93. [attrs.platform]
  94. platform_vars-FAT_OBJECT_PREFIX="str"
  95. platform_vars-FAT_OBJECT_SUFFIX="str"
  96. platform_vars-RAGEL_FLAGS="str"
  97. platform_vars-YASM_FLAGS="str"
  98. platform_vars-CMAKE_CUDA_STANDARD="str"
  99. platform_vars-BISON_FLAGS="str"
  100. platform_vars-LEX_FLAGS="str"
  101. platform_vars-FBS_CPP_FLAGS="str"
  102. platform_vars-COMMON_PROTOC_FLAGS="str"
  103. [attrs.dir]
  104. # DEPRECATED - Skipped old hardcoded-cmake attributes
  105. curdir_masm_flags="skip"
  106. set_vars="skip"
  107. # Really used attributes
  108. dir_macroses="list"
  109. dir_macroses-ITEM="dict"
  110. dir_macroses-macro="str"
  111. dir_macroses-args="list"
  112. # This dir_includes translated to add_subdirectory(), order may be important (depends on the code),
  113. # that is why here use set and not sort it
  114. dir_includes="set"
  115. [attrs.target]
  116. # DEPRECATED - Skipped old hardcoded-cmake attributes
  117. set_target_property="skip"
  118. append_target_property="skip"
  119. # DEPRECATED - target multiple calls macroses
  120. generate_enum_serilization="skip"
  121. target_joined_source="skip"
  122. target_ragel_lexers="skip"
  123. target_fbs_source="skip"
  124. target_flex_lexers="skip"
  125. target_bison_parser="skip"
  126. target_yasm_source="skip"
  127. target_rodata_sources="skip"
  128. target_sources_custom="skip"
  129. vcs_info="skip"
  130. resources="skip"
  131. llvm_compile_c="skip"
  132. llvm_compile_cxx="skip"
  133. # DEPRECATED - target unique calls macroses
  134. target_cuda_flags="skip"
  135. target_cuda_cflags="skip"
  136. target_proto_outs="skip"
  137. target_proto_addincls="skip"
  138. use_export_script="skip"
  139. target_cython_options="skip"
  140. target_cython_include_directories="skip"
  141. set_python_type_for_cython="skip"
  142. target_proto_plugin="skip"
  143. # DEPRECATED - target options
  144. target_compile_options="skip"
  145. target_include_directories="skip"
  146. target_link_options="skip"
  147. target_ev_messages="skip"
  148. target_proto_messages="skip"
  149. target_sources="skip"
  150. target_cuda_sources="skip"
  151. target_cython_sources="skip"
  152. library_fake_marker="skip"
  153. # DEPRECATED - target commands
  154. add_custom_command="skip"
  155. add_test="skip"
  156. add_yunittest="skip"
  157. set_yunittest_property="skip"
  158. copy_file="skip"
  159. configure_file="skip"
  160. run_antlr="skip"
  161. set_property="skip"
  162. add_jar="skip"
  163. set_property_escaped="skip"
  164. set_yunittest_property_escaped="skip"
  165. # Really used attributes
  166. is_fake_module="bool"
  167. # Module packages (not induced, applied in current module only)
  168. mpackages="list"
  169. mpackages-ITEM="dict"
  170. mpackages-name="str"
  171. mpackages-components="list"
  172. target_properties="list"
  173. target_properties-ITEM="dict"
  174. target_properties-name="str"
  175. target_properties-value="list"
  176. protoc_extra_outs="list"
  177. target_options="dict"
  178. target_options-interfaces="list"
  179. target_options-interfaces-ITEM="dict"
  180. target_options-interfaces-option="str"
  181. target_options-interfaces-args="list"
  182. target_options-publics="list"
  183. target_options-publics-ITEM="dict"
  184. target_options-publics-option="str"
  185. target_options-publics-args="list"
  186. target_options-privates="list"
  187. target_options-privates-ITEM="dict"
  188. target_options-privates-option="str"
  189. target_options-privates-args="list"
  190. target_commands="list"
  191. target_commands-ITEM="dict"
  192. target_commands-macro="str"
  193. target_commands-args="list"
  194. target_commands-args_escaped="list"
  195. target_macroses="list"
  196. target_macroses-ITEM="dict"
  197. target_macroses-macro="str"
  198. target_macroses-args="list"
  199. target_macroses-merge_args="flag"
  200. add_test_requirements="list"
  201. add_ytest_requirements="list"
  202. [attrs.induced]
  203. # DEPRECATED - target options
  204. consumer_link_library="skip"
  205. target_allocator="skip"
  206. # Induced packages
  207. packages="list"
  208. packages-ITEM="dict"
  209. packages-name="str"
  210. packages-components="list"
  211. # Induced link libraries
  212. link-interfaces="list"
  213. link-publics="list"
  214. link-privates="list"
  215. allocators="list"
  216. [[rules]]
  217. attrs=["packages-name=AIO"]
  218. copy=["cmake/FindAIO.cmake"]
  219. add_values=[{attr="includes", values=["cmake/FindAIO.cmake"]}]
  220. [[rules]]
  221. attrs=["packages-name=IDN"]
  222. copy=["cmake/FindIDN.cmake"]
  223. add_values=[{attr="includes", values=["cmake/FindIDN.cmake"]}]
  224. [[rules]]
  225. attrs=["packages-name=JNITarget"]
  226. copy=["cmake/FindJNITarget.cmake"]
  227. add_values=[{attr="includes", values=["cmake/FindJNITarget.cmake"]}]
  228. [[rules]]
  229. attrs=["run_antlr"]
  230. copy=["cmake/antlr.cmake"]
  231. add_values=[{attr="includes", values=["cmake/antlr.cmake"]}]
  232. [[rules]]
  233. attrs=[
  234. "target_bison_parser",
  235. "target_flex_lexers"
  236. ]
  237. copy=["cmake/bison.cmake"]
  238. add_values=[{attr="includes", values=["cmake/bison.cmake"]}]
  239. [[rules]]
  240. attrs=[
  241. "conan-requires",
  242. "conan-tool_requires",
  243. "conan-imports",
  244. "conan-options",
  245. "conan-generators",
  246. ]
  247. copy=["cmake/conan1_deprecated.cmake", "cmake/conan_provider.cmake"]
  248. add_values=[{attr="includes", values=["cmake/conan1_deprecated.cmake"]}]
  249. [[rules]]
  250. attrs=[
  251. "target_ev_messages",
  252. "target_proto_messages",
  253. "target_macroses-macro=target_proto_plugin",
  254. "target_macroses-macro=target_proto_outs",
  255. "target_macroses-macro=target_proto_addincls",
  256. ]
  257. copy=[
  258. "cmake/protobuf.cmake",
  259. "build/scripts/re_replace.py",
  260. ]
  261. add_values=[{attr="includes", values=["cmake/protobuf.cmake"]}]
  262. [[rules]]
  263. attrs=[
  264. "add_global_library_for",
  265. "target_macroses-macro=generate_enum_serilization",
  266. "target_macroses-macro=target_joined_source",
  267. "target_macroses-macro=target_ragel_lexers",
  268. "target_macroses-macro=target_yasm_source",
  269. "target_macroses-macro=vcs_info",
  270. "target_macroses-macro=target_sources_custom",
  271. "target_macroses-macro=use_export_script",
  272. "target_commands-macro=add_yunittest",
  273. "target_commands-macro=set_yunittest_property",
  274. ]
  275. copy=[
  276. "cmake/common.cmake",
  277. "build/scripts/export_script_gen.py",
  278. "build/scripts/split_unittest.py",
  279. "build/scripts/generate_vcs_info.py"
  280. ]
  281. add_values=[{attr="includes", values=["cmake/common.cmake"]}]
  282. [[rules]]
  283. attrs=[
  284. "target_macroses-macro=llvm_compile_c",
  285. "target_macroses-macro=llvm_compile_cxx",
  286. ]
  287. copy=["cmake/llvm-tools.cmake"]
  288. add_values=[{attr="includes", values=["cmake/llvm-tools.cmake"]}]
  289. [[rules]]
  290. attrs=["dir_macroses-macro=curdir_masm_flags"]
  291. copy=["cmake/masm.cmake"]
  292. add_values=[{attr="includes", values=["cmake/masm.cmake"]}]
  293. [[rules]]
  294. attrs=["target_macroses-macro=target_fbs_source"]
  295. copy=["cmake/fbs.cmake"]
  296. add_values=[{attr="includes", values=["cmake/fbs.cmake"]}]
  297. [[rules]]
  298. attrs=["add_fat_object"]
  299. copy=["cmake/fat_object.cmake"]
  300. add_values=[{attr="includes", values=["cmake/fat_objects.cmake"]}]
  301. [[rules]]
  302. attrs=["add_recursive_library"]
  303. copy=[
  304. "cmake/recursive_library.cmake",
  305. "build/scripts/create_recursive_library_for_cmake.py"
  306. ]
  307. add_values=[{attr="includes", values=["cmake/recursive_library.cmake"]}]
  308. [[rules]]
  309. attrs=["add_shared_library"]
  310. copy=["cmake/shared_libs.cmake"]
  311. add_values=[{attr="includes", values=["cmake/shared_libs.cmake"]}]
  312. [[rules]]
  313. attrs=[
  314. "target_macroses-macro=target_cuda_flags",
  315. "target_macroses-macro=target_cuda_cflags",
  316. "target_cuda_sources"
  317. ]
  318. copy=["cmake/cuda.cmake"]
  319. add_values=[{attr="includes", values=["cmake/cuda.cmake"]}]
  320. [[rules]]
  321. attrs=["target_macroses-macro=target_rodata_sources"]
  322. copy=["cmake/archive.cmake"]
  323. add_values=[{attr="includes", values=["cmake/archive.cmake"]}]
  324. [[rules]]
  325. attrs=[
  326. "target_cython_sources",
  327. "target_macroses-macro=target_cython_options",
  328. "target_macroses-macro=target_cython_include_directories",
  329. "target_macroses-macro=set_python_type_for_cython",
  330. ]
  331. copy=["cmake/cython.cmake"]
  332. add_values=[{attr="includes", values=["cmake/cython.cmake"]}]
  333. [[rules]]
  334. attrs=[
  335. "swig_add_library",
  336. "target_commands-macro=add_jar"
  337. ]
  338. copy=[
  339. "cmake/swig.cmake",
  340. "build/scripts/gather_swig_java.cmake"
  341. ]
  342. add_values=[{attr="includes", values=["cmake/swig.cmake"]}]
  343. # Conan profiles for platforms
  344. [[rules]]
  345. platforms=[
  346. "android-arm",
  347. "android-arm32"
  348. ]
  349. copy=["cmake/conan-profiles/android.armv7.profile"]
  350. [[rules]]
  351. platforms=["android-arm64"]
  352. copy=["cmake/conan-profiles/android.arm64.profile"]
  353. [[rules]]
  354. platforms=["android-x86"]
  355. copy=["cmake/conan-profiles/android.x86.profile"]
  356. [[rules]]
  357. platforms=["android-x86_64"]
  358. copy=["cmake/conan-profiles/android.x86_64.profile"]
  359. [[rules]]
  360. platforms=[
  361. "linux-aarch64",
  362. "linux-arm64",
  363. "linux-aarch64-cuda",
  364. "linux-arm64-cuda"
  365. ]
  366. copy=["cmake/conan-profiles/linux.aarch64.profile"]
  367. [[rules]]
  368. platforms=[
  369. "linux-ppc64le",
  370. "linux-ppc64le-cuda"
  371. ]
  372. copy=["cmake/conan-profiles/linux.ppc64le.profile"]
  373. [[rules]]
  374. platforms=["darwin-x86_64"]
  375. copy=["cmake/conan-profiles/macos.x86_64.profile"]
  376. [[rules]]
  377. platforms=["darwin-arm64"]
  378. copy=["cmake/conan-profiles/macos.arm64.profile"]