schema_toolchains.json 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "description": "Schema for the CMake toolchains object kind",
  4. "type": "object",
  5. "required": [
  6. "kind",
  7. "version",
  8. "toolchains"
  9. ],
  10. "oneOf": [
  11. {
  12. "$ref": "#/definitions/toolchainsObjV1_0"
  13. }
  14. ],
  15. "definitions": {
  16. "kind": {
  17. "type": "string",
  18. "const": "toolchains",
  19. "description": "Specifies the object kind"
  20. },
  21. "versionV1_0": {
  22. "type": "object",
  23. "required": [
  24. "major",
  25. "minor"
  26. ],
  27. "properties": {
  28. "major": {
  29. "type": "integer",
  30. "const": 1
  31. },
  32. "minor": {
  33. "type": "integer",
  34. "const": 0
  35. }
  36. },
  37. "additionalProperties": false
  38. },
  39. "language": {
  40. "type": "string",
  41. "description": "Toolchain language identifier (e.g. C, CXX)"
  42. },
  43. "sourceFileExtensions": {
  44. "type": "array",
  45. "items": {
  46. "type": "string"
  47. },
  48. "description": "List of source file extensions (without leading dot) supported by this toolchain"
  49. },
  50. "compilerPath": {
  51. "type": "string",
  52. "description": "Path to the compiler executable. This is present when the CMAKE_<LANG>_COMPILER variable is defined."
  53. },
  54. "compilerCommandFragment": {
  55. "type": "string",
  56. "description": "Mandatory arguments to the compiler, as a command line fragment. This is present when the CMAKE_<LANG>_COMPILER variable is a list containing multiple elements or the CC or similar environment variable contains command line arguments."
  57. },
  58. "compilerId": {
  59. "type": "string",
  60. "description": "Compiler identifier (e.g. GNU, MSVC). This is present when the CMAKE_<LANG>_COMPILER_ID variable is defined."
  61. },
  62. "compilerVersion": {
  63. "type": "string",
  64. "description": "Version of the compiler. This is present when the CMAKE_<LANG>_COMPILER_VERSION variable is defined."
  65. },
  66. "compilerTarget": {
  67. "type": "string",
  68. "description": "Cross-compiling target of the compiler. This is present when the CMAKE_<LANG>_COMPILER_TARGET variable is defined."
  69. },
  70. "compilerImplicit": {
  71. "type": "object",
  72. "properties": {
  73. "includeDirectories": {
  74. "type": "array",
  75. "items": {
  76. "type": "string"
  77. },
  78. "description": "List of implicit include directories for the compiler. This is present when the CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES variable is defined."
  79. },
  80. "linkDirectories": {
  81. "type": "array",
  82. "items": {
  83. "type": "string"
  84. },
  85. "description": "List of implicit link directories for the compiler front end. This is present when the CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES variable is defined."
  86. },
  87. "linkFrameworkDirectories": {
  88. "type": "array",
  89. "items": {
  90. "type": "string"
  91. },
  92. "description": "List of implicit link framework directories for the compiler front end. This is present when the CMAKE_<LANG>_IMPLICIT_FRAMEWORK_DIRECTORIES variable is defined."
  93. },
  94. "linkLibraries": {
  95. "type": "array",
  96. "items": {
  97. "type": "string"
  98. },
  99. "description": "List of implicit link libraries for the compiler front end. This is present when the CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES variable is defined."
  100. }
  101. },
  102. "additionalProperties": false
  103. },
  104. "compiler": {
  105. "type": "object",
  106. "properties": {
  107. "path": {
  108. "$ref": "#/definitions/compilerPath"
  109. },
  110. "id": {
  111. "$ref": "#/definitions/compilerId"
  112. },
  113. "version": {
  114. "$ref": "#/definitions/compilerVersion"
  115. },
  116. "target": {
  117. "$ref": "#/definitions/compilerTarget"
  118. },
  119. "implicit": {
  120. "$ref": "#/definitions/compilerImplicit"
  121. }
  122. },
  123. "additionalProperties": false
  124. },
  125. "toolchainsObjV1_0": {
  126. "type": "object",
  127. "properties": {
  128. "kind": {
  129. "$ref": "#/definitions/kind"
  130. },
  131. "version": {
  132. "$ref": "#/definitions/versionV1_0"
  133. },
  134. "toolchains": {
  135. "type": "array",
  136. "description": "Array of toolchain configurations per language",
  137. "items": {
  138. "type": "object",
  139. "required": [
  140. "language",
  141. "compiler"
  142. ],
  143. "properties": {
  144. "language": {
  145. "$ref": "#/definitions/language"
  146. },
  147. "compiler": {
  148. "$ref": "#/definitions/compiler"
  149. },
  150. "sourceFileExtensions": {
  151. "$ref": "#/definitions/sourceFileExtensions"
  152. }
  153. },
  154. "additionalProperties": false
  155. }
  156. }
  157. },
  158. "additionalProperties": false
  159. }
  160. }
  161. }