CMakePresets.json 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. {
  2. "version": 6,
  3. "cmakeMinimumRequired": {
  4. "major": 3,
  5. "minor": 25,
  6. "patch": 0
  7. },
  8. "configurePresets": [
  9. {
  10. "hidden": true,
  11. "name": "default_base",
  12. "displayName": "Default Config",
  13. "binaryDir": "${fileDir}/Build/release",
  14. "cacheVariables": {
  15. "CMAKE_BUILD_TYPE": "RelWithDebInfo",
  16. "SERENITY_CACHE_DIR": "${fileDir}/Build/caches",
  17. "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
  18. "VCPKG_INSTALL_OPTIONS": "--no-print-usage",
  19. "VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/release-triplets"
  20. },
  21. "environment": {
  22. "LADYBIRD_SOURCE_DIR": "${fileDir}",
  23. "VCPKG_ROOT": "${fileDir}/Build/vcpkg",
  24. "VCPKG_BINARY_SOURCES": "clear;files,${fileDir}/Build/caches/vcpkg-binary-cache,readwrite;$penv{VCPKG_BINARY_SOURCES}"
  25. },
  26. "vendor": {
  27. "jetbrains.com/clion": {
  28. "toolchain": "Default"
  29. }
  30. }
  31. },
  32. {
  33. "hidden": true,
  34. "name": "windows",
  35. "description": "Visual Studio IDE config (experimental)",
  36. "architecture": {
  37. "value": "x64",
  38. "strategy": "external"
  39. },
  40. "cacheVariables": {
  41. "ENABLE_QT": "OFF"
  42. },
  43. "vendor": {
  44. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  45. "intelliSenseMode": "windows-clang-x64"
  46. }
  47. },
  48. "condition": {
  49. "type": "equals",
  50. "lhs": "${hostSystemName}",
  51. "rhs": "Windows"
  52. }
  53. },
  54. {
  55. "name": "default",
  56. "description": "Default build using Ninja generator",
  57. "generator": "Ninja",
  58. "inherits": "default_base",
  59. "condition": {
  60. "type": "notEquals",
  61. "lhs": "${hostSystemName}",
  62. "rhs": "Windows"
  63. }
  64. },
  65. {
  66. "name": "windows_ninja",
  67. "displayName": "Default with ClangCL and Ninja",
  68. "description": "Windows build using Ninja generator (experimental)",
  69. "inherits": [
  70. "default_base",
  71. "windows"
  72. ],
  73. "generator": "Ninja",
  74. "cacheVariables": {
  75. "CMAKE_C_COMPILER": "clang-cl",
  76. "CMAKE_CXX_COMPILER": "clang-cl"
  77. }
  78. },
  79. {
  80. "name": "windows_msbuild",
  81. "displayName": "Default with ClangCL and MSBuild",
  82. "description": "Default build using Visual Studio generator (experimental)",
  83. "inherits": [
  84. "default_base",
  85. "windows"
  86. ],
  87. "generator": "Visual Studio 17 2022",
  88. "toolset": "ClangCL"
  89. },
  90. {
  91. "name": "Distribution",
  92. "inherits": "default",
  93. "displayName": "Distribution Config",
  94. "description": "Distribution build with static libraries using Ninja generator",
  95. "binaryDir": "${fileDir}/Build/distribution",
  96. "cacheVariables": {
  97. "BUILD_SHARED_LIBS": "OFF",
  98. "CMAKE_BUILD_TYPE": "Release",
  99. "VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/distribution-triplets"
  100. }
  101. },
  102. {
  103. "name": "Debug",
  104. "inherits": "default",
  105. "displayName": "Debug Config",
  106. "description": "Debug build using Ninja generator",
  107. "binaryDir": "${fileDir}/Build/debug",
  108. "cacheVariables": {
  109. "CMAKE_BUILD_TYPE": "Debug",
  110. "VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/debug-triplets"
  111. }
  112. },
  113. {
  114. "name": "Sanitizer",
  115. "inherits": "default",
  116. "displayName": "Sanitizer Config",
  117. "description": "Sanitizer build using Ninja generator",
  118. "binaryDir": "${fileDir}/Build/sanitizers",
  119. "cacheVariables": {
  120. "ENABLE_UNDEFINED_SANITIZER": "ON",
  121. "ENABLE_ADDRESS_SANITIZER": "ON",
  122. "VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/sanitizer-triplets"
  123. }
  124. },
  125. {
  126. "hidden": true,
  127. "name": "vcpkg_ci",
  128. "description": "Use the GitHub Actions vcpkg cache",
  129. "environment": {
  130. "VCPKG_BINARY_SOURCES": "clear;x-gha,readwrite"
  131. }
  132. },
  133. {
  134. "name": "CI",
  135. "inherits": [
  136. "vcpkg_ci",
  137. "default"
  138. ],
  139. "displayName": "Non-Sanitizer CI Config"
  140. },
  141. {
  142. "name": "Distribution_CI",
  143. "inherits": [
  144. "vcpkg_ci",
  145. "Distribution"
  146. ],
  147. "displayName": "Distribution CI Config",
  148. "description": "Distribution build with GitHub Actions cache"
  149. },
  150. {
  151. "name": "Sanitizer_CI",
  152. "inherits": [
  153. "vcpkg_ci",
  154. "Sanitizer"
  155. ],
  156. "displayName": "Sanitizer CI Config"
  157. },
  158. {
  159. "name": "Fuzzers",
  160. "inherits": "default",
  161. "displayName": "Fuzzers Config",
  162. "description": "Fuzzers build",
  163. "binaryDir": "${fileDir}/Build/fuzzers",
  164. "cacheVariables": {
  165. "BUILD_SHARED_LIBS": "OFF",
  166. "ENABLE_QT": "OFF",
  167. "VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/distribution-triplets",
  168. "ENABLE_FUZZERS_LIBFUZZER": "ON",
  169. "ENABLE_ADDRESS_SANITIZER": "ON"
  170. }
  171. },
  172. {
  173. "name": "Fuzzers_CI",
  174. "inherits": [
  175. "vcpkg_ci",
  176. "Fuzzers"
  177. ],
  178. "displayName": "Fuzzers CI Config",
  179. "description": "Fuzzers build with GitHub Actions cache"
  180. }
  181. ],
  182. "buildPresets": [
  183. {
  184. "name": "default",
  185. "configurePreset": "default",
  186. "displayName": "Build",
  187. "description": "Build the project",
  188. "targets": [
  189. "all"
  190. ]
  191. },
  192. {
  193. "name": "windows_msbuild",
  194. "configurePreset": "windows_msbuild",
  195. "displayName": "Build",
  196. "description": "Build the project",
  197. "targets": [
  198. "ALL_BUILD"
  199. ]
  200. },
  201. {
  202. "name": "windows_ninja",
  203. "configurePreset": "windows_ninja",
  204. "displayName": "Build",
  205. "description": "Build the project",
  206. "targets": [
  207. "all"
  208. ]
  209. },
  210. {
  211. "name": "Distribution",
  212. "configurePreset": "Distribution",
  213. "displayName": "Build",
  214. "description": "Build the project for distribution",
  215. "targets": [
  216. "all"
  217. ]
  218. },
  219. {
  220. "name": "Debug",
  221. "configurePreset": "Debug",
  222. "displayName": "Build",
  223. "description": "Build the project in debug",
  224. "targets": [
  225. "all"
  226. ]
  227. },
  228. {
  229. "name": "Sanitizer",
  230. "configurePreset": "Sanitizer",
  231. "displayName": "Build with Sanitizers",
  232. "description": "Build the project with Sanitizers",
  233. "targets": [
  234. "all"
  235. ]
  236. }
  237. ],
  238. "testPresets": [
  239. {
  240. "name": "default",
  241. "configurePreset": "default",
  242. "output": {
  243. "outputOnFailure": true
  244. },
  245. "execution": {
  246. "noTestsAction": "error",
  247. "stopOnFailure": true
  248. },
  249. "environment": {
  250. "LADYBIRD_SOURCE_DIR": "${fileDir}"
  251. }
  252. },
  253. {
  254. "name": "Sanitizer",
  255. "inherits": "default",
  256. "configurePreset": "Sanitizer",
  257. "environment": {
  258. "ASAN_OPTIONS": "strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:allocator_may_return_null=1:$penv{ASAN_OPTIONS}",
  259. "UBSAN_OPTIONS": "print_stacktrace=1:print_summary=1:halt_on_error=1:$penv{UBSAN_OPTIONS}"
  260. }
  261. },
  262. {
  263. "name": "Debug",
  264. "inherits": "default",
  265. "configurePreset": "Debug"
  266. },
  267. {
  268. "name": "Distribution",
  269. "inherits": "default",
  270. "configurePreset": "Distribution"
  271. }
  272. ]
  273. }