CMakePresets.json 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. {
  2. "version": 3,
  3. "cmakeMinimumRequired": {
  4. "major": 3,
  5. "minor": 20,
  6. "patch": 0
  7. },
  8. "configurePresets": [
  9. {
  10. "name": "default-windows",
  11. "displayName": "Default Windows Config",
  12. "hidden": true,
  13. "binaryDir": "${sourceDir}/out/build/${presetName}",
  14. "generator": "Visual Studio 16 2019",
  15. "architecture": {
  16. "value": "x64",
  17. "strategy": "set"
  18. },
  19. "vendor": {
  20. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  21. "hostOS": [
  22. "Windows"
  23. ]
  24. }
  25. }
  26. },
  27. {
  28. "name": "default-macos",
  29. "displayName": "Default macOS Config",
  30. "hidden": true,
  31. "binaryDir": "${sourceDir}/out/build/${presetName}",
  32. "generator": "Xcode",
  33. "cacheVariables": {
  34. "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64"
  35. },
  36. "vendor": {
  37. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  38. "hostOS": [
  39. "macOS"
  40. ]
  41. }
  42. }
  43. },
  44. {
  45. "name": "default-linux",
  46. "displayName": "Default Linux Config",
  47. "hidden": true,
  48. "binaryDir": "${sourceDir}/out/build/${presetName}",
  49. "generator": "Unix Makefiles",
  50. "environment": {
  51. "ASAN_OPTIONS": "protect_shadow_gap=0:detect_leaks=1:detect_container_overflow=0",
  52. "LSAN_OPTIONS": "suppressions=${sourceDir}/tools/sanitizer/lsan_suppressions.txt"
  53. },
  54. "vendor": {
  55. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  56. "hostOS": [
  57. "Linux"
  58. ]
  59. }
  60. }
  61. },
  62. {
  63. "name": "default-ios",
  64. "displayName": "Default iOS Config",
  65. "hidden": true,
  66. "binaryDir": "${sourceDir}/out/build/${presetName}",
  67. "generator": "Xcode",
  68. "cacheVariables": {
  69. "CMAKE_SYSTEM_NAME": "iOS",
  70. "CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
  71. "CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=": "NO",
  72. "CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE": "YES"
  73. },
  74. "vendor": {
  75. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  76. "hostOS": [
  77. "macOS"
  78. ]
  79. }
  80. }
  81. },
  82. {
  83. "name": "default-android",
  84. "displayName": "Default Android Config",
  85. "hidden": true,
  86. "binaryDir": "${sourceDir}/out/build/${presetName}",
  87. "generator": "Unix Makefiles",
  88. "cacheVariables": {
  89. "CMAKE_SYSTEM_NAME": "Android",
  90. "CMAKE_ANDROID_API_MIN": "24",
  91. "CMAKE_ANDROID_NDK": "$env{ANDROID_SDK}",
  92. "CMAKE_ANDROID_STL_TYPE": "c++_static"
  93. }
  94. },
  95. {
  96. "name": "x64-windows-msvc",
  97. "description": "Sets x64 arch, generator, compilers",
  98. "inherits": "default-windows"
  99. },
  100. {
  101. "name": "x64-windows-clang",
  102. "description": "Sets x64 arch, generator, compilers",
  103. "toolset": "ClangCL",
  104. "inherits": "default-windows",
  105. "vendor": {
  106. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  107. "intelliSenseMode": "windows-clang-x64"
  108. }
  109. }
  110. },
  111. {
  112. "name": "macos",
  113. "description": "Sets x86_64 and arm64 arch, generator, compilers",
  114. "inherits": "default-macos"
  115. },
  116. {
  117. "name": "x86_64-linux",
  118. "description": "Sets x86_64 arch, generator, compilers",
  119. "inherits": "default-linux",
  120. "cacheVariables": {
  121. "CMAKE_C_COMPILER": "clang-10",
  122. "CMAKE_CXX_COMPILER": "clang++-10",
  123. "CMAKE_CXX_FLAGS": "-stdlib=libc++"
  124. }
  125. },
  126. {
  127. "name": "ios",
  128. "description": "Sets x86_64 and arm64 arch, generator, compilers",
  129. "inherits": "default-ios"
  130. },
  131. {
  132. "name": "armv7-android",
  133. "description": "Sets armv7 arch, generator, compilers",
  134. "inherits": "default-android",
  135. "cacheVariables": {
  136. "CMAKE_ANDROID_ARCH_ABI": "armeabi-v7a"
  137. }
  138. },
  139. {
  140. "name": "arm64-android",
  141. "description": "Sets arm64 arch, generator, compilers",
  142. "inherits": "default-android",
  143. "cacheVariables": {
  144. "CMAKE_ANDROID_ARCH_ABI": "arm64-v8a"
  145. }
  146. }
  147. ],
  148. "buildPresets": [
  149. {
  150. "name": "debug-windows-clang",
  151. "displayName": "Build Debug",
  152. "description": "Debug build using Clang",
  153. "configurePreset": "x64-windows-clang",
  154. "configuration": "Debug",
  155. "verbose": true
  156. },
  157. {
  158. "name": "release-windows-clang",
  159. "displayName": "Build Release",
  160. "description": "Release build using Clang",
  161. "configurePreset": "x64-windows-clang",
  162. "configuration": "Release",
  163. "cleanFirst": true
  164. },
  165. {
  166. "name": "debug-windows-msvc",
  167. "displayName": "Build Debug",
  168. "description": "Debug build using MSVC",
  169. "configurePreset": "x64-windows-msvc",
  170. "configuration": "Debug",
  171. "verbose": true
  172. },
  173. {
  174. "name": "release-windows-msvc",
  175. "displayName": "Build Release",
  176. "description": "Release build using MSVC",
  177. "configurePreset": "x64-windows-msvc",
  178. "configuration": "Release",
  179. "cleanFirst": true
  180. },
  181. {
  182. "name": "debug-macos",
  183. "displayName": "Build Debug",
  184. "description": "Debug build for macOS",
  185. "configurePreset": "macos",
  186. "configuration": "Debug",
  187. "verbose": true
  188. },
  189. {
  190. "name": "release-macos",
  191. "displayName": "Build Release",
  192. "description": "Release build for macOS",
  193. "configurePreset": "macos",
  194. "configuration": "Release",
  195. "cleanFirst": true
  196. },
  197. {
  198. "name": "debug-linux",
  199. "displayName": "Build Debug",
  200. "description": "Debug build for Linux",
  201. "configurePreset": "x86_64-linux",
  202. "configuration": "Debug",
  203. "verbose": true
  204. },
  205. {
  206. "name": "release-linux",
  207. "displayName": "Build Release",
  208. "description": "Release build for Linux",
  209. "configurePreset": "x86_64-linux",
  210. "configuration": "Release",
  211. "cleanFirst": true
  212. },
  213. {
  214. "name": "debug-android",
  215. "displayName": "Build Debug",
  216. "description": "Debug build for Android",
  217. "configurePreset": "arm64-android",
  218. "configuration": "Debug",
  219. "verbose": true
  220. },
  221. {
  222. "name": "release-android",
  223. "displayName": "Build Release",
  224. "description": "Release build for Android",
  225. "configurePreset": "arm64-android",
  226. "configuration": "Release",
  227. "cleanFirst": true
  228. },
  229. {
  230. "name": "debug-ios",
  231. "displayName": "Build Debug",
  232. "description": "Debug build for iOS",
  233. "configurePreset": "ios",
  234. "configuration": "Debug",
  235. "verbose": true
  236. },
  237. {
  238. "name": "release-ios",
  239. "displayName": "Build Release",
  240. "description": "Release build for iOS",
  241. "configurePreset": "ios",
  242. "configuration": "Release",
  243. "cleanFirst": true
  244. }
  245. ],
  246. "testPresets": [
  247. {
  248. "name": "test-windows-clang",
  249. "configurePreset": "x64-windows-clang",
  250. "output": {"outputOnFailure": true},
  251. "execution": {"noTestsAction": "error", "stopOnFailure": true}
  252. },
  253. {
  254. "name": "test-macos",
  255. "configurePreset": "macos",
  256. "output": {"outputOnFailure": true},
  257. "execution": {"noTestsAction": "error", "stopOnFailure": true}
  258. },
  259. {
  260. "name": "test-linux",
  261. "configurePreset": "x86_64-linux",
  262. "output": {"outputOnFailure": true},
  263. "execution": {"noTestsAction": "error", "stopOnFailure": true}
  264. }
  265. ]
  266. }