forked from aristanetworks/quicktrace-public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakePresets.json
106 lines (106 loc) · 2.86 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
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 2
},
"configurePresets": [
{
"name": "c-cpp-std",
"description": "Default C/C++ standard and compiler used to build QuickTrace",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_EXTENSIONS": "OFF",
"CMAKE_CXX_STANDARD": "17",
"CMAKE_CXX_STANDARD_REQUIRED": "ON"
}
},
{
"name": "flags",
"description": "Default flags used to build QuickTrace",
"hidden": true,
"cacheVariables": {
"CMAKE_C_FLAGS": "-Wextra -Wall -Werror -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-but-set-variable",
"CMAKE_CXX_FLAGS": "-Wextra -Wall -Werror -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-but-set-variable",
"CMAKE_EXE_LINKER_FLAGS": "-Wl,--no-undefined"
}
},
{
"name": "base",
"description": "Base build config for QuickTrace",
"hidden": true,
"inherits": ["c-cpp-std", "flags"],
"generator": "Ninja",
"binaryDir": "${sourceDir}/bld"
},
{
"name": "default",
"description": "Default build config",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_FLAGS_DEBUG": "-O0 -g",
"CMAKE_CXX_FLAGS_DEBUG": "-O0 -g",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/bld/bin",
"CMAKE_LIBRARY_OUTPUT_DIRECTORY": "${sourceDir}/bld/lib"
}
},
{
"name": "test",
"description": "Test build config to run all unit tests in QuickTrace",
"inherits": "default",
"cacheVariables": {
"BUILD_TEST": true
},
"environment": {
"PATH": ".:${sourceDir}/bld/bin:${sourceDir}/test:$penv{PATH}",
"PYTHONPATH": ".:${sourceDir}:${sourceDir}/bld/lib:$penv{PYTHONPATH}",
"LD_LIBRARY_PATH": "${sourceDir}/bld/lib:$penv{LD_LIBRARY_PATH}"
}
},
{
"name": "release",
"description": "Release build config",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_FLAGS_RELEASE": "-O2",
"CMAKE_CXX_FLAGS_RELEASE": "-O2",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/bld/bin",
"CMAKE_LIBRARY_OUTPUT_DIRECTORY": "${sourceDir}/bld/lib"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"jobs": 5
},
{
"name": "test",
"configurePreset": "test",
"jobs": 5
},
{
"name": "release",
"configurePreset": "release",
"jobs": 5
}
],
"testPresets": [
{
"name": "test",
"configurePreset": "test",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"jobs": 5
}
}
]
}