CMakePresets.json 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "version": 6,
  3. "cmakeMinimumRequired": {
  4. "major": 3,
  5. "minor": 25,
  6. "patch": 0
  7. },
  8. "configurePresets": [
  9. {
  10. "name": "windows-zig-release",
  11. "displayName": "Windows / Zig clang / Release",
  12. "description": "无 MSVC/MinGW 时用 ziglang 包内的 Zig clang 编译(Ninja)",
  13. "generator": "Ninja",
  14. "binaryDir": "${sourceDir}/../build-cmake/windows-zig-release",
  15. "toolchainFile": "${sourceDir}/cmake/toolchain-zig.cmake",
  16. "cacheVariables": {
  17. "CMAKE_BUILD_TYPE": "Release",
  18. "PORTCV_BUILD_TESTS": "ON",
  19. "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
  20. }
  21. },
  22. {
  23. "name": "windows-zig-debug",
  24. "displayName": "Windows / Zig clang / Debug",
  25. "description": "带调试符号的 Windows 侧构建(Ninja)",
  26. "generator": "Ninja",
  27. "binaryDir": "${sourceDir}/../build-cmake/windows-zig-debug",
  28. "toolchainFile": "${sourceDir}/cmake/toolchain-zig.cmake",
  29. "cacheVariables": {
  30. "CMAKE_BUILD_TYPE": "Debug",
  31. "PORTCV_BUILD_TESTS": "ON",
  32. "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
  33. }
  34. }
  35. ],
  36. "buildPresets": [
  37. {
  38. "name": "windows-zig-release",
  39. "configurePreset": "windows-zig-release"
  40. },
  41. {
  42. "name": "windows-zig-debug",
  43. "configurePreset": "windows-zig-debug"
  44. }
  45. ],
  46. "testPresets": [
  47. {
  48. "name": "windows-zig-release",
  49. "configurePreset": "windows-zig-release",
  50. "output": {
  51. "outputOnFailure": true
  52. },
  53. "execution": {
  54. "noTestsAction": "error",
  55. "stopOnFailure": false
  56. }
  57. },
  58. {
  59. "name": "windows-zig-debug",
  60. "configurePreset": "windows-zig-debug",
  61. "output": {
  62. "outputOnFailure": true
  63. },
  64. "execution": {
  65. "noTestsAction": "error",
  66. "stopOnFailure": false
  67. }
  68. }
  69. ]
  70. }