-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakePresets.json
59 lines (59 loc) · 1.97 KB
/
CMakePresets.json
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
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14,
"patch": 0
},
"configurePresets": [
{
"name": "common",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "Debug",
"displayName": "Debug",
"description": "Debug mode with symbols, ASAN, and other checks",
"inherits": "common",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wconversion -Wno-unused-command-line-argument -fuse-ld=mold -Wl,--gc-sections,-z,noexecstack -Og -g3 -fsanitize=address,undefined"
}
},
{
"name": "Release",
"displayName": "Release",
"description": "Release mode with all native, local optimizations",
"inherits": "common",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wconversion -Wno-unused-command-line-argument -fuse-ld=mold -Wl,--gc-sections,-z,noexecstack -O2 -flto -march=native"
}
},
{
"name": "Distributable",
"displayName": "Distributable",
"description": "Release mode with only portable optimizations",
"inherits": "Release",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wconversion -Wno-unused-command-line-argument -fuse-ld=mold -Wl,--gc-sections,-z,noexecstack -O2 -flto"
}
},
{
"name": "Test",
"displayName": "Test",
"description": "Build unit test executable",
"inherits": "Debug",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN=1 -Wall -Wextra -Wconversion -Wno-unused-command-line-argument -fuse-ld=mold -Wl,--gc-sections,-z,noexecstack -Og -g3 -fsanitize=address,undefined"
}
}
]
}