generator.toml 6.7 KB

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