-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakePresets.json
92 lines (92 loc) · 3.13 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
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
{
"version": 2,
"configurePresets": [
{
"name": "ninja",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
},
{
"name": "debug",
"inherits": "ninja",
"binaryDir": "${sourceDir}/build/${presetName}"
},
{
"name": "release",
"inherits": "ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_OPTIMIZE_DEPENDENCIES": "ON",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
"CMAKE_UNITY_BUILD": "ON",
"CMAKE_VISIBILITY_INLINES_HIDDEN": "ON",
"CMAKE_CXX_VISIBILITY_PRESET": "hidden",
"CMAKE_TRY_COMPILE_CONFIGURATION": "Release"
}
},
{
"name": "msvc-sanitizer",
"inherits": "ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "ninja",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDebug",
"CMAKE_CXX_FLAGS_DEBUG": "/Zi /Od /RTC1 /MDd /D_DEBUG /DDEBUG /guard:cf /sdl /analyze /fsanitize=address /JMC /external:anglebrackets /external:W0 /permissive- /W4 /w14640",
"CMAKE_EXE_LINKER_FLAGS": "/ninja:FULL /INCREMENTAL"
}
},
{
"name": "gcc-sanitizer",
"inherits": "ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "ninja",
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -fno-inline -fno-omit-frame-pointer -fstack-protector-strong -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS=1 -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -D_GLIBCXX_SANITIZE_VECTOR=1 -D_LIBCPP_DEBUG=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -fsanitize=address,undefined -fsanitize-address-use-after-scope -fno-sanitize-recover=all",
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=gold -fsanitize=address,undefined",
"CMAKE_CXX_COMPILER": "g++"
}
},
{
"name": "clang-sanitizer",
"inherits": "ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "ninja",
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -fno-inline -fno-omit-frame-pointer -fstack-protector-strong -D_LIBCPP_DEBUG=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -fsanitize=address,undefined -fsanitize-address-use-after-scope -fno-sanitize-recover=all",
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address,undefined",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_LINKER": "lld"
}
}
],
"buildPresets": [
{
"name": "ninja",
"configurePreset": "ninja"
},
{
"name": "debug",
"configurePreset": "debug"
},
{
"name": "release",
"configurePreset": "release"
},
{
"name": "msvc-sanitizer",
"configurePreset": "msvc-sanitizer"
},
{
"name": "gcc-sanitizer",
"configurePreset": "gcc-sanitizer"
},
{
"name": "clang-sanitizer",
"configurePreset": "clang-sanitizer"
}
]
}