generator.toml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. [common]
  37. template={ path="common_cmake_lists.jinja", dest="CMakeLists.txt" }
  38. [dir]
  39. template={ path="dir_cmake_lists.jinja", dest="CMakeLists{PLATFORM}.txt" }
  40. [attrs.root]
  41. project_name="str"
  42. project_language_list="list"
  43. platform_vars="list"
  44. includes="sorted_set"
  45. use_conan="bool"
  46. vanilla_protobuf="flag"
  47. [attrs.dir]
  48. [attrs.target]
  49. is_interface="bool"
  50. [[rules]]
  51. attrs=["run_antlr"]
  52. copy=["cmake/antlr.cmake"]
  53. add_values=[{attr="includes", values=["cmake/antlr.cmake"]}]
  54. [[rules]]
  55. attrs=[
  56. "target_bison_parser",
  57. "target_flex_lexers"
  58. ]
  59. copy=["cmake/bison.cmake"]
  60. add_values=[{attr="includes", values=["cmake/bison.cmake"]}]
  61. [[rules]]
  62. attrs=[
  63. "conan_add_remote",
  64. "conan_check",
  65. "conan_cmake_autodetect",
  66. "conan_cmake_configure",
  67. "conan_cmake_detect_unix_libcxx",
  68. "conan_cmake_detect_vs_runtime",
  69. "conan_cmake_generate_conanfile",
  70. "conan_cmake_install",
  71. "conan_cmake_run",
  72. "conan_cmake_settings",
  73. "conan_cmake_setup_conanfile",
  74. "conan_config_install",
  75. "conan_load_buildinfo",
  76. "conan_parse_arguments",
  77. "conan_require",
  78. "conan_require_tool",
  79. "old_conan_cmake_install",
  80. ]
  81. copy=["cmake/conan.cmake"]
  82. add_values=[{attr="includes", values=["cmake/conan.cmake"]}]
  83. [[rules]]
  84. attrs=[
  85. "target_ev_messages",
  86. "target_proto_messages",
  87. "target_proto_plugin",
  88. "target_proto_outs",
  89. "target_proto_addincls",
  90. ]
  91. copy=[
  92. "cmake/protobuf.cmake",
  93. "build/scripts/re_replace.py",
  94. ]
  95. add_values=[{attr="includes", values=["cmake/protobuf.cmake"]}]
  96. [[rules]]
  97. attrs=[
  98. "add_global_library_for",
  99. "archive",
  100. "resources_file",
  101. "generate_enum_serilization",
  102. "copy",
  103. "target_joined_source",
  104. "target_ragel_lexers",
  105. "target_yasm_source",
  106. "vcs_info",
  107. "target_sources_custom",
  108. "use_export_script",
  109. "add_yunittest",
  110. "set_yunittest_property",
  111. ]
  112. copy=[
  113. "cmake/common.cmake",
  114. "build/scripts/export_script_gen.py",
  115. "build/scripts/split_unittest.py",
  116. "build/scripts/generate_vcs_info.py"
  117. ]
  118. add_values=[{attr="includes", values=["cmake/common.cmake"]}]
  119. [[rules]]
  120. attrs=[
  121. "llvm_compile_c",
  122. "llvm_compile_cxx",
  123. ]
  124. copy=["cmake/llvm-tools.cmake"]
  125. add_values=[{attr="includes", values=["cmake/llvm-tools.cmake"]}]
  126. [[rules]]
  127. attrs=["curdir_masm_flags"]
  128. copy=["cmake/masm.cmake"]
  129. add_values=[{attr="includes", values=["cmake/masm.cmake"]}]
  130. [[rules]]
  131. attrs=["target_fbs_source"]
  132. copy=["cmake/fbs.cmake"]
  133. add_values=[{attr="includes", values=["cmake/fbs.cmake"]}]
  134. [[rules]]
  135. attrs=["add_fat_object"]
  136. copy=["cmake/fat_object.cmake"]
  137. add_values=[{attr="includes", values=["cmake/fat_objects.cmake"]}]
  138. [[rules]]
  139. attrs=["add_recursive_library"]
  140. copy=[
  141. "cmake/recursive_library.cmake",
  142. "build/scripts/create_recursive_library_for_cmake.py"
  143. ]
  144. add_values=[{attr="includes", values=["cmake/recursive_library.cmake"]}]
  145. [[rules]]
  146. attrs=["add_shared_library"]
  147. copy=["cmake/shared_libs.cmake"]
  148. add_values=[{attr="includes", values=["cmake/shared_libs.cmake"]}]
  149. [[rules]]
  150. attrs=[
  151. "target_cuda_flags",
  152. "target_cuda_cflags",
  153. "target_cuda_sources"
  154. ]
  155. copy=["cmake/cuda.cmake"]
  156. add_values=[{attr="includes", values=["cmake/cuda.cmake"]}]
  157. [[rules]]
  158. attrs=["target_rodata_sources"]
  159. copy=["cmake/archive.cmake"]
  160. add_values=[{attr="includes", values=["cmake/archive.cmake"]}]
  161. [[rules]]
  162. attrs=[
  163. "target_cython_sources",
  164. "target_cython_options",
  165. "target_cython_include_directories",
  166. "set_python_type_for_cython",
  167. ]
  168. copy=["cmake/cython.cmake"]
  169. add_values=[{attr="includes", values=["cmake/cython.cmake"]}]
  170. [[rules]]
  171. attrs=[
  172. "swig_add_library",
  173. "add_jar"
  174. ]
  175. copy=[
  176. "cmake/swig.cmake",
  177. "build/scripts/gather_swig_java.cmake"
  178. ]
  179. add_values=[{attr="includes", values=["cmake/swig.cmake"]}]
  180. # Conan profiles for platforms
  181. [[rules]]
  182. platforms=[
  183. "android-arm",
  184. "android-arm32"
  185. ]
  186. copy=["cmake/conan-profiles/android.armv7.profile"]
  187. [[rules]]
  188. platforms=["android-arm64"]
  189. copy=["cmake/conan-profiles/android.arm64.profile"]
  190. [[rules]]
  191. platforms=["android-x86"]
  192. copy=["cmake/conan-profiles/android.x86.profile"]
  193. [[rules]]
  194. platforms=["android-x86_64"]
  195. copy=["cmake/conan-profiles/android.x86_64.profile"]
  196. [[rules]]
  197. platforms=[
  198. "linux-aarch64",
  199. "linux-arm64",
  200. "linux-aarch64-cuda",
  201. "linux-arm64-cuda"
  202. ]
  203. copy=["cmake/conan-profiles/linux.aarch64.profile"]
  204. [[rules]]
  205. platforms=[
  206. "linux-ppc64le",
  207. "linux-ppc64le-cuda"
  208. ]
  209. copy=["cmake/conan-profiles/linux.ppc64le.profile"]
  210. [[rules]]
  211. platforms=["darwin-arm64"]
  212. copy=["cmake/conan-profiles/macos.arm64.profile"]