CMakePresets.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. "version": 3,
  3. "configurePresets": [
  4. {
  5. "name": "base",
  6. "generator": "Ninja",
  7. "binaryDir": "${sourceDir}/build",
  8. "hidden": true
  9. },
  10. {
  11. "name": "default",
  12. "displayName": "RelWithDebInfo",
  13. "description": "Enables optimizations (-Og or -O2) with debug information",
  14. "cacheVariables": {
  15. "CMAKE_BUILD_TYPE": "RelWithDebInfo"
  16. },
  17. "inherits": ["base"]
  18. },
  19. {
  20. "name": "debug",
  21. "displayName": "Debug",
  22. "description": "Disables optimizations (-O0), enables debug information",
  23. "cacheVariables": {
  24. "CMAKE_BUILD_TYPE": "Debug"
  25. },
  26. "inherits": ["base"]
  27. },
  28. {
  29. "name": "release",
  30. "displayName": "Release",
  31. "description": "Same as RelWithDebInfo, but disables debug information",
  32. "cacheVariables": {
  33. "CMAKE_BUILD_TYPE": "Release"
  34. },
  35. "inherits": ["base"]
  36. },
  37. {
  38. "name": "windows-default",
  39. "displayName": "Windows x64 RelWithDebInfo",
  40. "description": "Sets Ninja generator, enables optimizations with debug information for x64",
  41. "generator": "Ninja",
  42. "cacheVariables": {
  43. "CMAKE_BUILD_TYPE": "RelWithDebInfo"
  44. },
  45. "architecture": {
  46. "value": "x64",
  47. "strategy": "external"
  48. },
  49. "vendor": {
  50. "microsoft.com/VisualStudioSettings/CMake/1.0": {
  51. "hostOS": ["Windows"]
  52. }
  53. },
  54. "condition": {
  55. "type": "equals",
  56. "lhs": "${hostSystemName}",
  57. "rhs": "Windows"
  58. },
  59. "inherits": ["base"]
  60. },
  61. {
  62. "name": "iwyu",
  63. "displayName": "IWYU",
  64. "description": "Run include-what-you-use with the compiler",
  65. "cacheVariables": {
  66. "ENABLE_IWYU": "ON"
  67. },
  68. "inherits": ["base"]
  69. }
  70. ],
  71. "buildPresets": [
  72. {
  73. "name": "default",
  74. "configurePreset": "default"
  75. },
  76. {
  77. "name": "debug",
  78. "configurePreset": "debug"
  79. },
  80. {
  81. "name": "release",
  82. "configurePreset": "release"
  83. },
  84. {
  85. "name": "windows-default",
  86. "configurePreset": "windows-default",
  87. "condition": {
  88. "type": "equals",
  89. "lhs": "${hostSystemName}",
  90. "rhs": "Windows"
  91. }
  92. },
  93. {
  94. "name": "iwyu",
  95. "configurePreset": "iwyu"
  96. }
  97. ]
  98. }