1{
2    "version": 2,
3    "configurePresets": [
4        {
5            "name": "dev",
6            "displayName": "Build as debug",
7            "generator": "Ninja",
8            "binaryDir": "${sourceDir}/build",
9            "cacheVariables": {
10                "CMAKE_BUILD_TYPE": "Debug",
11		"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
12            }
13        },
14        {
15            "name": "asan",
16            "displayName": "Build with Asan support.",
17            "generator": "Ninja",
18            "binaryDir": "${sourceDir}/build-asan",
19            "cacheVariables": {
20                "CMAKE_BUILD_TYPE": "Debug",
21                "ECM_ENABLE_SANITIZERS" : "'address;undefined'",
22		"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
23            }
24        },
25        {
26            "name": "dev-clang",
27            "displayName": "dev-clang",
28            "generator": "Ninja",
29            "binaryDir": "${sourceDir}/build-clang",
30            "cacheVariables": {
31                "CMAKE_BUILD_TYPE": "Debug",
32                "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
33            },
34            "environment": {
35                "CXX": "clang++",
36                "CCACHE_DISABLE": "ON"
37            }
38        },
39        {
40            "name": "unity",
41            "displayName": "Build with CMake unity support.",
42            "generator": "Ninja",
43            "binaryDir": "${sourceDir}/build-unity",
44            "cacheVariables": {
45                "CMAKE_BUILD_TYPE": "Debug",
46		"CMAKE_UNITY_BUILD": "ON",
47		"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
48            }
49        },
50        {
51            "name": "release",
52            "displayName": "Build as release mode.",
53            "generator": "Ninja",
54            "binaryDir": "${sourceDir}/build-release",
55            "cacheVariables": {
56                "CMAKE_BUILD_TYPE": "Release"
57            }
58        },
59        {
60            "name": "profile",
61            "displayName": "profile",
62            "generator": "Ninja",
63            "binaryDir": "${sourceDir}/build-profile",
64            "cacheVariables": {
65                "CMAKE_BUILD_TYPE": "RelWithDebInfo",
66		"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
67            }
68        },
69        {
70            "name": "clazy",
71            "displayName": "clazy",
72            "generator": "Ninja",
73            "binaryDir": "${sourceDir}/build-clazy",
74            "cacheVariables": {
75                "CMAKE_BUILD_TYPE": "Debug"
76            },
77            "environment": {
78                "CXX": "clazy",
79                "CCACHE_DISABLE": "ON"
80            }
81        }
82
83    ],
84    "buildPresets": [
85        {
86            "name": "dev",
87            "configurePreset": "dev"
88        },
89        {
90            "name": "release",
91            "configurePreset": "release"
92        },
93        {
94            "name": "dev-clang",
95            "configurePreset": "dev-clang"
96        },
97        {
98            "name": "asan",
99            "configurePreset": "asan"
100        },
101        {
102            "name": "unity",
103            "configurePreset": "unity"
104        },
105        {
106            "name": "clazy",
107            "configurePreset": "clazy",
108            "environment": {
109                "CLAZY_CHECKS" : "level0,level1,detaching-member,ifndef-define-typo,isempty-vs-count,qrequiredresult-candidates,reserve-candidates,signal-with-return-value,unneeded-cast,function-args-by-ref,function-args-by-value,returning-void-expression,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch,old-style-connect,qstring-allocations,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,qstring-varargs,level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo",
110                "CCACHE_DISABLE" : "ON"
111            }
112        }
113    ],
114    "testPresets": [
115    {
116      "name": "dev",
117      "configurePreset": "dev",
118      "output": {"outputOnFailure": true},
119      "execution": {"noTestsAction": "error", "stopOnFailure": false}
120    },
121    {
122      "name": "asan",
123      "configurePreset": "asan",
124      "output": {"outputOnFailure": true},
125      "execution": {"noTestsAction": "error", "stopOnFailure": true}
126    }
127    ]
128}
129