forked from winft/como
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakePresets.json
113 lines (113 loc) · 4.65 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"version": 4,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "debug-base",
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": {
"type": "BOOL",
"value": "ON"
}
},
"environment": {
"DEBUG_COMMON_FLAGS": "-Wall -Wextra -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef",
"DEBUG_C_FLAGS": "$env{DEBUG_COMMON_FLAGS} -Wmissing-format-attribute -Wwrite-strings -Werror=implicit-function-declaration",
"DEBUG_CXX_FLAGS": "$env{DEBUG_COMMON_FLAGS} -fno-operator-names -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdate-time -pedantic -Wzero-as-null-pointer-constant -Werror=return-type -Werror=init-self -Werror=undef -fdiagnostics-color=always",
"DEBUG_SHARED_LINKER_FLAGS": "-Wl,--fatal-warnings",
"DEBUG_MODULE_LINKER_FLAGS": "-Wl,--fatal-warnings",
"NOUNDEF_LINKER_FLAGS": "-Wl,--no-undefined",
"DEBUG_CXX_FLAGS_CLANG": "$env{DEBUG_CXX_FLAGS} -fno-operator-names -Wno-gnu-zero-variadic-macro-arguments -Wno-cast-align -Werror -Wno-error=deprecated-declarations -Wno-error=unused-lambda-capture",
"DEBUG_CXX_FLAGS_GCC": "$env{DEBUG_CXX_FLAGS} -Wsuggest-override -Wlogical-op -Wmissing-include-dirs -Wno-missing-field-initializers -Werror -Wno-error=unknown-pragmas -Wno-error=deprecated-declarations -Wno-error=missing-include-dirs"
}
},
{
"name": "clang",
"inherits": "debug-base",
"displayName": "Clang Config",
"description": "Default build using Ninja and Clang",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_C_FLAGS": "$env{DEBUG_C_FLAGS}",
"CMAKE_CXX_FLAGS": "$env{DEBUG_CXX_FLAGS_CLANG}",
"CMAKE_SHARED_LINKER_FLAGS": "$env{DEBUG_SHARED_LINKER_FLAGS} $env{NOUNDEF_LINKER_FLAGS}",
"CMAKE_MODULE_LINKER_FLAGS": "$env{DEBUG_MODULE_LINKER_FLAGS} $env{NOUNDEF_LINKER_FLAGS}"
}
},
{
"name": "gcc",
"inherits": "debug-base",
"displayName": "GCC Config",
"description": "Build using Ninja and GCC",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_C_FLAGS": "$env{DEBUG_C_FLAGS}",
"CMAKE_CXX_FLAGS": "$env{DEBUG_CXX_FLAGS_GCC}",
"CMAKE_SHARED_LINKER_FLAGS": "$env{DEBUG_SHARED_LINKER_FLAGS} $env{NOUNDEF_LINKER_FLAGS}",
"CMAKE_MODULE_LINKER_FLAGS": "$env{DEBUG_MODULE_LINKER_FLAGS} $env{NOUNDEF_LINKER_FLAGS}"
}
},
{
"name": "sanitizers",
"inherits": "debug-base",
"displayName": "Sanitizers Build",
"description": "Build with common sanitizers",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_C_FLAGS": "$env{DEBUG_C_FLAGS}",
"CMAKE_CXX_FLAGS": "$env{DEBUG_CXX_FLAGS_CLANG}",
"ECM_ENABLE_SANITIZERS": "address;leak;undefined",
"CMAKE_SHARED_LINKER_FLAGS": "$env{DEBUG_SHARED_LINKER_FLAGS}",
"CMAKE_MODULE_LINKER_FLAGS": "$env{DEBUG_MODULE_LINKER_FLAGS}"
}
},
{
"name": "clang-cov",
"inherits": "clang",
"displayName": "Clang Tests Coverage",
"description": "Clang Build with tests and coverage reporting enabled",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "$env{DEBUG_CXX_FLAGS_CLANG} --coverage",
"CMAKE_EXE_LINKER_FLAGS": "--coverage"
}
},
{
"name": "gcc-cov",
"inherits": "gcc",
"displayName": "GCC Tests Coverage",
"description": "GCC Build with tests and coverage reporting enabled",
"cacheVariables": {
"CMAKE_C_FLAGS": "$env{DEBUG_C_FLAGS} --coverage -fprofile-abs-path",
"CMAKE_CXX_FLAGS": "$env{DEBUG_CXX_FLAGS_GCC} --coverage -fprofile-abs-path",
"CMAKE_SHARED_LINKER_FLAGS": "$env{DEBUG_SHARED_LINKER_FLAGS} $env{NOUNDEF_LINKER_FLAGS} --coverage -fprofile-abs-path",
"CMAKE_MODULE_LINKER_FLAGS": "$env{DEBUG_MODULE_LINKER_FLAGS} $env{NOUNDEF_LINKER_FLAGS} --coverage -fprofile-abs-path",
"CMAKE_EXE_LINKER_FLAGS": "--coverage -fprofile-abs-path"
}
},
{
"name": "release",
"displayName": "Release build",
"description": "Build without any checks as release with debug symbols",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"BUILD_TESTING": {
"type": "BOOL",
"value": "OFF"
}
}
}
]
}