-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathCMakePresets.json
More file actions
executable file
·184 lines (184 loc) · 5.06 KB
/
Copy pathCMakePresets.json
File metadata and controls
executable file
·184 lines (184 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"version": 3,
"configurePresets": [
{
"name": "default",
"displayName": "Default",
"description": "Default build — Release, no ccache warning, tests off, OpenMP optional",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"GGML_CCACHE": "OFF",
"GGML_OPENMP": "OFF",
"CRISPASR_BUILD_TESTS": "OFF"
}
},
{
"name": "debug",
"displayName": "Debug",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "linux",
"displayName": "Linux (with OpenMP)",
"inherits": "default",
"cacheVariables": {
"GGML_OPENMP": "ON"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "asan",
"displayName": "AddressSanitizer",
"description": "Debug build with ASan — catches heap/stack/global buffer overflows and use-after-free",
"inherits": "debug",
"binaryDir": "${sourceDir}/build-asan",
"cacheVariables": {
"CRISPASR_SANITIZE_ADDRESS": "ON",
"CRISPASR_SANITIZE_UNDEFINED": "OFF",
"CRISPASR_SANITIZE_THREAD": "OFF"
}
},
{
"name": "ubsan",
"displayName": "UndefinedBehaviourSanitizer",
"description": "Debug build with UBSan — catches integer overflow, bad casts, null dereferences, etc.",
"inherits": "debug",
"binaryDir": "${sourceDir}/build-ubsan",
"cacheVariables": {
"CRISPASR_SANITIZE_ADDRESS": "OFF",
"CRISPASR_SANITIZE_UNDEFINED": "ON",
"CRISPASR_SANITIZE_THREAD": "OFF"
}
},
{
"name": "sanitize",
"displayName": "ASan + UBSan",
"description": "Debug build with both AddressSanitizer and UndefinedBehaviourSanitizer enabled together",
"inherits": "debug",
"binaryDir": "${sourceDir}/build-sanitize",
"cacheVariables": {
"CRISPASR_SANITIZE_ADDRESS": "ON",
"CRISPASR_SANITIZE_UNDEFINED": "ON",
"CRISPASR_SANITIZE_THREAD": "OFF"
}
},
{
"name": "tsan",
"displayName": "ThreadSanitizer",
"description": "Debug build with TSan — catches data races. Cannot be combined with ASan/UBSan.",
"inherits": "debug",
"binaryDir": "${sourceDir}/build-tsan",
"cacheVariables": {
"CRISPASR_SANITIZE_ADDRESS": "OFF",
"CRISPASR_SANITIZE_UNDEFINED": "OFF",
"CRISPASR_SANITIZE_THREAD": "ON"
}
},
{
"name": "coverage",
"displayName": "Coverage (gcov/lcov)",
"description": "Debug build instrumented for line/branch coverage. Run lcov/genhtml after ctest to get an HTML report.",
"inherits": "debug",
"binaryDir": "${sourceDir}/build-coverage",
"cacheVariables": {
"CMAKE_C_FLAGS": "-O0 --coverage",
"CMAKE_CXX_FLAGS": "-O0 --coverage",
"CMAKE_EXE_LINKER_FLAGS": "--coverage"
},
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "tidy",
"displayName": "clang-tidy analysis",
"description": "Release build that runs clang-tidy on every compiled TU via CMAKE_CXX_CLANG_TIDY. Requires clang-tidy on PATH.",
"inherits": "default",
"binaryDir": "${sourceDir}/build-tidy",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_CLANG_TIDY": "clang-tidy;--use-color",
"CMAKE_C_CLANG_TIDY": "clang-tidy;--use-color"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default"
},
{
"name": "debug",
"configurePreset": "debug"
},
{
"name": "asan",
"configurePreset": "asan"
},
{
"name": "ubsan",
"configurePreset": "ubsan"
},
{
"name": "sanitize",
"configurePreset": "sanitize"
},
{
"name": "tsan",
"configurePreset": "tsan"
},
{
"name": "coverage",
"configurePreset": "coverage"
},
{
"name": "tidy",
"configurePreset": "tidy"
}
],
"testPresets": [
{
"name": "default",
"configurePreset": "default",
"output": { "outputOnFailure": true }
},
{
"name": "debug",
"configurePreset": "debug",
"output": { "outputOnFailure": true }
},
{
"name": "asan",
"configurePreset": "asan",
"output": { "outputOnFailure": true },
"environment": {
"ASAN_OPTIONS": "detect_leaks=1:abort_on_error=1",
"UBSAN_OPTIONS": "print_stacktrace=1:halt_on_error=1"
}
},
{
"name": "sanitize",
"configurePreset": "sanitize",
"output": { "outputOnFailure": true },
"environment": {
"ASAN_OPTIONS": "detect_leaks=1:abort_on_error=1",
"UBSAN_OPTIONS": "print_stacktrace=1:halt_on_error=1"
}
},
{
"name": "coverage",
"configurePreset": "coverage",
"output": { "outputOnFailure": true }
}
]
}