generator.toml 7.3 KB

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