generator.toml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. [platforms]
  2. linux="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND NOT HAVE_CUDA"
  3. linux-x86_64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND NOT HAVE_CUDA"
  4. linux-x86_64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\" AND HAVE_CUDA"
  5. linux-aarch64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND NOT HAVE_CUDA"
  6. linux-arm64="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND NOT HAVE_CUDA"
  7. linux-aarch64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND HAVE_CUDA"
  8. linux-arm64-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"aarch64\" AND HAVE_CUDA"
  9. linux-ppc64le="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"ppc64le\" AND NOT HAVE_CUDA"
  10. linux-ppc64le-cuda="CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"ppc64le\" AND HAVE_CUDA"
  11. darwin="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\""
  12. darwin-x86_64="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\""
  13. darwin-arm64="CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"arm64\""
  14. windows="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND NOT HAVE_CUDA"
  15. windows-x86_64="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND NOT HAVE_CUDA"
  16. windows-x86_64-cuda="WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL \"AMD64\" AND HAVE_CUDA"
  17. android-arm="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm\""
  18. android-arm32="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm\""
  19. android-arm64="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"arm64\""
  20. android-x86="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"x86\""
  21. android-x86_64="ANDROID AND CMAKE_ANDROID_ARCH STREQUAL \"x86_64\""
  22. [root]
  23. templates=[
  24. { path="conanfile.jinja", dest="conanfile.txt" },
  25. { path="root_cmake_lists.jinja", dest="CMakeLists.txt" },
  26. { path="root_global_vars.jinja", dest="cmake/global_vars.cmake" },
  27. ]
  28. copy=[
  29. "cmake/global_flags.compiler.gnu.march.cmake",
  30. "cmake/global_flags.compiler.gnu.cmake",
  31. "cmake/global_flags.compiler.msvc.cmake",
  32. "cmake/global_flags.linker.gnu.cmake",
  33. "cmake/global_flags.linker.msvc.cmake",
  34. "cmake/global_flags.cmake",
  35. ]
  36. [targets.EMPTY]
  37. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  38. merge_platform_template={ path="common_cmake_lists.jinja", dest="CMakeLists.txt" }
  39. [targets.add_executable]
  40. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  41. merge_platform_template={ path="common_cmake_lists.jinja", dest="CMakeLists.txt" }
  42. [targets.add_global_library_for]
  43. is_extra_target = true
  44. [targets.add_library]
  45. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  46. merge_platform_template={ path="common_cmake_lists.jinja", dest="CMakeLists.txt" }
  47. [targets.add_shared_library]
  48. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  49. merge_platform_template={ path="common_cmake_lists.jinja", dest="CMakeLists.txt" }
  50. [targets.add_fat_object]
  51. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  52. merge_platform_template={ path="common_cmake_lists.jinja", dest="CMakeLists.txt" }
  53. [targets.add_recursive_library]
  54. is_extra_target = true
  55. [targets.add_swig_jni_library]
  56. is_extra_target = true
  57. [attrs.root]
  58. project_name="str"
  59. project_language_list="list"
  60. platform_vars="list"
  61. includes="sorted_set"
  62. use_conan="bool"
  63. vanilla_protobuf="flag"
  64. [attrs.dir]
  65. [attrs.target]
  66. is_interface="bool"
  67. [[rules]]
  68. attrs=["run_antlr"]
  69. copy=["cmake/antlr.cmake"]
  70. add_values=[{attr="includes", values=["cmake/antlr.cmake"]}]
  71. [[rules]]
  72. attrs=[
  73. "target_bison_parser",
  74. "target_flex_lexers"
  75. ]
  76. copy=["cmake/bison.cmake"]
  77. add_values=[{attr="includes", values=["cmake/bison.cmake"]}]
  78. [[rules]]
  79. attrs=[
  80. "conan_add_remote",
  81. "conan_check",
  82. "conan_cmake_autodetect",
  83. "conan_cmake_configure",
  84. "conan_cmake_detect_unix_libcxx",
  85. "conan_cmake_detect_vs_runtime",
  86. "conan_cmake_generate_conanfile",
  87. "conan_cmake_install",
  88. "conan_cmake_run",
  89. "conan_cmake_settings",
  90. "conan_cmake_setup_conanfile",
  91. "conan_config_install",
  92. "conan_load_buildinfo",
  93. "conan_parse_arguments",
  94. "conan_require",
  95. "conan_require_tool",
  96. "old_conan_cmake_install",
  97. ]
  98. copy=["cmake/conan.cmake"]
  99. add_values=[{attr="includes", values=["cmake/conan.cmake"]}]
  100. [[rules]]
  101. attrs=[
  102. "target_ev_messages",
  103. "target_proto_messages",
  104. "target_proto_plugin",
  105. "target_proto_outs",
  106. "target_proto_addincls",
  107. ]
  108. copy=[
  109. "cmake/protobuf.cmake",
  110. "build/scripts/re_replace.py",
  111. ]
  112. add_values=[{attr="includes", values=["cmake/protobuf.cmake"]}]
  113. [[rules]]
  114. attrs=[
  115. "add_global_library_for",
  116. "archive",
  117. "resources_file",
  118. "generate_enum_serilization",
  119. "copy",
  120. "target_joined_source",
  121. "target_ragel_lexers",
  122. "target_yasm_source",
  123. "vcs_info",
  124. "target_sources_custom",
  125. "use_export_script",
  126. "add_yunittest",
  127. "set_yunittest_property",
  128. ]
  129. copy=[
  130. "cmake/common.cmake",
  131. "build/scripts/export_script_gen.py",
  132. "build/scripts/split_unittest.py",
  133. "build/scripts/generate_vcs_info.py"
  134. ]
  135. add_values=[{attr="includes", values=["cmake/common.cmake"]}]
  136. [[rules]]
  137. attrs=[
  138. "llvm_compile_c",
  139. "llvm_compile_cxx",
  140. ]
  141. copy=["cmake/llvm-tools.cmake"]
  142. add_values=[{attr="includes", values=["cmake/llvm-tools.cmake"]}]
  143. [[rules]]
  144. attrs=["curdir_masm_flags"]
  145. copy=["cmake/masm.cmake"]
  146. add_values=[{attr="includes", values=["cmake/masm.cmake"]}]
  147. [[rules]]
  148. attrs=["target_fbs_source"]
  149. copy=["cmake/fbs.cmake"]
  150. add_values=[{attr="includes", values=["cmake/fbs.cmake"]}]
  151. [[rules]]
  152. attrs=["add_fat_object"]
  153. copy=["cmake/fat_object.cmake"]
  154. add_values=[{attr="includes", values=["cmake/fat_objects.cmake"]}]
  155. [[rules]]
  156. attrs=["add_recursive_library"]
  157. copy=[
  158. "cmake/recursive_library.cmake",
  159. "build/scripts/create_recursive_library_for_cmake.py"
  160. ]
  161. add_values=[{attr="includes", values=["cmake/recursive_library.cmake"]}]
  162. [[rules]]
  163. attrs=["add_shared_library"]
  164. copy=["cmake/shared_libs.cmake"]
  165. add_values=[{attr="includes", values=["cmake/shared_libs.cmake"]}]
  166. [[rules]]
  167. attrs=[
  168. "target_cuda_flags",
  169. "target_cuda_cflags",
  170. "target_cuda_sources"
  171. ]
  172. copy=["cmake/cuda.cmake"]
  173. add_values=[{attr="includes", values=["cmake/cuda.cmake"]}]
  174. [[rules]]
  175. attrs=["target_rodata_sources"]
  176. copy=["cmake/archive.cmake"]
  177. add_values=[{attr="includes", values=["cmake/archive.cmake"]}]
  178. [[rules]]
  179. attrs=[
  180. "target_cython_sources",
  181. "target_cython_options",
  182. "target_cython_include_directories",
  183. "set_python_type_for_cython",
  184. ]
  185. copy=["cmake/cython.cmake"]
  186. add_values=[{attr="includes", values=["cmake/cython.cmake"]}]
  187. [[rules]]
  188. attrs=[
  189. "swig_add_library",
  190. "add_jar"
  191. ]
  192. copy=[
  193. "cmake/swig.cmake",
  194. "build/scripts/gather_swig_java.cmake"
  195. ]
  196. add_values=[{attr="includes", values=["cmake/swig.cmake"]}]
  197. # Conan profiles for platforms
  198. [[rules]]
  199. platforms=[
  200. "android-arm",
  201. "android-arm32"
  202. ]
  203. copy=["cmake/conan-profiles/android.armv7.profile"]
  204. [[rules]]
  205. platforms=["android-arm64"]
  206. copy=["cmake/conan-profiles/android.arm64.profile"]
  207. [[rules]]
  208. platforms=["android-x86"]
  209. copy=["cmake/conan-profiles/android.x86.profile"]
  210. [[rules]]
  211. platforms=["android-x86_64"]
  212. copy=["cmake/conan-profiles/android.x86_64.profile"]
  213. [[rules]]
  214. platforms=[
  215. "linux-aarch64",
  216. "linux-arm64",
  217. "linux-aarch64-cuda",
  218. "linux-arm64-cuda"
  219. ]
  220. copy=["cmake/conan-profiles/linux.aarch64.profile"]
  221. [[rules]]
  222. platforms=[
  223. "linux-ppc64le",
  224. "linux-ppc64le-cuda"
  225. ]
  226. copy=["cmake/conan-profiles/linux.ppc64le.profile"]
  227. [[rules]]
  228. platforms=["darwin-arm64"]
  229. copy=["cmake/conan-profiles/macos.arm64.profile"]